
panasenco/mcp-sqlite
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
MCP server for SQLite files. Supports Datasette-compatible metadata!
概要
Provide useful data to AI agents without giving them access to external systems. Compatible with Datasette for human users! - AI agents can get the structure of all tables and columns in the SQLite database in one command - sqlite_get_catalog. - The catalog can be enriched with descriptions for the tables and columns using a simple YAML or JSON metadata file. - The same metadata file can contain canned queries to the AI to use. Each canned query will be turned into a separate MCP tool sqlite_execute_main_{tool name}. - AI agents can execute arbitrary SQL queries with sqlite_execute. 1. Install uv. 2. Install Visual Studio Code if you don't already have it. Turn on GitHub Copilot. 3. Open this repo in VS Code. Open a GitHub Copilot agent mode chat. Check the available tools - you should see MCP Server: sqlite_sample with three available tools. 4. You should be able to ask Copilot in agent mode a question like "Get Titanic survivors of age 28" and get a response. 5.
README
以下は原文 README の抜粋です。原文を見る。
mcp-sqlite
Provide useful data to AI agents without giving them access to external systems. Compatible with Datasette for human users!
Features
- AI agents can get the structure of all tables and columns in the SQLite database in one command -
sqlite_get_catalog.- The catalog can be enriched with descriptions for the tables and columns using a simple YAML or JSON metadata file.
- The same metadata file can contain canned queries to the AI to use.
Each canned query will be turned into a separate MCP tool
sqlite_execute_main_{tool name}. - AI agents can execute arbitrary SQL queries with
sqlite_execute.
Quickstart using Visual Studio Code
-
Install uv.
-
Install Visual Studio Code if you don’t already have it. Turn on GitHub Copilot.
-
Open this repo in VS Code. Open a GitHub Copilot agent mode chat. Check the available tools - you should see MCP Server: sqlite_sample with three available tools.

-
You should be able to ask Copilot in agent mode a question like “Get Titanic survivors of age 28” and get a response.

-
Use the sample MCP configuration file mcp.json and the sample metadata file titanic.yml as a starting point for your own configuration.
Interactive exploration with MCP Inspector and Datasette
The same database and metadata files can be used to explore the data interactively with MCP Inspector and Datasette.
| MCP Inspector | Datasette |
|---|---|
![]() |
![]() |
![]() |
![]() |
MCP Inspector
Use the MCP Inspector dashboard to interact with the SQLite database the same way that an AI agent would:
- Install npm.
- Run:
npx @modelcontextprotocol/inspector uvx mcp-sqlite sample/titanic.db --metadata sample/titanic.yml
Datasette
Since mcp-sqlite metadata is compatible with the Datasette metadata file, you can also explore your data with Datasette:
uvx datasette serve sample/titanic.db --metadata sample/titanic.yml
Compatibility with Datasette allows both AI agents and humans to easily explore the same local data!
インストール
npx @modelcontextprotocol/inspector uvx mcp-sqlite sample/titanic.db --metadata sample/titanic.yml


