<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: itsezc</title>
    <description>The latest articles on DEV Community by itsezc (@itsezc).</description>
    <link>https://dev.to/itsezc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F264192%2Fd3961048-7603-4d0f-b273-a1e2cd82370d.jpeg</url>
      <title>DEV Community: itsezc</title>
      <link>https://dev.to/itsezc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/itsezc"/>
    <language>en</language>
    <item>
      <title>Bring SurrealDB to your Replit Agent</title>
      <dc:creator>itsezc</dc:creator>
      <pubDate>Thu, 02 Jul 2026 15:23:55 +0000</pubDate>
      <link>https://dev.to/surrealdb/bring-surrealdb-to-your-replit-agent-57i</link>
      <guid>https://dev.to/surrealdb/bring-surrealdb-to-your-replit-agent-57i</guid>
      <description>&lt;p&gt;Replit Agent turns a prompt into a working app. SurrealDB is the one database behind that app, covering documents, graph, vectors, and SQL in a single engine. The piece that connects them is the Model Context Protocol (MCP).&lt;/p&gt;

&lt;p&gt;Every SurrealDB instance running 3.1 or later can expose a first-party MCP server: a typed tool surface that AI agents call to inspect your schema and run queries safely. Replit Agent supports any MCP server as a connector, and adds them with a single click. Put the two together and Replit can build directly from the data you already have in SurrealDB.&lt;/p&gt;

&lt;p&gt;This is vibe coding for teams that already own their data. Instead of letting an agentic coding tool improvise a throwaway backend, you point Replit at SurrealDB and build on a database you already trust, with the agent reading your real schema as it goes.&lt;/p&gt;

&lt;p&gt;This guide is a hands-on quickstart. By the end you will have SurrealDB 3.1 running with its MCP server enabled, connected to a Replit project, and you will have prompted Replit Agent to generate a real interface on top of your data.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll need
&lt;/h2&gt;

&lt;p&gt;You need a few things before you start, and none of them take more than a few minutes to set up.&lt;/p&gt;

&lt;p&gt;You need SurrealDB 3.1.0 or later. You also need a way to reach your instance from the internet, because Replit's connectors talk to your MCP server over HTTP and the server needs a public URL. A SurrealDB Cloud instance gives you one out of the box; for a local instance you can use a tunnel, which we cover below. You need a Replit account. Finally, you need some data. Even a handful of records is enough to see the workflow end to end, and we create a small schema below so you have something to build against.&lt;/p&gt;

&lt;p&gt;It is worth noting how this differs from Replit's built-in database. Replit Agent provisions a managed Postgres instance for the app it builds, which it owns. With SurrealDB over MCP, you own the database. Replit connects to a SurrealDB instance you already run, reads its schema as context, and can query or mutate it through a typed, permissioned tool surface. This is the right pattern when SurrealDB is your system of record and you want to build interfaces on top of it rather than spin up a new backend.&lt;/p&gt;

&lt;h2&gt;
  
  
  How SurrealDB, MCP, and Replit fit together
&lt;/h2&gt;

&lt;p&gt;There are three moving parts to understand before the steps.&lt;/p&gt;

&lt;p&gt;SurrealDB 3.1 exposes a typed tool surface for AI agents. Rather than handing an agent a raw SQL console, the MCP server presents twelve defined tools: &lt;code&gt;query&lt;/code&gt;, &lt;code&gt;select&lt;/code&gt;, &lt;code&gt;create&lt;/code&gt;, &lt;code&gt;insert&lt;/code&gt;, &lt;code&gt;upsert&lt;/code&gt;, &lt;code&gt;update&lt;/code&gt;, &lt;code&gt;delete&lt;/code&gt;, &lt;code&gt;relate&lt;/code&gt;, &lt;code&gt;info&lt;/code&gt;, &lt;code&gt;list&lt;/code&gt;, &lt;code&gt;use&lt;/code&gt;, and &lt;code&gt;run&lt;/code&gt;. Each tool carries annotations (&lt;code&gt;read_only_hint&lt;/code&gt;, &lt;code&gt;destructive_hint&lt;/code&gt;, &lt;code&gt;idempotent_hint&lt;/code&gt;) so an MCP client like Replit knows which operations are safe and which mutate data. The server also publishes self-describing schema resources at URIs like &lt;code&gt;surrealdb://schema/ns/{ns}/db/{db}/table/{table}&lt;/code&gt;, so the agent discovers your tables and fields instead of guessing.&lt;/p&gt;

