Skip to main content
MCP server CX Codex

MCP Gateway — Claude Code MCP server: one authenticated door to your databases

A gateway that sits between the AI assistant and your databases, checking identity, filtering tools by role and writing every call to an audit log.

Install into Claude Code · Platform CLI: remote server All methods and platforms ↓
claude mcp add --transport sse mcp-gateway https://your-gateway.example.com/t/your-org/mcp/sse
Open on GitHub

What MCP Gateway does

MCP Gateway is a Python server that speaks MCP over SSE. Out of the box it exposes SQL tools for PostgreSQL, MySQL, MSSQL and SQLite, plus sandboxed filesystem reads and writes. Any tool that implements the MCP tool interface can be plugged in and inherits the same auth and logging.

People sign in with a password, Microsoft Entra ID (Azure AD) or an API key. Roles viewer, analyst and admin decide which tools each account can call; the admin panel at /admin/ handles connections, users, SSO settings and keys. Database credentials stay encrypted on the gateway, so staff machines never hold them.

Natural-language queries route through Claude, which is why an Anthropic key is required for that path. Filesystem tools stay off until FILESYSTEM_ALLOWED_DIRS names the permitted directories. Plan for Python 3.12. In Claude the connection points at your own deployment, so replace the sample host in claude mcp add --transport sse mcp-gateway https://your-gateway.example.com/t/your-org/mcp/sse with your gateway address.

What it helps with

  • let the assistant query a database without handing out credentials
  • keep SQL execution with analysts and file writes with admins
  • separate one organisation's tools and data from another's
  • keep a record of every tool call and login
  • issue API keys for CI/CD apart from human sign-in

Example prompts for the agent

  • Add the gateway with claude mcp add --transport sse mcp-gateway https://your-gateway.example.com/t/your-org/mcp/sse and list the tools it exposes
  • Pull the schema for the orders table through MCP Gateway and run a monthly revenue query
  • Give the analyst role SQL access in the MCP Gateway admin panel but block file writes

How to install MCP Gateway

Platform CLI: remote server

claude mcp add --transport sse mcp-gateway https://your-gateway.example.com/t/your-org/mcp/sse

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about MCP Gateway

How do I install MCP Gateway in Claude Code?

Deploy the gateway first, then run claude mcp add --transport sse mcp-gateway https://your-gateway.example.com/t/your-org/mcp/sse, swapping the sample address for your own SSE endpoint.

What does MCP Gateway do?

It authenticates assistant connections, gives each user only the MCP tools their role allows and records calls in an audit trail. Databases and files reach the assistant through that single endpoint.

What does MCP Gateway need to run?

Python 3.12 for its dependencies, and an Anthropic key if you want natural-language questions turned into SQL. Filesystem tools are enabled through FILESYSTEM_ALLOWED_DIRS.

Similar MCP servers

All MCP servers for Data and databases →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor