db-tools-mcp
Provides connectivity to Snowflake databases through a SQL Server linked server, enabling schema exploration, table/column metadata retrieval, foreign key discovery, and stored procedure management without executing live queries on every request.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@db-tools-mcplist tables in dbo schema"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
db-tools-mcp
MCP server that exposes SQL Server and Snowflake schema metadata to AI coding agents. It caches table/column/FK information locally and provides tools for searching schemas, finding join paths, and managing database connections — all without running live queries on every request.
Quick start
1. Install and run with uvx
uvx db-tools-mcpOr install with pip:
pip install db-tools-mcp
db-tools-mcpOr install locally for development:
git clone https://github.com/urjeetpatel/db-tools-mcp.git
cd db-tools-mcp
uv sync
uv run db-tools-mcp2. Register with your MCP client
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"db-tools": {
"command": "uvx",
"args": ["db-tools-mcp"]
}
}
}Claude Code (.mcp.json in your project root):
{
"mcpServers": {
"Db_Tools": {
"command": "uvx",
"args": ["db-tools-mcp"]
}
}
}3. Add your first database
Use the add_database tool through your MCP client:
add_database(
name="my_db",
db_type="sqlserver",
url="mssql+pyodbc:///?odbc_connect=DRIVER=ODBC Driver 17 for SQL Server;Server=myhost;Database=MyDB;Trusted_Connection=Yes;"
)Or copy the example config manually:
# Linux / macOS
mkdir -p ~/.config/db-tools
cp config.example.yaml ~/.config/db-tools/config.yaml
# Windows (PowerShell)
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.config\db-tools"
Copy-Item config.example.yaml "$env:USERPROFILE\.config\db-tools\config.yaml"Then edit ~/.config/db-tools/config.yaml with your connection details.
4. Populate the cache
refresh_metadata() # all sources
refresh_metadata(source="my_db") # one sourceOr from the command line:
uvx db-tools-refresh
db-tools-refresh --source my_db # if installed locallyRelated MCP server: RunContext
Tools
Read tools (safe, use cached data)
Tool | Description |
| List cached database sources |
| List schemas in a source |
| List tables in a schema |
| Get columns + FK relationships |
| SQL dialect ( |
| All FKs in a schema |
| FK joins between two tables |
| Multi-hop join path suggestions |
| Search table names |
| Search column names |
Stored procedure tools
Tool | Description |
| List stored procedure names in a schema |
| Get SP metadata: parameters, dates, and definition |
| Search SP names (case-insensitive, optional schema filter) |
| Search SP body text for a keyword; returns matching procedures with a one-line excerpt |
| Generate a SQL or Python call template for an SP |
| Write SP definition (SQL only) to a file; returns resolved path + line count |
export_stored_procedure writes the raw SQL definition only — no JSON wrapper. The output_file must be an absolute path to a writable location; writes to system directories, network paths, drive roots, and the db-tools config directory are blocked.
Admin tools (require confirmation)
Tool | Description |
| Add a source to config + test connection |
| Re-scan live databases (throttled to 1/day) |
Configuration
Config and cache live in ~/.config/db-tools/ (XDG standard):
~/.config/db-tools/
config.yaml # database connections
metadata_cache/ # cached JSON per source
.refresh_state.json # last-refresh timestamps
server.log # MCP server logsOverride the location with DB_TOOLS_CONFIG_DIR or XDG_CONFIG_HOME:
DB_TOOLS_CONFIG_DIR=/custom/path db-tools-mcpSupported source types
SQL Server (direct ODBC):
my_db:
enabled: true
url: "mssql+pyodbc:///?odbc_connect=DRIVER=ODBC Driver 17 for SQL Server;Server=host;Database=db;Trusted_Connection=Yes;"
include_schemas: ["*"]
exclude_schemas: [INFORMATION_SCHEMA, sys, db_owner, ...]Snowflake (via SQL Server linked server / OPENQUERY):
my_snowflake:
enabled: true
sqlserver_url: "mssql+pyodbc:///?odbc_connect=..."
linked_server: "SNOWFLAKE"
database: "MY_SNOWFLAKE_DB"
include_schemas: ["*"]
exclude_schemas: [INFORMATION_SCHEMA]Requirements
Python >= 3.11
ODBC Driver 17 for SQL Server (for SQL Server and Snowflake-via-linked-server connections)
Network access to the target databases
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/urjeetpatel/db-tools-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server