&lt;p&gt;You can run that MCP server two ways. Locally, &lt;code&gt;surreal mcp&lt;/code&gt; runs as a stdio subcommand, which suits IDE integrations on your own machine. For a remote client like Replit, the server is exposed over HTTP at &lt;code&gt;/mcp&lt;/code&gt;, sitting behind SurrealDB's existing authentication middleware. We use the HTTP path here, because Replit needs to reach your server over the network.&lt;/p&gt;

&lt;p&gt;Replit Agent treats MCP servers as connectors. Replit ships a curated list of MCP servers that install in one click, and lets you add any other server, including your SurrealDB instance, from the Integrations pane. All MCP traffic passes through Replit's security scanner, which inspects tool definitions and planned executions and blocks anything it judges unsafe before it runs. Once your SurrealDB endpoint is connected, the agent pulls your live schema and data into context while it builds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Install or upgrade to SurrealDB 3.1
&lt;/h2&gt;

&lt;p&gt;If you are already on a 3.1.x release you can skip ahead. Otherwise, pick whichever install path matches your setup. Each pins to a specific version; drop the &lt;code&gt;--version&lt;/code&gt; flag to always get the newest stable.&lt;/p&gt;

&lt;p&gt;macOS (Homebrew), then upgrade in place:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;surreal upgrade --version 3.1.5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Linux and macOS install script, which auto-detects your architecture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -sSf https://install.surrealdb.com | sh -s -- --version 3.1.5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Windows (PowerShell), then upgrade in place:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;surreal upgrade --version 3.1.5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Docker, to pull and run the exact image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run --rm --pull always -p 8000:8000 surrealdb/surrealdb:v3.1.5 start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;surreal upgrade&lt;/code&gt; command can swap any existing install, whether Homebrew, install script, or manual binary, to the version you specify. Patch releases on the 3.1 line are drop-in upgrades.&lt;/p&gt;

&lt;p&gt;If you are on SurrealDB Cloud, you can upgrade your instance in place from the Surrealist app, and you already have a public HTTPS endpoint, which makes the networking in Step 4 considerably simpler.&lt;/p&gt;

&lt;p&gt;Verify your version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;surreal version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Start your instance and create some data
&lt;/h2&gt;

&lt;p&gt;For a local run, start a server with authentication enabled. The MCP HTTP endpoint sits behind the same auth middleware as the rest of SurrealDB, so credentials matter here.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;surreal start \
  --user root --pass pass \
  rocksdb://mydata.db
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This starts SurrealDB on &lt;code&gt;http://localhost:8000&lt;/code&gt; with a persistent RocksDB store and a root user. In production you would scope down to a namespace and database user rather than root, which we cover under permissions later.&lt;/p&gt;

&lt;p&gt;Now give Replit something to build against. Use the CLI's &lt;code&gt;surreal sql&lt;/code&gt; command to open a session, or use Surrealist, the visual query tool, and define a small schema. We model a simple product catalog with reviews, which is enough to show off SurrealDB's record links.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Pick a namespace and database to work in
USE NS shop DB catalog;

-- A products table
DEFINE TABLE product SCHEMAFULL;
DEFINE FIELD name        ON product TYPE string;
DEFINE FIELD price       ON product TYPE number;
DEFINE FIELD in_stock    ON product TYPE bool DEFAULT true;
DEFINE FIELD created_at  ON product TYPE datetime DEFAULT time::now();

