Secure Agent MCP Gateway

Secure Agent MCP Gateway

Enables AI agents to safely call MCP tools through a security gateway that enforces per-role authorization and least-privilege tool scoping.

Category
Visit Server

README

Secure Agent MCP Gateway

SOC alert triage with an MCP-to-MCP security gateway: the agent never talks to real tools directly. Every tools/list / tools/call is scoped and authorized by role (viewer | operator | admin).

main.py (agent)  →  gateway  →  mcp_server (tools)

More detail: gateway/README.md.

Quick start (local)

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

cp .env.example .env
# edit .env — set LLM_API_KEY (never commit .env)

Three role services (local)

# 1) Viewer — reputation lookups only
python main.py --mcp --role viewer --alert sample_alert.json

# 2) Operator — triage / summarize / notify (no block or escalate)
python main.py --mcp --role operator --alert sample_alert.json

# 3) Admin — full tool set through the gateway
python main.py --mcp --role admin --alert sample_alert.json

Deterministic path (no MCP / no gateway):

python main.py --alert sample_alert.json

Policy-only check:

python -m gateway.policy

Docker deploy

Requires Docker + Compose. Secrets stay outside the image:

cp .env.example .env
# set LLM_API_KEY in .env

Build

docker compose build
# or:
docker build -t secure-agent-mcp-gateway:latest .

Three services (one role each)

Same image; different GATEWAY_ROLE. Each container runs the full chain (maingatewaymcp_server) for that role.

# 1) Viewer
docker compose run --rm triage-viewer

# 2) Operator
docker compose run --rm triage-operator

# 3) Admin
docker compose run --rm triage-admin

Or start by service name:

docker compose up triage-viewer
docker compose up triage-operator
docker compose up triage-admin

Pass the key without a file:

LLM_API_KEY=sk-... docker compose run --rm triage-admin

Plain Docker (no Compose)

docker build -t secure-agent-mcp-gateway:latest .

docker run --rm \
  -e LLM_API_KEY \
  -e LLM_MODEL=gpt-4o-mini \
  -e GATEWAY_ROLE=viewer \
  secure-agent-mcp-gateway:latest \
  python main.py --mcp --role viewer --alert sample_alert.json

docker run --rm -e LLM_API_KEY -e GATEWAY_ROLE=operator \
  secure-agent-mcp-gateway:latest \
  python main.py --mcp --role operator --alert sample_alert.json

docker run --rm -e LLM_API_KEY -e GATEWAY_ROLE=admin \
  secure-agent-mcp-gateway:latest \
  python main.py --mcp --role admin --alert sample_alert.json

Environment

Variable Purpose
LLM_API_KEY Required for agent / findings summary
LLM_MODEL Default gpt-4o-mini
LLM_PROVIDER Default openai
GATEWAY_ROLE viewer | operator | admin

.env is gitignored. Only .env.example is committed.

Roles (policy)

Role Can use
viewer check_ip_reputation
operator reputation, triage, summarize, notify
admin all tools including block_ip + escalate_alert

Defined in gateway/policy.yaml.

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured