permit-db
Provides a read-only natural-language interface to a MySQL permit database, enabling users to query and analyze permit data through validated SQL SELECT statements.
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., "@permit-dbHow many building permits were issued last month?"
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.
permit-query-agent
A read-only, natural-language interface to a permit database. Ask a question in
plain English; the local Claude Code CLI writes a SELECT, runs it through a
validated MCP tool (permit-db), and explains the result. A Streamlit UI wraps
it with deterministic Discover/Analytics pages that never call the LLM.
Project Structure
permit-query-agent/
│
├── app/ # Application source
│ ├── agent/ # PermitAgent — drives the `claude` CLI + MCP tools
│ ├── config/ # Query-safety / logging settings
│ ├── database/ # Engine, session, schema init (connection.py)
│ ├── logging/ # Logging setup
│ ├── mcp/ # MCP server + tool layer (SQL entry point)
│ ├── models/ # SQLAlchemy models
│ ├── repositories/ # Data access layer (queries)
│ ├── security/ # SQL Guard, audit, table allowlist
│ ├── services/ # Query / schema / statistics services
│ └── utils/ # Shared helpers
│
├── ui/ # Streamlit app (app.py) + deterministic reads (data.py)
├── scripts/ # Setup: init_db, create_readonly_user, seed_data
├── certs/ # DB TLS certs (e.g. Aiven ca.pem) — git-ignored
├── tests/ # Test suite
│
├── .env # Local secrets (git-ignored)
├── .env.example # Copy to .env and fill in
├── .mcp.json # MCP server configuration
└── requirements.txtRelated MCP server: MCP MySQL Server
Database
MySQL 8, database permit_system (or Aiven's defaultdb). All connection
settings are read from .env — see .env.example. Two supported targets:
Local MySQL —
DB_HOST=localhost,DB_PORT=3306,DB_SSLunset.Aiven for MySQL — the service host/port,
DB_SSL=true. Aiven requires TLS; to verify the server cert, downloadca.pemintocerts/and setDB_SSL_CA=./certs/aiven-ca.pem.
The app connects as a least-privilege read-only user (DB_USER); setup
scripts use the admin credentials (DB_ADMIN_USER / DB_ADMIN_PASSWORD).
Setup
pip install -r requirements.txt
cp .env.example .env # then fill in host / credentials
python -m app.database.init_db # create the tables (admin creds)
# create the read-only app user (name defaults to permit_ro)
RO_DB_PASSWORD=your_ro_password python -m scripts.create_readonly_user
python -m scripts.seed_data # load ~1,000 sample permitsRun
streamlit run ui/app.py # UI — needs the `claude` CLI on PATH for Ask AI
pytest # test suiteThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA natural language interface that allows Claude to execute SQL queries on your local MySQL databases, enabling database interaction using natural language.5
- AlicenseNot gradedqualityDmaintenanceEnables Claude Desktop to interact with MySQL databases through secure query execution, schema discovery, and multi-database support with configurable read/write permissions and built-in SQL injection protection.121MIT
- AlicenseAqualityCmaintenanceEnables Claude Desktop to execute read-only SQL queries on MySQL databases via natural language, with dynamic connection switching and built-in security.32417MIT
- AlicenseAqualityDmaintenanceEnables Claude Code to directly operate MySQL databases through natural language, supporting multi-environment profiles, security modes, and 11 tools.11352Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/RithikSDev/permit-query-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server