-- A reviews table that links back to a product
DEFINE TABLE review SCHEMAFULL;
DEFINE FIELD product ON review TYPE record&amp;lt;product&amp;gt; REFERENCE;
DEFINE FIELD rating  ON review TYPE int ASSERT $value IN 0..=5;
DEFINE FIELD body    ON review TYPE string;

-- Seed a few records
CREATE product SET name = "Aeropress", price = 39.95;
CREATE product SET name = "Gooseneck Kettle", price = 64.00;
CREATE product SET name = "Burr Grinder", price = 129.00, in_stock = false;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;code&gt;SCHEMAFULL&lt;/code&gt; table means SurrealDB enforces the field definitions, which is what you want when an AI agent is going to read and write the table. The schema becomes the contract the agent builds against. Because SurrealDB publishes that schema as an MCP resource, Replit reads these field types directly rather than inferring them from sample rows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Enable the MCP server over HTTP
&lt;/h2&gt;

&lt;p&gt;In 3.1, the MCP HTTP surface is served at &lt;code&gt;/mcp&lt;/code&gt; on the same port as the rest of the HTTP API, behind authentication. A handful of environment variables let you tune its limits. The defaults are sensible, but it is worth knowing they exist:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;SURREAL_HTTP_MAX_MCP_BODY_SIZE&lt;/code&gt;: maximum request body size (default 4 MiB)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SURREAL_MCP_QUERY_TIMEOUT_SECS&lt;/code&gt;: per-query timeout (default 60 s)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SURREAL_MCP_MAX_RESULT_BYTES&lt;/code&gt;: maximum result payload (default 256 KiB)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SURREAL_MCP_RUN_MAX_ARGS&lt;/code&gt;: maximum arguments to the run tool (default 64)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SURREAL_MCP_PARAMS_MAX_KEYS&lt;/code&gt;: maximum bound parameters per call (default 256)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, to allow larger result payloads while keeping a tight query timeout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SURREAL_MCP_MAX_RESULT_BYTES=1048576 \
SURREAL_MCP_QUERY_TIMEOUT_SECS=30 \
surreal start --user root --pass pass rocksdb://mydata.db
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For PowerShell users on Windows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;SURREAL_MCP_MAX_RESULT_BYTES&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1048576"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;SURREAL_MCP_QUERY_TIMEOUT_SECS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"30"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;surreal&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--user&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;root&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--pass&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pass&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rocksdb://mydata.db&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If instead you want to wire SurrealDB into a local IDE rather than Replit, run the stdio variant, &lt;code&gt;surreal mcp&lt;/code&gt;, and point your editor's MCP client at that subcommand. For Replit, stick with the HTTP endpoint.&lt;/p&gt;

&lt;p&gt;A good sanity check before involving Replit is to confirm the &lt;code&gt;/mcp&lt;/code&gt; route is reachable and that requests without valid credentials are rejected, which tells you the auth middleware is doing its job.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Make your instance reachable
&lt;/h2&gt;

&lt;p&gt;Replit runs in the cloud, so it needs a public URL for your MCP endpoint. You have two clean options.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option 1: SurrealDB Cloud.&lt;/strong&gt; If your data lives in a SurrealDB Cloud instance, you already have a public HTTPS endpoint with managed TLS and authentication. Your MCP URL is simply that instance's address with the &lt;code&gt;/mcp&lt;/code&gt; path appended. This is the lowest-friction path and the one we recommend for anything beyond local experimentation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option 2: A tunnel to a local instance.&lt;/strong&gt; For local development, expose &lt;code&gt;http://localhost:8000&lt;/code&gt; through a tunneling service that gives you a temporary public HTTPS URL, such as ngrok or Cloudflare Tunnel. Your MCP URL is then &lt;code&gt;https://&amp;lt;tunnel-host&amp;gt;/mcp&lt;/code&gt;. This works well for trying things out, but treat the URL as ephemeral and never point it at production data.&lt;/p&gt;

