
Fastmcp Sqltools
Connects to PostgreSQL, MySQL, or SQLite databases through a single DATABASE_URL environment variable and exposes four tools: list_tables for discovery, get_table_schema for inspecting columns and constraints, execute_query for writes and DDL, and execute_safe_query for read-only selects with safety guards. Built with FastMCP and async database drivers (asyncpg, aiomysql, aiosqlite). You'd reach for this when you want Claude to query and modify databases directly without writing custom scripts. The server auto-detects database type from your connection string, so switching between PostgreSQL for production and SQLite for local testing just means changing one environment variable.
- GitHub stars
- 1
- tools
- 4
- transport
- STDIO
- last updated
- Jan 5, 2026
Tools
4 toolsPublic tool metadata for what this MCP can expose to an agent.
list_tablesList all tables in the database
List all tables in the database
No parameter schema in public metadata yet.
get_table_schemaGet detailed schema information for a table including columns, types, constraints, and indexes
Get detailed schema information for a table including columns, types, constraints, and indexes
No parameter schema in public metadata yet.
execute_queryExecute any SQL query (INSERT, UPDATE, DELETE, DDL, etc.)
Execute any SQL query (INSERT, UPDATE, DELETE, DDL, etc.)
No parameter schema in public metadata yet.
execute_safe_queryExecute read-only SELECT queries with additional safety checks
Execute read-only SELECT queries with additional safety checks
No parameter schema in public metadata yet.
Sponsors
Readme
FastMCP SQL Tools
mcp-name: io.github.atarkowska/fastmcp-sqltools
A Model Context Protocol (MCP) server built with FastMCP that provides SQL database access with support for PostgreSQL, MySQL, and SQLite.
Features
- list_tables: List all tables in the database
- get_table_schema: Get detailed schema information for a table including columns, types, constraints, and indexes
- execute_query: Execute any SQL query (INSERT, UPDATE, DELETE, DDL, etc.)
- execute_safe_query: Execute read-only SELECT queries with additional safety checks
Supported Databases
- PostgreSQL: Full support via asyncpg
- MySQL: Full support via aiomysql
- SQLite: Full support via aiosqlite
The server automatically detects the database type from the DATABASE_URL environment variable.
Configuration
Add the following to your claude_desktop_config.json:
Details
- Repository
- github.com/atarkowska/fastmcp-sqltools
- Category
- Databases
- Package
fastmcp-sqltools- Transport
- STDIO
- Registry
- MCP registry, active