The production platform for MCP tools.
MCP Gateway
The production platform for MCP tools.
Claude Desktop can connect to your internal tools — databases, filesystems, APIs, anything — through a single authenticated endpoint. You control who can use which tools, every action is logged, and no raw credentials ever leave your server.
Built-in tools: SQL query (Postgres, MySQL, SQLite, MSSQL), filesystem access. Custom tools: plug in anything that implements the MCP tool interface.
See it in action — short demo of Claude Desktop querying a database through MCP Gateway.
Overview
MCP Gateway sits between AI assistants and your databases. It:
- Authenticates users via password login, Microsoft Entra ID (Azure AD), or API keys
- Enforces role-based access control (viewer / analyst / admin)
- Exposes databases as MCP tools that AI assistants can discover and call
- Translates natural language questions into SQL via Claude, executes queries, and summarizes results
- Logs all activity to a structured audit trail
Claude Desktop / mcp-remote
│
│ MCP over SSE (OAuth 2.1 + PKCE)
▼
┌─────────────────────────────────────────────────────────┐
│ MCP Gateway │
│ │
│ ┌──────────┐ ┌──────────┐ ┌───────────────────────┐ │
│ │ Auth / │ │ Admin │ │ MCP SSE Endpoint │ │
│ │ OAuth │ │ UI │ │ /t/{slug}/mcp/sse │ │
│ └──────────┘ └──────────┘ └───────────────────────┘ │
│ │ │
│ ┌──────────────────────────────────────┐│ │
│ │ Tool Providers ││ │
│ │ sql.py → get_schema / execute_sql ││ │
│ └──────────────────────────────────────┘│ │
└─────────────────────────────────────────┼───────────────┘
│ Decrypted DSN
┌─────────────────────┼────────────────┐
│ Your Databases │ │
│ Postgres MySQL MSSQL SQLite │
└──────────────────────────────────── ┘
What you get out of the box
For your organisation
- One URL for Claude Desktop — users authenticate once, access everything they're allowed
- Microsoft Entra ID SSO — roles assigned automatically from Azure AD groups
- Full audit trail — every tool call, every query, every login, who did what and when
For your tools
- Drop any MCP tool into the gateway and it inherits auth, RBAC, and logging automatically
- Per-tool role overrides — restrict SQL execution to analysts, filesystem writes to admins
- Bundled: SQL tools (4 databases), filesystem tools (read, write, search, tree)
For your security team
- No credentials on employee machines
- Tenant isolation — org A cannot see org B's tools or data
- API keys for CI/CD, OAuth 2.1 + PKCE for human users
Supported Databases
| Database | Driver | DSN Format |
|---|---|---|
| PostgreSQL | psycopg2 | postgresql://user:pass@host/db |
| MySQL / MariaDB | PyMySQL | mysql+pymysql://user:pass@host/db |
| Microsoft SQL Server | pymssql | mssql+pymssql://user:pass@host/db |
| SQLite | Built-in | sqlite:///path/to/file.db |
Filesystem Tools
- Sandboxed file read/write/search exposed as MCP tools
- Enabled via
FILESYSTEM_ALLOWED_DIRSenvironment variable - Read operations (analyst+):
fs_read_file,fs_list_directory,fs_directory_tree,fs_search_files,fs_get_file_info - Write operations (admin):
fs_write_file,fs_create_directory,fs_move_file
Admin UI
- Web interface served at
/admin/ - Manage connections, users, SSO config, API keys, and tool roles
- View audit logs, generated SQL, and query results
Architecture
Technology Stack
| Layer | Technology | Version |
|---|---|---|
| API Framework | FastAPI | 0.131.0 |
| ASGI Server | Uvicorn | 0.34.0 |
| ORM | SQLAlchemy | 2.0.30 |
| Migrations | Alembic | 1.13.1 |
| Auth / JWT | PyJWT + bcrypt | 2.12.0 / 4.0.1 |
| Encryption | cryptography (Fernet) | 46.0.5 |
| LLM | Anthropic SDK | 0.42.0 |
| MCP Protocol | mcp | 1.23. |
Tools (5)
sql_queryExecutes SQL queries against connected databases including Postgres, MySQL, SQLite, and MSSQL.fs_read_fileReads the content of a file from allowed directories.fs_list_directoryLists files and directories within an allowed path.fs_search_filesSearches for files matching a pattern within allowed directories.fs_write_fileWrites content to a file in allowed directories (admin role required).Environment Variables
FILESYSTEM_ALLOWED_DIRSComma-separated list of directories accessible to the filesystem tools.DATABASE_URLConnection string for the primary database.Configuration
{"mcpServers": {"mcp-gateway": {"command": "python", "args": ["-m", "mcp_gateway"], "env": {"DATABASE_URL": "postgresql://user:pass@host/db", "FILESYSTEM_ALLOWED_DIRS": "/path/to/data"}}}}