Skip to main content
Glama
iarsingh

MCP Database Agent

by iarsingh

MCP Database Agent

Project guide

Project architecture · Interview questions and answers

Use the architecture document for the component diagram, implementation boundaries, and verification entry points. The interview guide includes source-backed answers and project walkthroughs.

Implementation map

Component

Responsibility

src/mcpdb/main.py

HTTP handlers: GET /healthz, GET /tools, POST /call

src/mcpdb/mcp.py

Functions: list_tools, call

requirements.txt

Implementation or supporting configuration

src/mcpdb/__init__.py

Implementation or supporting configuration

tests/test_mcp.py

Executable checks and regression examples

.github/workflows/ci.yml

GitHub Actions job definitions

README.md

Project explanations or operating notes

Local setup and verification

From the repository root (the commands follow the checked-in manifests):

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
python -m pytest -q

To serve the FastAPI application locally, install the server separately if it is not already available:

python -m pip install uvicorn
PYTHONPATH=src python -m uvicorn mcpdb.main:app --reload

Level: 10 — MCP & Tool-Using Agents

Skills: Python, read-only DB tools

Tools: explain, sample_rows, list_indexes. Apply/delete refused.

pip install -r requirements.txt
pytest -q

This is a local laptop proof. It does not call a hosted model and it does not apply production changes.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides secure, read-only access to PostgreSQL databases for schema inspection and data querying. It enables users to list tables, describe structures, and execute SELECT statements while strictly blocking destructive operations.
    7 npm
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables read-only MySQL database access, allowing listing databases, tables, describing schemas, and executing SELECT/SHOW/DESCRIBE/EXPLAIN queries.
    7
    88 npm
    4
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables read-only PostgreSQL interaction through safe query execution, query planning, table and column inspection, and privilege checks, with multi-layer defenses against write operations and transaction-control exploits.
    5
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables read-only MySQL/MariaDB schema exploration and safe query cost estimation across multiple instances, with server-enforced write refusal and execution limits.
    Apache 2.0