- QUERY
- FETCH
- LOGIC
- HUMAN
Short answer
How can I run SurrealQL queries with my AI?
You connect your agent to SurrealDB, allowing it to run raw SQL, fetch specific records, or pull entire tables. You'll get direct control over your data through your chat interface.
Data outcomes
What you get from your agent
The agent handles the heavy lifting of database interaction.
QUERY
Direct SQL execution
The agent runs SurrealQL to handle complex logic. You get the query results immediately in your chat.
FETCH
Instant data retrieval
Your agent pulls specific records or entire tables. This makes inspecting your schema or data state fast.
LOGIC
Automated data management
The agent manages data manipulation based on your instructions. It handles the syntax so you don't have to.
HUMAN
Manual verification
You review the agent's work before finalizing changes. This keeps you in control of your production data.
The workflow
What your AI does when <the thing arrives>.
The agent translates your text into database commands.
Analyze request
The agent determines if your request requires a specific record lookup or a broader data pull.
select_recordFetch data
The agent pulls the necessary information from your tables to understand the current database state.
select_allRun commands
The agent executes the exact SurrealQL needed to perform the requested logic or updates.
execute_sqlConfirm state
The agent verifies the operation by checking the updated data in the database.
select_all
Try it
Copy these to start.
Use these prompts to begin interacting with your database.
Starting points
Swap the table or record names for your own identifiers.
SurrealDB Connector
You're all set. Choose your MCP client and follow the setup instructions.
https://edge.vinkius.com/vk_preview_z8y2X9S7Lg9neGU4YlezuYLhsuJbWmTxMe30Ga4Q/mcpClaude Desktop
Follow the steps below to connect in seconds.
- 1In Claude Desktop, open Settings → Connectors.
- 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
- 3Click Add and start a new chat — SurrealDB capabilities are ready to use.
{
"mcpServers": {
"surrealdb-mcp": {
"url": "https://edge.vinkius.com/vk_preview_z8y2X9S7Lg9neGU4YlezuYLhsuJbWmTxMe30Ga4Q/mcp"
}
}
}Show me all the records in the 'users' table.
Find the user with id 'customer_99'.
Update the 'status' field to 'active' for all users in the 'accounts' table.
List everything in the 'transactions' table.
Claude
ChatGPT
Cursor
VS Code
Windsurf
Claude Code
JetBrains
Cline
Start here
Connect SurrealDB once, then ask.
One connection links your agent to your database. Your credentials stay encrypted, and the full walkthrough lives on the Connector page.
Connect SurrealDB to your AIFAQ
How this task behaves
- 01
Can my AI delete records?
No. The available tools only allow for executing SQL, selecting all records, or selecting a specific record. There is no tool for deletion.
- 02
Does the AI write the SurrealQL for me?
Yes. You describe the intent, and the agent uses the execution tool to run the correct syntax.
- 03
Can I use this to create new tables?
Yes, you can use the execution tool to run table creation statements.
- 04
Will the AI change my database schema?
The agent can run schema-altering SQL, but you should always review the query before it runs.
- 05
Does the AI have access to my raw credentials?
No. Vinkius manages the connection securely so your agent only uses the tools provided.
More questions about SurrealDB? See everything the SurrealDB Connector can do
Connect SurrealDB to Claude, Cursor, ChatGPT & more
