mcp-db-wrapper-example
mcp-db-wrapper-example
foro.sh データベーススターター:小さなSQLデータベースをラップするMCPサーバーです。すぐにクエリできるように1つのデモテーブル(notes)が付属しており、AIコーディングエージェントが読み書きできるツールが用意されています。
これをClaude Codeで開く? インストールは不要です。このリポジトリには、エージェントが必要とするスキルが
.claude/skills/に同梱されています。このサーバーのデプロイ方法と、モデルにとってコストに見合うツールの追加方法が含まれています。
デプロイ前の準備
何も設定しなければ、このサーバーはローカルのSQLiteファイル上で動作し、再起動や再デプロイのたびにデータは消去されます。試す分には問題ありませんが、重要なデータには使えません。
データを保持したい場合は、プロジェクトの Secrets タブに DATABASE_URL をシークレットとして設定してください(あなたが管理するボリューム上のファイルを指す sqlite:/// URL)。まったく別の種類のデータベースを使う場合は、下記のStorageを参照してください。
Related MCP server: sqlite-mcp
ツール
ツール | 機能 |
| データベース内のすべてのテーブルを表示 |
| 読み取りクエリ( |
| テーブルに1行を追加 |
あなたのものに変える
これは完成品ではなく出発点です。このリポジトリをClaude Code(または他のAIコーディングエージェント)で開き、次のように依頼してください:
プロジェクトに必要なテーブルを追加する
生の
query/insertだけでなく、データに対して特定の操作を行うツールを追加する(例:find_customer(email)、log_event(...))実際のデータベースを用意したらそれを指すようにする(下記のStorage参照)
これらを行うためにFastMCPやModel Context Protocolを知る必要はありません。やりたいことを平易な言葉で説明すれば、エージェントがコードを書いてくれます。
Storage
データベースの種類は pyproject.toml で宣言されています:
[tool.mcp-db-wrapper]
database = "sqlite"server.py はこれを読み取り、DATABASE_URL が一致しない場合(例えば database = "sqlite" なのに非 sqlite:/// URL の場合)は起動を拒否します。なぜなら、型は設定であり、設定されているURLから推測されるものではないからです。
デフォルトでは、DATABASE_URL シークレットがない場合、/tmp/db.sqlite3 で動作します。自動的に作成され、セットアップ不要ですが、再起動と再デプロイのたびに消去されます(プラットフォームは永続ボリュームをマウントしません)。データを保持するには、DATABASE_URL をあなたが管理するボリューム上の sqlite:/// パスに設定してください。まったく別の種類のデータベース(例:Postgres)を使う場合は、コーディングエージェントに適切なドライバに切り替えさせ、上記の database も合わせて更新するよう依頼してください。
ローカルで実行する
uv run server.pyサーバーはストリーミング可能なHTTP上でMCPを提供し、http://localhost:8000/mcp で待ち受けます(ポートを変更するには PORT を設定してください。foroがデプロイ時に注入する名前と同じです)。
デプロイする
pyproject.toml はforo.shが必要とするすべてを備えているため、このリポジトリはそのままデプロイできます。サインインして、このリポジトリを選び、デプロイしてください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI assistants to create and manage persistent SQLite databases through natural language without requiring SQL knowledge. It allows users to propose schemas, store records, and perform complex queries across multiple databases for structured data tracking.MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI agents to interact with SQLite databases by querying schemas, executing SQL, and inspecting table metadata. It supports safe database access through configurable read-only modes, query timeouts, and dry-run execution plans.MIT
- FlicenseNot gradedqualityBmaintenanceAn MCP server that exposes relational databases (PostgreSQL/MySQL) to AI agents with natural language to SQL query support.19
- FlicenseNot gradedqualityDmaintenanceMCP server that provides SQLite database operations. Allows AI assistants to query, modify and manage SQLite databases through the Model Context Protocol.
Related MCP Connectors
GibsonAI MCP server: manage your databases with natural language
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/foro-sh/mcp-db-wrapper-example'
If you have feedback or need assistance with the MCP directory API, please join our Discord server