
Gsep Mcp
io.github.gsepcorePublished by GitHub account gsepcorev1.0.0Updated Oct 24, 2026
AI agent security via MCP: C3 firewall, C4 immune system, C5 action guard, self-evolving prompts.
Overview
A local MCP server that wraps an agent's LLM calls with prompt-injection, output and destructive-action firewalls plus self-evolving prompts.
- What you can do
- Run a protected chat pipeline that scans input, calls the LLM, checks the response and records fitness
- Scan text for prompt-injection patterns and check LLM responses for manipulation or role confusion
- Scan proposed commands and tool calls for destructive actions such as recursive deletes or database drops
- Use pre- and post-hooks around LLM calls and tool execution to sanitize input and treat tool output as untrusted
- Inspect genome health, fitness and drift, and record user satisfaction feedback to drive prompt evolution
- When to use it
- Worth adding when an agent runs shell, filesystem or database actions and you want a guard layer that blocks dangerous commands and prompt-injection attempts. Also useful if you want per-user prompt adaptation and drift tracking around an existing LLM provider.
- Requirements
- Runs locally via npx from the npm package @gsep/mcp over stdio (or an HTTP mode). Needs one model backend: ANTHROPIC_API_KEY or OPENAI_API_KEY, or an OLLAMA_HOST for local models. Optional settings include GSEP_PRESET and HTTP host, port and auth variables. Genome data is stored under a local path by default.
Installation
In SourceWeft
- Open Gsep Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
GSEP-MCP — AI Agent Security via Model Context Protocol
[npm version] [License] [MCP Registry] [Powered by GSEP]
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
At a Glance
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.
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:
Restart Claude Desktop. Your agent is now protected.
Cursor
Add to .cursor/mcp.json in your project (or global ~/.cursor/mcp.json):
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
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
With Ollama (local models — no API key needed)
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:
Session model (v1.0.3+): Send
initializefirst — the server returns anmcp-session-idheader. 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.
Supported endpoints:
GET /v1/modelsPOST /v1/chat/completionsPOST /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):
- 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:
In a Celery task:
Node.js / TypeScript Backend
Deploy on Railway
- Create a new Railway service
- Set start command:
npx @gsep/mcp --http - Set environment variables:
- Your Django/Celery service connects via Railway internal networking:
Generic HTTP (any language)
Any HTTP client that supports JSON-RPC 2.0 works. The pattern is always:
How It Works
Every message through your agent flows through the GSEP pipeline:
Zero code changes to your agent. GSEP-MCP sits between your MCP client and the LLM.
Six-Layer Chromosome Model
MCP Tools Reference
gsep_chat
Full pipeline — C3 → evolved LLM → C4 → C5 → fitness → evolution. Use this as your primary chat tool. Returns the protected response + GSEP status.
gsep_scan_input
C3 Content Firewall — scan any text before sending to your LLM.
gsep_scan_output
C4 Behavioral Immune System — verify your LLM's response wasn't manipulated.
gsep_scan_actions
C5 Action Firewall — catch dangerous commands before they run.
gsep_before_llm
Middleware pre-hook — sanitize input and assemble the protected prompt before an external agent calls its own LLM.
gsep_after_llm
Middleware post-hook — verify an external LLM response before showing it to users or tools.
gsep_before_tool
Tool execution pre-hook — block dangerous shell, database, filesystem, or API actions before execution.
gsep_after_tool
Tool result post-hook — treat tool output as untrusted external content before reinjecting it into the agent.
gsep_get_status
Genome health, fitness scores, drift detection, evolution generation.
gsep_record_feedback
Signal satisfaction/dissatisfaction to drive evolution.
GSEP-MCP vs Alternatives
Environment Variables
Powered by GSEP Core
GSEP-MCP is built on @gsep/core — the open-source genomic evolution engine for AI agents. All security and evolution logic runs inside the core engine. GSEP-MCP is the MCP protocol layer on top.
If you are a developer and want deeper integration, use @gsep/core directly in your TypeScript/JavaScript project.
Intellectual Property
Built on GSEP — Genomic Self-Evolving Prompts. Patent pending (US, EU, PCT).
Contact
- Website: gsepcore.com
- Discord: discord.gg/7rtUa6aU
- Email: [email protected]
- GSEP Core: github.com/gsepcore/gsep
GSEP-MCP — Your agent, but protected.
MIT License — © 2026 Luis Alfredo Velasquez Duran
Changelog
v1.0.9
- feat(resources): Add session TTL, max session limits, periodic cleanup, genome TTL/LRU cache, and resource metrics.
- fix(resources): Disable dashboard auto-start for MCP-created genomes to avoid accidental local port usage.
v1.0.8
- feat(gateway): Add OpenAI-compatible Gateway Mode with
/v1/models,/v1/chat/completions, and/v1/responses. - feat(gateway): Add gateway auth controls and explicit non-streaming contract for the first gateway release.
v1.0.7
- feat(middleware): Add universal middleware hooks:
gsep_before_llm,gsep_after_llm,gsep_before_tool, andgsep_after_tool. - fix(docker): Build Docker image from the current repository source instead of installing a previously published npm version.
v1.0.3
- fix(http): Persist session transport across requests — fixes tool call timeout in HTTP mode. Previously a new
StreamableHTTPServerTransportwas created per request, destroying session state. Now uses a sessions Map keyed bymcp-session-id.
v1.0.2
- feat: Initial public release — 6 MCP tools, stdio + HTTP transports, C3/C4/C5 protection, self-evolving prompts.
- feat: Published to official MCP Registry (
io.github.gsepcore/gsep-mcp).
Source: README.md at commit 4db1c37
Tools
0Version history
1- v1.0.0LatestSep 16, 2026
Score
40% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.