&lt;p&gt;Either way, you end up with a single value to hand to Replit: an HTTPS URL ending in &lt;code&gt;/mcp&lt;/code&gt;, plus the credentials needed to authenticate against it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Security note:&lt;/strong&gt; The MCP endpoint inherits SurrealDB's authentication and permissions. Before you expose anything, create a dedicated database user scoped to just the namespace and database you want Replit to touch, rather than handing over root. SurrealDB enforces record-level and field-level permissions on every query the agent runs, so a properly scoped user cannot read or write beyond what you have granted, even if the agent asks it to.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Connect SurrealDB to Replit
&lt;/h2&gt;

&lt;p&gt;Now switch over to Replit. Because MCP is a standard, you add SurrealDB the same way you would any custom server.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your app in the Project Editor and open the Integrations pane (or go to replit.com/integrations).&lt;/li&gt;
&lt;li&gt;Choose &lt;strong&gt;Add new integration&lt;/strong&gt;, then add a custom MCP server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server URL:&lt;/strong&gt; paste your MCP endpoint, for example &lt;code&gt;https://your-instance.surrealdb.cloud/mcp&lt;/code&gt; or your tunnel URL ending in &lt;code&gt;/mcp&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentication:&lt;/strong&gt; Replit supports OAuth dynamic client registration where a server offers it, or custom headers for static tokens. For a SurrealDB instance, use a custom header with key &lt;code&gt;Authorization&lt;/code&gt; and value &lt;code&gt;Bearer &amp;lt;token&amp;gt;&lt;/code&gt; for your scoped database user. Reserve no-auth endpoints for a throwaway local demo, never for real data.&lt;/li&gt;
&lt;li&gt;Authorize the connection. Replit's security scanner inspects the server's tools, and the connection persists across your apps once approved.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Build an app on your SurrealDB data with Replit
&lt;/h2&gt;

&lt;p&gt;With the connector live, Replit Agent calls SurrealDB's tools to discover your schema and read your records, then generates UI that is wired to that data.&lt;/p&gt;

&lt;p&gt;Start by pulling your data into context with a prompt like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Using my SurrealDB connector, list the tables in the shop/catalog database and show me the fields on the product table.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This prompts Replit to call the &lt;code&gt;list&lt;/code&gt; and &lt;code&gt;info&lt;/code&gt; tools and read the schema resource, then report back what it found. Behind the scenes, &lt;code&gt;use&lt;/code&gt; selects the &lt;code&gt;shop&lt;/code&gt; namespace and &lt;code&gt;catalog&lt;/code&gt; database, and the schema resource at &lt;code&gt;surrealdb://schema/ns/shop/db/catalog/table/product&lt;/code&gt; tells Replit that &lt;code&gt;product&lt;/code&gt; has &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;price&lt;/code&gt;, &lt;code&gt;in_stock&lt;/code&gt;, and &lt;code&gt;created_at&lt;/code&gt; with their exact types.&lt;/p&gt;

&lt;p&gt;Once it understands your schema, ask it to build:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Build a product catalog page that shows every product from SurrealDB as a card with its name, price, and stock status. Add a filter to show only in-stock items.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Replit reads your live products via the &lt;code&gt;select&lt;/code&gt; tool, scaffolds a front end, and binds the components to the real fields. Because the agent knows &lt;code&gt;in_stock&lt;/code&gt; is a boolean from the schema, the filter it builds is correct on the first pass rather than a guess.&lt;/p&gt;

&lt;p&gt;You can go further and let it traverse relationships, which uses SurrealDB's graph capabilities:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Add a detail view for each product that lists its reviews, the rating and body, pulled from the review table that links to the product.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here SurrealDB's record links do the heavy lifting. A SurrealQL query like &lt;code&gt;SELECT *, &amp;lt;~review.{ rating, body } AS reviews FROM product&lt;/code&gt; fetches each product together with its reviews in one round trip. The &lt;code&gt;&amp;lt;~&lt;/code&gt; operator walks incoming record references the same way graph queries do, and Replit issues exactly that through the &lt;code&gt;query&lt;/code&gt; tool.&lt;/p&gt;

