MCP server connection
Connect to MCP servers from SQL with optional headers and transport settings.
Tool calling
SQLite-MCP integrates the Model Context Protocol so databases can connect to MCP servers, list tools, and invoke them directly.
SQLite-MCP
SQLite-native extension
Best for
SQL tool calls
Repository
GitHubProject
SQLite-MCP is a SQLite extension built around the Model Context Protocol Rust SDK. It lets SQLite connect to MCP servers and call tools from SQL.
It gives local apps, agents, and workflows a direct bridge from database state to external tool execution without introducing another application service layer.
Why it matters
Capabilities
Connect to MCP servers from SQL with optional headers and transport settings.
Inspect available tools and schemas with `mcp_list_tools_json()`.
Invoke tools with structured arguments using `mcp_call_tool_json()`.
Use cached and streaming virtual tables for tool lists and responses.
Use Streamable HTTP by default, with SSE support for older MCP servers.
Pre-built binaries target macOS, Linux, Windows, Android, and iOS, with Flutter and Dart packages.
Sample code
Connect to a local MCP server, inspect its tools, and call one with JSON arguments.
-- Load SQLite-MCP
.load ./dist/mcp.dylib
SELECT mcp_version();
SELECT mcp_connect('http://localhost:8000/mcp');
-- {"status": "connected", "transport": "streamable_http"}
SELECT mcp_list_tools_json();
SELECT mcp_call_tool_json(
'airbnb_search',
'{"location": "Rome", "maxPrice": 100}'
);