{"id":40958043,"url":"https://github.com/sqliteai/sqlite-mcp","last_synced_at":"2026-01-22T05:39:34.703Z","repository":{"id":327439949,"uuid":"1100623573","full_name":"sqliteai/sqlite-mcp","owner":"sqliteai","description":"A SQLite extension that integrates the Model Context Protocol, enabling SQLite databases to connect to MCP servers and call their tools.","archived":false,"fork":false,"pushed_at":"2025-12-23T09:51:49.000Z","size":2686,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-08T14:08:31.315Z","etag":null,"topics":["ai","llm","mcp","sqlite"],"latest_commit_sha":null,"homepage":"https://sqlite.ai","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sqliteai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-20T14:30:43.000Z","updated_at":"2025-12-26T08:13:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sqliteai/sqlite-mcp","commit_stats":null,"previous_names":["sqliteai/sqlite-mcp"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/sqliteai/sqlite-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqliteai%2Fsqlite-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqliteai%2Fsqlite-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqliteai%2Fsqlite-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqliteai%2Fsqlite-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sqliteai","download_url":"https://codeload.github.com/sqliteai/sqlite-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqliteai%2Fsqlite-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28656439,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","llm","mcp","sqlite"],"created_at":"2026-01-22T05:39:34.453Z","updated_at":"2026-01-22T05:39:34.686Z","avatar_url":"https://github.com/sqliteai.png","language":"C","readme":"# SQLite MCP\n\nA SQLite extension that integrates the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) Rust SDK, enabling SQLite databases to connect to MCP servers and call their tools.\n\n## 🚀 Quick Start\n\n### Installation\n\n#### Pre-built Binaries\n\nDownload for your platform: **macOS**, **Linux**, **Windows**, **Android**, and **iOS**.\n\n### Basic Usage\n\n```sql\n-- Load the extension\n.load ./dist/mcp.dylib\n\n-- Check version\nSELECT mcp_version();\n-- 0.1.0\n\n-- Connect to an MCP server\nSELECT mcp_connect('http://localhost:8000/mcp');\n-- {\"status\": \"connected\", \"transport\": \"streamable_http\"}\n\n-- List available tools\nSELECT mcp_list_tools_json();\n-- Returns JSON with tool schemas\n\n-- Call a tool\nSELECT mcp_call_tool_json('airbnb_search', '{\"location\": \"Rome\", \"maxPrice\": 100}');\n-- Returns search results\n```\n\n## 📖 API Reference\n\n### Available Functions\n\n| Function | Description |\n|----------|-------------|\n| `mcp_version()` | Returns extension version |\n| `mcp_connect(url, [headers], [sse])` | Connect to MCP server with optional custom headers |\n| `mcp_list_tools_json()` | List available tools with schemas |\n| `mcp_call_tool_json(name, args)` | Call a tool on the MCP server |\n| `mcp_list_tools_respond` | Virtual table (cached) that returns each tool as a row with structured columns |\n| `mcp_call_tool_respond(name, args)` | Virtual table that extracts text results from tool calls |\n| `mcp_list_tools` | Streaming virtual table that returns tools as they arrive |\n| `mcp_call_tool(name, args)` | Streaming virtual table for real-time tool results |\n\nSee [API.md](API.md) for complete API documentation with examples.\n\n## 🏗️ Building from Source\n\n### Requirements\n\n- **Rust**: 1.85+ toolchain\n- **C Compiler**: gcc or clang\n- **Make**: GNU Make\n\n### Build Instructions\n\n```bash\n# Clone the repository\ngit clone https://github.com/sqliteai/sqlite-mcp.git\ncd sqlite-mcp\n\n# Initialize submodules\ngit submodule update --init --recursive\n\n# Build the extension\nmake\n```\n\nThe compiled extension will be in `dist/mcp.{dylib,so,dll}`.\n\n## 🔧 Transport Protocols\n\nThe extension supports two MCP transport protocols:\n\n### Streamable HTTP (Default)\nModern streaming HTTP transport for MCP servers.\n```sql\nSELECT mcp_connect('http://localhost:8000/mcp');\n```\n\n### SSE (Legacy)\nServer-Sent Events for compatibility with older servers.\n```sql\nSELECT mcp_connect('http://localhost:8931/sse', 1);\n```\n\n## 🚦 Quick Usage Example\n\n```c\n#include \u003csqlite3.h\u003e\n#include \u003cstdio.h\u003e\n\nint main() {\n    sqlite3 *db;\n    sqlite3_open(\":memory:\", \u0026db);\n    sqlite3_enable_load_extension(db, 1);\n    sqlite3_load_extension(db, \"./dist/mcp\", NULL, NULL);\n\n    sqlite3_stmt *stmt;\n\n    // Connect to MCP\n    sqlite3_prepare_v2(db,\n        \"SELECT mcp_connect('http://localhost:8000/mcp')\",\n        -1, \u0026stmt, NULL);\n    sqlite3_step(stmt);\n    printf(\"Connected: %s\\n\", sqlite3_column_text(stmt, 0));\n    sqlite3_finalize(stmt);\n\n    // Call tool\n    sqlite3_prepare_v2(db,\n        \"SELECT mcp_call_tool_json('airbnb_search', '{\\\"location\\\": \\\"NYC\\\"}')\",\n        -1, \u0026stmt, NULL);\n    if (sqlite3_step(stmt) == SQLITE_ROW) {\n        printf(\"Result: %s\\n\", sqlite3_column_text(stmt, 0));\n    }\n    sqlite3_finalize(stmt);\n\n    sqlite3_close(db);\n    return 0;\n}\n```\n\nSee [USAGE.md](USAGE.md) for complete usage examples.\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📄 License\n\nMIT License - See [LICENSE](LICENSE) for details\n\n## 🔗 Related Projects\n\n- [sqlite-agent](https://github.com/sqliteai/sqlite-agent) - A powerful AI agent for SQLite\n- [sqlite-ai](https://github.com/sqliteai/sqlite-ai) - LLM integration for SQLite\n- [sqlite-vector](https://github.com/sqliteai/sqlite-vector) - Vector search extension\n- [sqlite-sync](https://github.com/sqliteai/sqlite-sync) - Cloud synchronization\n- [sqlite-js](https://github.com/sqliteai/sqlite-js) - JavaScript engine integration\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqliteai%2Fsqlite-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsqliteai%2Fsqlite-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqliteai%2Fsqlite-mcp/lists"}