legion-mcp
by TheRaLabs·★ 91·Score 41
A MCP server providing unified database access across PostgreSQL, MySQL, SQL Server and others via the Legion Query Runner.
Overview
This MCP server enables AI assistants to interact with multiple database types through a consistent interface. It supports PostgreSQL, MySQL, SQL Server, BigQuery, Oracle, and others, exposing database operations as MCP tools, resources, and prompts. The server uses the Legion Query Runner library for database connections and provides both single and multi-database configuration options with secure credential management.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this MCP server when you need unified access to multiple database types and want to integrate database operations into AI assistants without learning different client libraries.
When NOT to choose this
Avoid this if you need write access to databases or require advanced query optimization features, as this appears to be focused primarily on read operations.
Tools this server exposes
10 tools extracted from the READMEexecute_queryExecute a SQL query and return results as a markdown table
execute_query_jsonExecute a SQL query and return results as JSON
get_table_columnsGet column names for a specific table
get_table_typesGet column types for a specific table
get_query_historyGet the recent query history
list_databasesList all available database connections
get_database_infoGet detailed information about a database including schema
find_tableFind which database contains a specific table
describe_tableGet detailed description of a table including column names and types
get_table_sampleGet a sample of data from a table
Comparable tools
Installation
Installation
Using UV (Recommended)
uvx database-mcpConfiguration in Claude Desktop
{
"mcpServers": {
"database-mcp": {
"command": "uvx",
"args": [
"database-mcp"
],
"env": {
"DB_TYPE": "pg",
"DB_CONFIG": "{\"host\":\"localhost\",\"port\":5432,\"user\":\"user\",\"password\":\"pw\",\"dbname\":\"dbname\"}"
}
}
}
}Using PIP
pip install database-mcpFAQ
- Which databases are supported?
- The server supports PostgreSQL, Redshift, CockroachDB, MySQL, RDS MySQL, Microsoft SQL Server, Big Query, Oracle DB, and SQLite.
- Can I connect to multiple databases simultaneously?
- Yes, the server supports multi-database configurations through the DB_CONFIGS environment variable or command-line argument.
Compare legion-mcp with
Last updated · Auto-generated from public README + GitHub signals.