L

Legion Database

Enables natural language querying and management of multiple database types (PostgreSQL, MySQL, SQL ...

5 views
0 installs
Updated Jan 19, 2026
Not audited
Enables natural language querying and management of multiple database types (PostgreSQL, MySQL, SQL Server, BigQuery) for data analysis, business intelligence, and database exploration.
  1. Click the "Install Now" button to open the FastMCP connection interface, and use that interface to add the environment variables described below (fill the values into the FastMCP fields and save). (github.com)

  2. Decide whether you are configuring a single database or multiple databases:

    • Single database: provide DB_TYPE and DB_CONFIG.
    • Multiple databases: provide DB_CONFIGS (a JSON array of database configs). (theralabs.github.io)
  3. Pick the DB_TYPE code for your database (examples used by this MCP: pg, redshift, cockroach, mysql, rds_mysql, mssql, bigquery, oracle, sqlite). Put this value into the DB_TYPE field (single DB) or the db_type field inside each DB_CONFIGS item (multi DB).

  4. Gather your database connection values (ask your DB admin or check your cloud provider console). For typical relational databases you will need:

    • host (hostname or endpoint)
    • port (e.g., 5432 for Postgres, 3306 for MySQL)
    • user (username)
    • password (password or secret)
    • dbname / database (the database name)
      For BigQuery you will typically use a service-account credential / ADC instead of host/port. (theralabs.github.io)
  5. Build the DB_CONFIG JSON string for a single database and paste it into the DB_CONFIG field (escape quotes as required by the FastMCP interface). Example (Postgres single DB):

DB_TYPE = "pg"
DB_CONFIG = "{\"host\":\"db.example.com\",\"port\":5432,\"user\":\"dbuser\",\"password\":\"secret\",\"dbname\":\"mydb\"}"
  1. If you need multiple databases, build DB_CONFIGS as a JSON array and paste it into the DB_CONFIGS field. Example (two databases):
DB_CONFIGS = "[{\"id\":\"pg_main\",\"db_type\":\"pg\",\"configuration\":{\"host\":\"db1.example.com\",\"port\":5432,\"user\":\"user1\",\"password\":\"pw1\",\"dbname\":\"postgres\"},\"description\":\"PostgreSQL Main\"},{\"id\":\"mysql_data\",\"db_type\":\"mysql\",\"configuration\":{\"host\":\"db2.example.com\",\"port\":3306,\"user\":\"root\",\"password\":\"pw2\",\"database\":\"mysql\"},\"description\":\"MySQL Data\"}]"
  1. For providers with special auth (e.g., BigQuery): include service-account JSON or use Application Default Credentials in the configuration JSON instead of host/port (consult the Legion Query Runners docs for the exact key names/format for each runner). (theralabs.github.io)

  2. After filling DB_TYPE and DB_CONFIG / DB_CONFIGS in the FastMCP interface, save the connection and start the MCP server via the FastMCP UI (or run the server). Verify the connection by calling the server tools (for example, run list_databases or get_database_info to confirm the configured databases appear).

  3. If you need exact field names or database-specific configuration examples, consult the Legion Query Runners configuration docs and the MCP Python SDK FastMCP docs linked in the project README. (theralabs.github.io)

Quick Start

View on GitHub

More for Database

View All →

More for AI and Machine Learning

View All →

Similar MCP Servers

B

BigQuery

Remote Remote

Securely query and analyze Google BigQuery datasets via natural language.

Database Analytics and Data

Report Issue

Thank you! Your issue report has been submitted successfully.