Tool calling

Connect SQLite to MCP servers and call tools from SQL.

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

GitHub

Project

What it is

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

Coordinate agents
at the SQL layer.

Agents increasingly coordinate through tools, but their state often lives in databases. SQLite-MCP brings those two worlds together at the SQL layer.
That makes it possible to inspect available tools, call them, store results, and combine tool output with local data in one portable SQLite workflow.

Capabilities

Features and characteristics

MCP server connection

Connect to MCP servers from SQL with optional headers and transport settings.

JSON tool listing

Inspect available tools and schemas with `mcp_list_tools_json()`.

JSON tool calls

Invoke tools with structured arguments using `mcp_call_tool_json()`.

Virtual tables

Use cached and streaming virtual tables for tool lists and responses.

Transport support

Use Streamable HTTP by default, with SSE support for older MCP servers.

Cross-platform builds

Pre-built binaries target macOS, Linux, Windows, Android, and iOS, with Flutter and Dart packages.

Sample code

Call an MCP tool from SQLite

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}'
);
Subscribe to our newsletter
The latest news, articles, and resources, sent to your inbox.

© 2026 SQLite Cloud, Inc. All rights reserved.