Data as of

MCP Gateway for Claude Code: Setup & Config

Claude Code: Lasso Security’s MCP Gateway proxies MCP servers and filters requests and responses through configurable plugins.

What you can do with MCP Gateway in Claude Code

Pick it to apply shared security plugins and visibility across otherwise separate MCP servers.

  • Mask supported credentials in proxied tool exchanges
  • Scan server reputation and tool descriptions before loading

Before you start: MCP Gateway in Claude Code

  • Python and pip
  • The mcp-gateway package
  • Xetrack installed for this example
  • An MCP configuration containing nested server definitions

Install with pip install mcp-gateway and pip install xetrack. Replace the configuration path if needed. This example enables basic masking and tracing; Lasso API credentials and Presidio extras are needed only for those plugins.

MCP Gateway Claude Code configuration

  1. Choose Claude Code configuration scope

    For MCP Gateway, open Project scope: .mcp.json at the repository root. Project JSON: merge into mcpServers; user scope: use the CLI.

  2. Add MCP Gateway to Claude Code

    Use the mcp-gateway-lasso-security entry below in mcpServers. Keep MCP Gateway's documented stdio connection fields and your other Claude Code entries.

  3. Check MCP Gateway in Claude Code

    MCP Gateway: Inspect claude mcp list and /mcp status.

Config file · Project scope: .mcp.json at the repository root

JSON
{
  "mcpServers": {
    "mcp-gateway-lasso-security": {
      "type": "stdio",
      "command": "mcp-gateway",
      "args": [
        "--mcp-json-path",
        "~/.cursor/mcp.json",
        "-p",
        "basic",
        "-p",
        "xetrack"
      ],
      "env": {}
    }
  }
}

CLI (POSIX shell)
claude mcp add-json --scope project 'mcp-gateway-lasso-security' '{"type":"stdio","command":"mcp-gateway","args":["--mcp-json-path","~/.cursor/mcp.json","-p","basic","-p","xetrack"],"env":{}}'

MCP Gateway tools available to Claude Code

MCP Gateway's stored tool list documents 2 tools; compare it with Claude Code's connected tool list, because the stored list is not a live check.

get_metadata

For MCP Gateway's get_metadata, review the permission request and arguments in Claude Code before approval.

Inspect available proxied servers and their capabilities.

run_tool

For MCP Gateway's run_tool, review the permission request and arguments in Claude Code before approval.

MCP Gateway: full stored tool descriptions

Troubleshooting MCP Gateway in Claude Code

  • If MCP Gateway fails to start, check mcp-gateway, the working directory, and Claude Code's selected scope; inspect claude mcp list and /mcp.
  • MCP Gateway uses stdio here: Claude Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: Presidio and Xetrack require additional dependencies
  • Known limitation: Advanced Lasso guardrails need an API key and external API checks
  • Known limitation: Scanner results can be manually overridden
  • General Claude Code troubleshooting lives in the /clients/claude-code guide.

MCP Gateway — details. Claude Code guide

Frequently asked questions

Register MCP Gateway with the displayed claude mcp add-json --scope project command, or merge the JSON into .mcp.json at the repository root.

Claude Code's mcp-gateway-lasso-security example uses stdio.

MCP Gateway's Claude Code configuration invokes mcp-gateway.

MCP Gateway's stored list contains 2 tools, including get_metadata, run_tool. Compare those names with Claude Code's connected tool list; the stored list is not a live check.

The plugin table assigns token and secret masking to basic, not PII masking. Presidio or Lasso provides PII controls.

Yes. The README describes writing scan results into the MCP configuration, including blocked and passed states.