Skip to main content
Glama
AI Service Gateway MCP

AI Service Gateway MCP

by Yormede

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.

Related MCP server: Access

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.yaml file.

  • 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 patterns

    • smtp (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

  1. service_list(): Returns the public manifest of configured services and capabilities.

  2. service_call(service, method, path, ...): Makes an authenticated HTTP request.

  3. service_ssh(service, command): Runs a command over SSH (if allowed by config).

  4. service_email(service, to, subject, body): Sends an email via SMTP.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Credential isolation proxy for AI agents. Injects API keys at the network boundary so your agent never sees the raw credential. Supports domain allowlists, agent auth, policy enforcement, and audit logging.
      3
      79 npm
      16
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Self-hosted credential store and API proxy for AI agents. One Bearer token, all your services. Handles OAuth refresh, encrypted storage, audit logging, and per-agent permissioning.
      79 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Zero-knowledge credential injection for AI agents. Your agent authenticates to websites and APIs without ever seeing a password, TOTP code, or API key.
      15 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Bounded egress gateway & secret proxy for AI agents and applications, enabling safe credential injection into upstream requests while keeping raw secrets out of LLM prompt contexts.
      24 npm
      MIT