MCP Gateway
Click on "Deploy 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., "@MCP Gatewaysearch tables for customer data"
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.
MCP Gateway
A generic, semantic MCP gateway exposing any HTTP-based SQL portal as both LLM-friendly MCP tools and standard REST endpoints. Designed from the ground up to serve human users (via UI/API) and AI agents simultaneously.
uv run main.py
uv run chainlit run chatbot.py -wArchitecture
+------------------+
| Human User |
+--------+---------+
|
| HTTP / REST
v
+---------+ MCP +------------------+ HTTP +------------------+
| AI +------>| FastAPI App +------>| SQL HTTP Portal |
| (Agent) | | (Semantic Layer) | (SQL) | |
+---------+ +--------+---------+ +------------------+
^ |
| |
+--- from_fastapi() ---+
(FastMCP Auto-maps tools)
User / Agent
|
HTTP | MCP
|
v
+-------------+
| MCP Gateway |
+-------------+
|
+--> Auth : OIDC | OAuth2 | API Key
+--> Secrets : .env | Secret Store | KMS
+--> Identity : User Token | Service Account
|
HTTPS + Bearer Token
|
+--> OTCS
+--> SQL Portal
+--> REST API
+--> CMIS API
+--> Any Backend
Related MCP server: anythingmcp
Core Design Principles (LLM & Human Best Practices)
Semantic Layer Abstraction: No raw CRUD endpoints. Expose high-level intent routes (
/search-tables,/top,/explore) to reduce LLM cognitive load and simplify frontend code.Strict Explict Identification: Every route enforces a clean, action-oriented
operation_id(query_sql,search_tables). FastMCP maps these directly into clear tool names for the LLM.Intent-Driven Documentation: Docstrings explicitly declare when and why to use the endpoint (
"""Semantic table search."""), acting directly as LLM prompt steering.Strict Typing via Enums: Restrict input options using Pydantic Enums to eliminate LLM parameter hallucinations.
Server-Side Data Aggregation: Compute metrics and perform table joins inside Python to save LLM context window tokens and prevent API call chaining.
Pros & Cons
Advantages
DRY Codebase: Single source of truth. One FastAPI setup automatically serves both humans (REST) and AI (MCP).
AI-First Performance: Fastembed vector search and server-side constraints (
FORBIDDENkeywords, limits) keep the LLM fast, secure, and accurate.Low Footprint: No heavy local database or native drivers required; works over standard HTTP.
Disadvantages
Path Parameter Blindness: Complex dynamic routes like
/distinct/{table}/{column}require the LLM to successfully call/search-tablesfirst to discover valid values.Tight Coupling: Aligning REST routes to serve both human UX and LLM token-efficiency can require design trade-offs for heavily nested data.
AI
# if : full python agent (use openrouter)
curl -LsSf https://astral.sh/uv/install.sh | sh
uv tool install aider-chat --python 3.12 --force
uv tool install specify-cli
specify init mcp-gateway --integration claude --ignore-agent-tools
aider --model openrouter/nvidia/nemotron-3-ultra-550b-a55b:free --no-auto-commits --test-cmd pytest
# else :
sudo bash script.sh This server cannot be deployed
Maintenance
Related MCP Connectors
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Let AI agents query data and act across all your business apps via MCP.
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.5 npm-
- AlicenseAqualityAmaintenanceSelf-hosted source-available MCP gateway that turns REST, SOAP/WSDL, GraphQL, and SQL/NoSQL databases into MCP tools. Imports OpenAPI/Postman/WSDL/GraphQL specs and bridges multiple MCP servers behind one endpoint. Ships with 29 pre-built adapters and built-in OAuth2 + RBAC + audit log.4200AGPL 3.0
- FlicenseNot gradedqualityBmaintenanceA self-hosted MCP gateway that turns REST, SOAP, GraphQL, and SQL endpoints into MCP tools, enabling AI clients like Claude and ChatGPT to interact with legacy and modern APIs without code changes.-
- AlicenseNot gradedqualityCmaintenanceActs as a bridge between standard REST/OpenAPI web APIs and the Model Context Protocol, dynamically converting REST endpoints into MCP tools for LLM clients like Cursor, Claude Desktop, and n8n.13 npmApache 2.0