&lt;p&gt;When you ask Replit to write data, such as adding a form to submit a new review, the agent reaches for the &lt;code&gt;create&lt;/code&gt; or &lt;code&gt;insert&lt;/code&gt; tool. Because those tools carry the non-read-only annotations, Replit knows they mutate state and can surface a confirmation before anything is written. Your SurrealDB permissions remain the backstop: if the connected user lacks &lt;code&gt;CREATE&lt;/code&gt; permission on &lt;code&gt;review&lt;/code&gt;, the write fails at the database regardless of what the agent attempts.&lt;/p&gt;

&lt;h2&gt;
  
  
  SurrealDB MCP tools reference
&lt;/h2&gt;

&lt;p&gt;Knowing what each tool does tells you exactly what you can ask Replit to do with your data.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;query&lt;/code&gt;&lt;/strong&gt;: run arbitrary SurrealQL. The most powerful tool, and the one behind any complex read or graph traversal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;select&lt;/code&gt;&lt;/strong&gt;: read records from a table, optionally filtered.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;create&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;insert&lt;/code&gt;&lt;/strong&gt;: add new records, with insert geared toward bulk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;upsert&lt;/code&gt;&lt;/strong&gt;: create or update depending on whether the record exists.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;update&lt;/code&gt;&lt;/strong&gt;: modify existing records.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;delete&lt;/code&gt;&lt;/strong&gt;: remove records, which is a destructive operation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;relate&lt;/code&gt;&lt;/strong&gt;: create graph edges between records, SurrealDB's relational strength.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;info&lt;/code&gt;&lt;/strong&gt;: describe the structure of a namespace, database, or table.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;list&lt;/code&gt;&lt;/strong&gt;: enumerate available namespaces, databases, or tables.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;use&lt;/code&gt;&lt;/strong&gt;: select the namespace and database to operate within.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;run&lt;/code&gt;&lt;/strong&gt;: invoke a defined function on the server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The read-only tools (&lt;code&gt;select&lt;/code&gt;, &lt;code&gt;info&lt;/code&gt;, &lt;code&gt;list&lt;/code&gt;) are safe to let an agent call freely. The mutating tools (&lt;code&gt;create&lt;/code&gt;, &lt;code&gt;insert&lt;/code&gt;, &lt;code&gt;upsert&lt;/code&gt;, &lt;code&gt;update&lt;/code&gt;, &lt;code&gt;delete&lt;/code&gt;, &lt;code&gt;relate&lt;/code&gt;) are the ones the hint annotations flag, and the ones your database permissions should govern most tightly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production considerations for SurrealDB with Replit
&lt;/h2&gt;

&lt;p&gt;A few things are worth getting right before you let real users near a SurrealDB-backed Replit app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope the connected user tightly.&lt;/strong&gt; Create a database-level user with only the permissions the app needs. SurrealDB's permission model is enforced on every query, including record-level and field-level &lt;code&gt;SELECT&lt;/code&gt;, &lt;code&gt;CREATE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, and &lt;code&gt;DELETE&lt;/code&gt; permissions, so the agent is constrained by the database, not just by good behavior.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use the limits.&lt;/strong&gt; The MCP environment variables exist to keep a chatty agent from overwhelming your instance. Set a sensible &lt;code&gt;SURREAL_MCP_QUERY_TIMEOUT_SECS&lt;/code&gt; and &lt;code&gt;SURREAL_MCP_MAX_RESULT_BYTES&lt;/code&gt; for your workload.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prefer Cloud or a stable endpoint over a dev tunnel.&lt;/strong&gt; Tunnels work for trying this out, but they are ephemeral. For anything persistent, a SurrealDB Cloud instance, or your own properly secured deployment, is the right home.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep your token out of shared links.&lt;/strong&gt; A Replit install link with an &lt;code&gt;Authorization&lt;/code&gt; header baked in carries a real credential. Generate it for your own use and rotate the token if it leaks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this leaves you
&lt;/h2&gt;

