GSEP-MCP β AI Agent Security via Model Context Protocol

The only MCP server that protects your AI agent instead of just extending it.
"me encanta saber que no borrarΓ‘ nada de mi pc" β First GSEP user, unprompted
Website Β· GSEP Core Β· npm Β· Discord
At a Glance
| Metric | Value |
|---|
| MCP Tools | 10 |
| Prompt injection patterns (C3) | 53 |
| Destructive action patterns (C5) | 80+ |
| Behavioral immune checks (C4) | 6 |
| Chromosome layers | 6 (C0βC5) |
| LLM providers supported | 5 (Claude, GPT-4, Gemini, Ollama, Perplexity) |
| Transport modes | 2 (stdio + HTTP/SSE) |
| Setup time | < 2 minutes |
What is GSEP-MCP?
There are 9,400+ MCP servers. All of them give your agent new tools β Notion, GitHub, Slack, databases.
GSEP-MCP is different. It gives your agent security, safety, and self-improvement β without writing a single line of code.
OTHER MCP SERVERS GSEP-MCP
ββββββββββββββββββββ ββββββββββββββββββββββββββββββββ
β Give agent β β Protect agent from β
β new tools β vs β prompt injection β
β β β Block destructive actions β
β More features β β Detect infected responses β
β β β Self-evolving prompts β
ββββββββββββββββββββ ββββββββββββββββββββββββββββββββ
Works with: Claude Desktop, Cursor, Windsurf, Cline, Continue, n8n, Make, any MCP client.
Integrations
GSEP-MCP supports two transports: stdio (for desktop apps and IDEs) and HTTP (for servers, backends, and automation platforms). Pick the one that matches your environment.
stdio Transport (Desktop / IDE)
stdio is the simplest transport. The MCP client launches GSEP-MCP as a subprocess and communicates via stdin/stdout. No port, no server, no network.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"gsep": {
"command": "npx",
"args": ["-y", "@gsep/mcp"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}
Restart Claude Desktop. Your agent is now protected.
Cursor
Add to .cursor/mcp.json in your project (or global ~/.cursor/mcp.json):
{
"mcpServers": {
"gsep": {
"command": "npx",
"args": ["-y", "@gsep/mcp"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"gsep": {
"command": "npx",
"args": ["-y", "@gsep/mcp"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}
Cline / Continue / Any MCP-compatible IDE
Add the same config block to your IDE's MCP settings file. GSEP-MCP is compatible with any client that implements the MCP protocol.
OpenClaw / Genome
{
"mcpServers": {
"gsep": {
"command": "npx",
"args": ["-y", "@gsep/mcp"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-...",
"GSEP_PRESET": "full"
}
}
}
}
With Ollama (local models β no API key needed)
{
"mcpServers": {
"gsep": {
"command": "npx",
"args": ["-y", "@gsep/mcp"],
"env": {
"OLLAMA_HOST": "http://localhost:11434",
"GSEP_PRESET": "full"
}
}
}
}
HTTP Transport (Servers / Backends / Automation)
HTTP mode runs GSEP-MCP as a standalone server. Use this when your agent lives in a backend, a cloud service, or an automation platform.
Start the server:
ANTHROPIC_API_KEY=sk-ant-... npx @gsep/mcp --http
# MCP endpoint: http://localhost:3100/mcp
# OpenAI gateway: http://localhost:3100/v1/chat/completions
# Health check: http://localhost:3100/health
Session model (v1.0.3+): Send initialize first β the server returns an mcp-session-id header. Include that header in all subsequent requests. Do not open a new connection per call.
OpenAI-Compatible Gateway
Gateway Mode lets existing OpenAI-compatible apps adopt GSEP by changing their baseURL.
The server uses the LLM provider configured in its environment, then wraps every request in
GSEP protection and evolution.
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.GSEP_GATEWAY_KEY,
baseURL: 'http://localhost:3100/v1',
});
const completion = await client.chat.completions.create({
model: 'gpt-4o-mini',
messages: [{ role: 'user', content: 'Refactor this repo safely.' }],
});
Supported endpoints:
GET /v1/models
POST /v1/chat/completions
POST /v1/responses
Streaming is intentionally rejected for now; use non-streaming calls until the streaming safety
pipeline is implemented.
n8n
- Start GSEP-MCP server (locally or on Railway/Render)
- In your n8n workflow add an HTTP Request node:
- Method: POST
- URL:
http://your-gsep-server:3100/mcp
- Body (JSON):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gsep_chat",
"arguments": {
"genome_id": "n8n-agent",
"message": "{{ $json.message }}",
"user_id": "{{ $json.userId }}"
}
}
}
- Header:
mcp-session-id: {{ $json.sessionId }}
For n8n: initialize once at workflow start, store the mcp-session-id, and reuse it across nodes.
Make (Integromat)
Use the HTTP β Make a request module pointing to http://your-gsep-server:3100/mcp with the same JSON-RPC 2.0 payload above.
Python (Django / FastAPI / Celery)
Install the MCP Python SDK:
# gsep_client.py
import asyncio
from mcp.client.streamable_http import streamablehttp_client
from mcp import ClientSession
GSEP_URL = "http://localhost:3100/mcp"
async def gsep_chat(genome_id: str, message: str, user_id: str = "user") -> dict:
async with streamablehttp_client(GSEP_URL) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
result = await session.call_tool("gsep_chat", {
"genome_id": genome_id,
"message": message,
"user_id": user_id,
})
return result
async def gsep_scan_input(content: str) -> dict:
async with streamablehttp_client(GSEP_URL) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
result = await session.call_tool("gsep_scan_input", {
"content": content,
"source": "user",
})
return result
In a Celery task:
# tasks.py
from celery import shared_task
import asyncio
from .gsep_client import gsep_chat, gsep_scan_input
@shared_task
def process_message(genome_id: str, message: str, user_id: str):
scan = asyncio.run(gsep_scan_input(message))
if scan.get("blocked"):
return {"blocked": True, "reason": scan.get("detections")}
return asyncio.run(gsep_chat(genome_id, message, user_id))
Node.js / TypeScript Backend
npm install @modelcontextprotocol/sdk
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
const client = new Client({ name: 'my-backend', version: '1.0.0' });
const transport = new StreamableHTTPClientTransport(new URL('http://localhost:3100/mcp'));
await client.connect(transport);
const result = await client.callTool('gsep_chat', {
genome_id: 'my-agent',
message: userMessage,
user_id: userId,
});
console.log(result);
Deploy on Railway
- Create a new Railway service
- Set start command:
npx @gsep/mcp --http
- Set environment variables:
ANTHROPIC_API_KEY=sk-ant-...
GSEP_PRESET=full
GSEP_HTTP_HOST=0.0.0.0
GSEP_HTTP_PORT=$PORT
- Your Django/Celery service connects via Railway internal networking:
GSEP_URL = "http://gsep-mcp.railway.internal:$PORT/mcp"
Generic HTTP (any language)
Any HTTP client that supports JSON-RPC 2.0 works. The pattern is always:
# Step 1 β Initialize (once per session)
POST /mcp
Content-Type: application/json
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"my-client","version":"1.0.0"}}}
# Response includes header: mcp-session-id: <uuid>
# Step 2 β Call any tool (reuse session ID)
POST /mcp
Content-Type: application/json
mcp-session-id: <uuid from step 1>
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"gsep_chat","arguments":{"genome_id":"my-agent","message":"Hello","user_id":"user-1"}}}
How It Works
Every message through your agent flows through the GSEP pipeline: