SurrealDB MCP Server for Vercel AI SDKGive Vercel AI SDK instant access to 16 tools to Create Record, Create Specific Record, Delete All, and more
The Vercel AI SDK is the TypeScript toolkit for building AI-powered applications. Connect SurrealDB through Vinkius and every tool is available as a typed function. ready for React Server Components, API routes, or any Node.js backend.
Ask AI about this MCP Server for Vercel AI SDK
The SurrealDB MCP Server for Vercel AI SDK is a standout in the Databases category — giving your AI agent 16 tools to work with, ready to go from day one.
Vinkius delivers Streamable HTTP and SSE to any MCP client
import { createMCPClient } from "@ai-sdk/mcp";
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
async function main() {
const mcpClient = await createMCPClient({
transport: {
type: "http",
// Your Vinkius token. get it at cloud.vinkius.com
url: "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
},
});
try {
const tools = await mcpClient.tools();
const { text } = await generateText({
model: openai("gpt-4o"),
tools,
prompt: "Using SurrealDB, list all available capabilities.",
});
console.log(text);
} finally {
await mcpClient.close();
}
}
main();
* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure
About SurrealDB MCP Server
Connect your SurrealDB database to any AI agent and take full control of your data layer through natural conversation.
The Vercel AI SDK gives every SurrealDB tool full TypeScript type inference, IDE autocomplete, and compile-time error checking. Connect 16 tools through Vinkius and stream results progressively to React, Svelte, or Vue components. works on Edge Functions, Cloudflare Workers, and any Node.js runtime.
What you can do
- SurrealQL Execution — Run raw SurrealQL statements using the
execute_sqltool for complex queries and logic. - Record Management — Create, update, and modify records in specific tables with tools like
create_record,update_record, ormodify_record. - Table Operations — Quickly
select_allordelete_allrecords from a target table to manage your data at scale. - Health Monitoring — Check server status and health metrics using
get_statusandget_healthto ensure uptime. - Data Portability — Use
import_sqlandexport_datato move information in and out of your instance seamlessly.
The SurrealDB MCP Server exposes 16 tools through the Vinkius. Connect it to Vercel AI SDK in under two minutes — credentials fully managed, no infrastructure to provision, no vendor lock-in. Your configuration, your data, your control.
All 16 SurrealDB tools available for Vercel AI SDK
When Vercel AI SDK connects to SurrealDB through Vinkius, your AI agent gets direct access to every tool listed below — spanning multi-model, surrealql, graph-database, and more. Every call runs in a secure, isolated environment with full audit visibility. Beyond a simple connection, you get real-time monitoring of agent activity, enterprise governance, and optimized token usage.
Create record on SurrealDB
Create a record with a random ID
Create specific record on SurrealDB
Create a specific record
Delete all on SurrealDB
Delete all records in a table
Delete record on SurrealDB
Delete a specific record
Execute sql on SurrealDB
Can pass variables via URL query parameters. Execute SurrealQL statements
Export data on SurrealDB
Export data
Get health on SurrealDB
Check SurrealDB health
Get status on SurrealDB
Check SurrealDB web server status
Get version on SurrealDB
Get SurrealDB version
Import sql on SurrealDB
Import SurrealQL queries
Modify all on SurrealDB
Modify all records in a table (Merge)
Modify record on SurrealDB
Modify a specific record (Merge)
Select all on SurrealDB
Select all records in a table
Select record on SurrealDB
Select a specific record
Update all on SurrealDB
Update all records in a table
Update record on SurrealDB
Update a specific record
Connect SurrealDB to Vercel AI SDK via MCP
Follow these steps to wire SurrealDB into Vercel AI SDK. The entire setup takes under two minutes — your credentials stay safe behind Vinkius.
Install dependencies
npm install @ai-sdk/mcp ai @ai-sdk/openaiReplace the token
[YOUR_TOKEN_HERE] with your Vinkius tokenRun the script
agent.ts and run with npx tsx agent.tsExplore tools
Why Use Vercel AI SDK with the SurrealDB MCP Server
Vercel AI SDK provides unique advantages when paired with SurrealDB through the Model Context Protocol.
TypeScript-first: every MCP tool gets full type inference, IDE autocomplete, and compile-time error checking out of the box
Framework-agnostic core works with Next.js, Nuxt, SvelteKit, or any Node.js runtime. same SurrealDB integration everywhere
Built-in streaming UI primitives let you display SurrealDB tool results progressively in React, Svelte, or Vue components
Edge-compatible: the AI SDK runs on Vercel Edge Functions, Cloudflare Workers, and other edge runtimes for minimal latency
SurrealDB + Vercel AI SDK Use Cases
Practical scenarios where Vercel AI SDK combined with the SurrealDB MCP Server delivers measurable value.
AI-powered web apps: build dashboards that query SurrealDB in real-time and stream results to the UI with zero loading states
API backends: create serverless endpoints that orchestrate SurrealDB tools and return structured JSON responses to any frontend
Chatbots with tool use: embed SurrealDB capabilities into conversational interfaces with streaming responses and tool call visibility
Internal tools: build admin panels where team members interact with SurrealDB through natural language queries
Example Prompts for SurrealDB in Vercel AI SDK
Ready-to-use prompts you can give your Vercel AI SDK agent to start working with SurrealDB immediately.
"Check the health and version of my SurrealDB server."
"Select all records from the 'users' table."
"Execute a SurrealQL query to find all posts where status is 'published'."
Troubleshooting SurrealDB MCP Server with Vercel AI SDK
Common issues when connecting SurrealDB to Vercel AI SDK through Vinkius, and how to resolve them.
createMCPClient is not a function
npm install @ai-sdk/mcpSurrealDB + Vercel AI SDK FAQ
Common questions about integrating SurrealDB MCP Server with Vercel AI SDK.
How does the Vercel AI SDK connect to MCP servers?
createMCPClient from @ai-sdk/mcp and pass the server URL. The SDK discovers all tools and provides typed TypeScript interfaces for each one.Can I use MCP tools in Edge Functions?
Does it support streaming tool results?
useChat and streamText that handle tool calls and display results progressively in the UI.Explore More MCP Servers
View all →
GSA Per Diem Rates
6 toolsAccess official U.S. government per diem rates for lodging and meals by city, state, or ZIP code directly from your AI agent.

PreciseFP
13 toolsCollect client financial data digitally with compliant intake forms designed for wealth management and financial planning firms.

Aero Workflow
12 toolsOrganize accounting firm tasks, track client work, and manage team workloads with purpose-built practice management.

Checkfront
8 toolsManage tour bookings, activity availability, rental items, customers, and categories for your Checkfront platform through natural conversation.