&lt;p&gt;You now have a SurrealDB instance whose schema and data are first-class context for Replit Agent, exposed through a typed, permissioned, observable MCP surface. The same connection that lets Replit build a catalog page would let it scaffold an admin dashboard, a customer-facing storefront, or an internal tool, all reading from and writing to the one database you control.&lt;/p&gt;

&lt;p&gt;That is the shape of the SurrealDB and Replit workflow: SurrealDB is the system of record and the source of truth for structure, and Replit is the interface layer that builds on top of it. MCP is the standard that makes the two speak the same language, with no bespoke integration to maintain on either side. It is what turns vibe coding and agentic coding from a demo trick into a workflow you can run against your own data.&lt;/p&gt;

&lt;p&gt;From here, a few good next steps are to define a SurrealDB function and invoke it from Replit via the &lt;code&gt;run&lt;/code&gt; tool, so business logic lives in the database where the agent can reuse it; to model a richer graph with &lt;code&gt;RELATE&lt;/code&gt; and ask Replit to build views that traverse it; and to move from a dev tunnel to a Cloud instance and tighten your user permissions for a real deployment.&lt;/p&gt;

</description>
      <category>surrealdb</category>
      <category>replit</category>
      <category>mcp</category>
      <category>agents</category>
    </item>
    <item>
      <title>Are we Surreal yet?</title>
      <dc:creator>itsezc</dc:creator>
      <pubDate>Mon, 23 Feb 2026 23:36:04 +0000</pubDate>
      <link>https://dev.to/itsezc/are-we-surreal-yet-1el9</link>
      <guid>https://dev.to/itsezc/are-we-surreal-yet-1el9</guid>
      <description>&lt;p&gt;Updated: 24th February 2026&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is SurrealDB, Really?
&lt;/h2&gt;

&lt;p&gt;SurrealDB is not merely a document store or a graph database. It is a multi-model database engine with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Native authentication and authorization&lt;/li&gt;
&lt;li&gt;Fine-grained access control&lt;/li&gt;
&lt;li&gt;Built-in functions and event triggers&lt;/li&gt;
&lt;li&gt;Graph relationships&lt;/li&gt;
&lt;li&gt;Full-text search&lt;/li&gt;
&lt;li&gt;Vector support for AI workloads&lt;/li&gt;
&lt;li&gt;HTTP + WebSocket APIs&lt;/li&gt;
&lt;li&gt;Embedded and distributed modes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In practice, this means SurrealDB can operate as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your database&lt;/li&gt;
&lt;li&gt;Your auth server&lt;/li&gt;
&lt;li&gt;Your API layer&lt;/li&gt;
&lt;li&gt;Your realtime engine&lt;/li&gt;
&lt;li&gt;Your business logic runtime&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In other words: a backend-as-a-service without the typical SaaS constraints.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Can you replace your existing backend with SurrealDB?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In many cases: yes.&lt;/p&gt;

&lt;p&gt;Especially for greenfield projects, SurrealDB can meaningfully reduce or eliminate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Custom API servers&lt;/li&gt;
&lt;li&gt;ORMs and migration tooling&lt;/li&gt;
&lt;li&gt;Separate auth services&lt;/li&gt;
&lt;li&gt;GraphQL layers&lt;/li&gt;
&lt;li&gt;Realtime brokers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Permissions are defined at the schema level.&lt;/li&gt;
&lt;li&gt;Business logic can live inside database functions.&lt;/li&gt;
&lt;li&gt;Relationships are first-class.&lt;/li&gt;
&lt;li&gt;Queries are expressive enough to replace many REST handlers.&lt;/li&gt;
&lt;li&gt;WebSocket subscriptions provide live updates natively.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The developer experience is unusually cohesive. You model your data, define permissions, write logic, and expose it all in one place.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Bigger Vision
&lt;/h2&gt;

