AI Service Gateway MCP
Enables AI agents to securely access authenticated services (HTTP, SSH, SMTP) without exposing secrets, by acting as a server-side proxy that injects authentication.
README
AI Service Gateway MCP
The AI uses services, not secrets.
A fundamentally new approach to providing AI agents access to authenticated services. Instead of giving the AI a password manager or storing tokens in its context window, this MCP server acts as an opaque Service Gateway.
The Concept
The AI never knows that tokens, passwords, or SSH keys exist. It is only given a list of services and what they can do. When the AI wants to fetch data from GitHub, it asks the Gateway to make an HTTP call to the "github" service. The Gateway injects the authentication server-side.
This completely eliminates the risk of prompt injection extracting tokens, or tokens being leaked in conversation histories and inference server logs.
Features
- No Secrets in Context: The AI only sees service names (
github,nas_ssh,email) and their capabilities. - Config-Driven: Define your services and authentication methods in a single
gateway.yamlfile. - Environment Variables: Inject actual secret values using environment variables so they aren't hardcoded in the config.
- Supported Protocols:
http(Bearer, Basic, Custom Headers, Query Params)ssh(Password, Private Key) with allowed command patternssmtp(Email sending)
- Output Sanitizer: Automatically scrubs all known secret values from tool outputs as a defense-in-depth measure.
Quick Start
1. Create a Configuration
Create a gateway.yaml file:
services:
github:
type: http
base_url: https://api.github.com
auth:
type: bearer
token: ${GITHUB_TOKEN}
capabilities: [repos, issues]
2. Run the Gateway
export GITHUB_TOKEN="ghp_supersecret..."
python -m ai_gateway check --config gateway.yaml
python -m ai_gateway serve --config gateway.yaml --port 8600
Or using Docker:
docker compose up -d
3. Connect your AI Agent
Configure your MCP client (like OpenCode or Claude Desktop) to connect to http://localhost:8600/sse.
MCP Tools Provided
service_list(): Returns the public manifest of configured services and capabilities.service_call(service, method, path, ...): Makes an authenticated HTTP request.service_ssh(service, command): Runs a command over SSH (if allowed by config).service_email(service, to, subject, body): Sends an email via SMTP.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.