// ARCHITECTURE & GUIDES

Documentation & Setup Guide

Learn how to configure the MakeYourMCP gateway, write role-based security policies, and monitor agent transactions.

Introduction to the MCP Gateway

MakeYourMCP provides an intermediary security and governance gateway for Model Context Protocol (MCP) clients and servers. Rather than connecting your LLM application directly to raw data sources, all tool calls are routed through the MakeYourMCP gateway. This architecture ensures that permissions, credential storage, and auditing are handled independently of the LLM itself.

1. The Secure Connector Model

An MCP connector represents an integration point with an external data source or API. MakeYourMCP acts as the host for these connectors. When you add a connector (such as PostgreSQL, Snowflake, or Salesforce), the gateway exposes standard MCP tools (e.g., read_table, query_database) to the agent.

Credential Isolation: One of the core security risks in custom AI agent implementations is credential exposure. If credentials are injected directly into the prompt context or handled client-side, they can be leaked via prompt injection. The MakeYourMCP gateway solves this by keeping all credentials (API keys, database password hashes, OAuth tokens) stored securely inside our encrypted credential vault. The agent only sees the logical tool name; the gateway appends credentials server-side during the execution phase, completely isolating them from the LLM.

2. Configuring the Authentication & Connection Flow

When an AI agent initiates a connection to the MakeYourMCP gateway, it goes through a three-step handshake:

  1. Client Handshake: The client application (e.g., Claude Desktop, custom Vercel AI SDK wrapper) establishes a secure SSE (Server-Sent Events) or WebSocket transport connection to the MakeYourMCP gateway, presenting an API token.
  2. Capabilities Exchange: The gateway evaluates the token, determines the associated agent role, and dynamically advertises only the tools that are allowed for that specific role.
  3. Gated Tool Invocation: When the agent requests a tool call, the request is intercepted by the gateway's policy engine, validated, hydrated with credentials, executed, and the redacted response is returned to the agent.

3. Defining Policy Rules

Policies in MakeYourMCP allow or deny MCP tool calls based on tool name. Define your policy as JSON with glob patterns (fnmatch) to match tool names. A typical policy consists of:

  • Name: A human-readable identifier for the policy.
  • Default action: What to do when a tool matches no rules — allow or deny. Use deny (explicit allowlist).
  • Allow rules: Glob patterns for tools the agent may call (e.g., read_*, query_*).
  • Deny rules: Glob patterns for tools the agent must not call (e.g., delete_*, write_*). Deny always wins.

4. Monitoring & Real-time Audit Logs

Every single transaction going through the gateway is logged for auditing. The logging subsystem captures:

  • The unique transaction and request ID.
  • The client and user context who triggered the agent loop.
  • The raw tool call payload requested by the LLM.
  • The policy rule matched and the final authorization decision (Allow / Deny / Pending Approval).
  • Redacted database response payloads (removing PII, passwords, or excessive tables).

These logs can be exported in real-time to your enterprise SIEM (Splunk, Datadog) or stored inside the gateway for compliance review.

Connector Reference

Integration Guides & Policy Reference

Get Early Access
Get Early Access