&lt;p&gt;Traditional backend architecture looks like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Frontend → API Server → Auth Server → Cache → Database → Queue → Worker → Storage&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The Surreal-first architecture trends toward:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Frontend → SurrealDB&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;With schema, permissions, logic, relationships, and realtime transport unified. The question is not whether SurrealDB can replace parts of your backend. It already can.&lt;/p&gt;

&lt;p&gt;The real question is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How far can we push it before we need anything else?&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Extensions (Surrealism)&lt;/td&gt;
&lt;td&gt;User defined extensions&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auth&lt;/td&gt;
&lt;td&gt;Authentication &amp;amp; Authorization with Permissions&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Functions&lt;/td&gt;
&lt;td&gt;User defined functions&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API Endpoints&lt;/td&gt;
&lt;td&gt;User defined API endpoints&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Events&lt;/td&gt;
&lt;td&gt;Triggered by Table CRUD events&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;File Storage (Buckets)&lt;/td&gt;
&lt;td&gt;Store Files in Buckets&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;S3 Remote is Enterprise Only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Live Queries &amp;amp; Changefeeds&lt;/td&gt;
&lt;td&gt;Real-time data updates&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Graphs (Edges)&lt;/td&gt;
&lt;td&gt;Graph tables&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Record Versions&lt;/td&gt;
&lt;td&gt;Time-series&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;SurrealKV only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full-text Search&lt;/td&gt;
&lt;td&gt;Multi-language and algorithm ready&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Geometry Fields&lt;/td&gt;
&lt;td&gt;GeoJSON&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vector Embeddings&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RAG &amp;amp; Graph RAG&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Embedded Mode&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;via WASM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GraphQL API&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;⚠️&lt;/td&gt;
&lt;td&gt;In-progress&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Surreal AI&lt;/td&gt;
&lt;td&gt;LLM Model calls&lt;/td&gt;
&lt;td&gt;⚠️&lt;/td&gt;
&lt;td&gt;In-progress&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Opentelemetry&lt;/td&gt;
&lt;td&gt;Producer &amp;amp; Datastore&lt;/td&gt;
&lt;td&gt;⚠️&lt;/td&gt;
&lt;td&gt;Producer only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rate Limiting&lt;/td&gt;
&lt;td&gt;for Tables, Fields and Functions&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;Remote HTTP APIs abusable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WebAuthn&lt;/td&gt;
&lt;td&gt;Password-less Auth flows&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OAuth &amp;amp; OpenID Server&lt;/td&gt;
&lt;td&gt;Create multi-tenant OAuth services&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cron Jobs&lt;/td&gt;
&lt;td&gt;Scheduled tasks&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sync&lt;/td&gt;
&lt;td&gt;Offline-first CRDT sync mechanism&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Message Queue&lt;/td&gt;
&lt;td&gt;Pub / Sub system&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Child Databases&lt;/td&gt;
&lt;td&gt;Schema-copied databases for SaaS apps&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Branching&lt;/td&gt;
&lt;td&gt;Copy-on-Write clone of your database&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Incremental Backups&lt;/td&gt;
&lt;td&gt;Faster and cheaper backups overtime&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;Planned&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  SurrealKV
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Encryption at REST&lt;/td&gt;
&lt;td&gt;AES-GCM/XChachaPoly1305&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;via KMS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Distributed&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;Enterprise Only&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Ecosystem
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Dashboard (Surrealist)&lt;/td&gt;
&lt;td&gt;Manage Database instance via UI&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Helm Chart&lt;/td&gt;
&lt;td&gt;Kubernetes deployment&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Migrations &amp;amp; Seeding&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;Third-party&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VSCode Extension&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;Third-party&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Zed Extension&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;Third-party&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Documentation
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Documentation&lt;/td&gt;
&lt;td&gt;Full documentation&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;in English&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;University&lt;/td&gt;
&lt;td&gt;Course platform&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>surrealdb</category>
    </item>
  </channel>
</rss>
