MCP security fixture
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP security fixture
A small MCP server with a vulnerable mode and a fixed mode. It has three flaws. Each flaw has a client-side test that shows the flaw in one mode and its absence in the other.
Everything runs on 127.0.0.1. All data and keys are fake. Test only this fixture and servers you own.
Run
./run.shYou need uv (tested with 0.10.4) and Python 3.10 or newer. run.sh installs mcp==2.3.0 into .venv, starts the server and a stub downstream API on free loopback ports, runs three test scripts in both modes, and writes results.csv. Exit code 0 means every outcome matched the expected one. No network call leaves the Mac. No paid model is called.
Related MCP server: mcp-suspicious-tools
SDK
Official mcp Python SDK, version 2.3.0 (PyPI, released 2026-10-02). In 2.x, FastMCP is now MCPServer (from mcp.server.mcpserver import MCPServer). Code written for 1.x does not import. Check the migration guide at https://py.sdk.modelcontextprotocol.io/v2/migration/ if you port this to 1.x.
The three flaws
# | Flaw | Tool | Vulnerable mode | Fixed mode |
1 | Tool description carries hidden instructions |
| The description tells the agent to call | The description is plain. The |
2 | Token passthrough |
| The server forwards the user's own token (audience | The server sends its own token for the downstream audience. The downstream API rejects any other audience. |
3 | Missing per-user authorization |
| The server checks who you are, not what is yours. Alice reads Bob's invoice. | The server compares the invoice owner to the caller. Alice gets an error. |
Fixes in production terms: pin and review tool descriptions on the client side, and show them to the user (flaw 1). Never pass a client token to another service. Use a token exchange or a service credential with the right audience, and check the audience on the receiving side (flaw 2). Check ownership on every object-level read (flaw 3). The MCP authorization spec forbids token passthrough.
The tests
Script | Test | Shows |
|
| Whether the secret reaches the attacker sink |
| A simple client-side scan flags the poisoned description and passes the clean one | |
|
| Whether the downstream API sees the client's own token |
| The fix does not break the tool | |
| Whether the MCP-audience token works at the downstream API | |
|
| The flaw |
| Control: legitimate use still works | |
| Control: login works in both modes, so the flaw is authorization |
Limits
The agent in flaw 1 is a deterministic stub, not a language model. It obeys one instruction pattern in a tool description. The test proves that server text reaches the agent's context and can drive a tool call. It does not prove that a given real model obeys. No real-model run was done.
The tokens are toy HMAC tokens with
subandaudclaims. They show audience handling. They are not an OAuth implementation.The scanner is a regex list. It catches this fixture, not a careful attacker.
Tool output injection (hostile text in a tool result) is not covered. Only the description channel is.
Files
server.py the MCP server. downstream.py the stub downstream API. fixture_auth.py toy tokens. tests/ the harness, the stub agent, the scanner and three test scripts. results.csv the last run and its outcomes.
Licence: MIT (see LICENSE).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Security research canary remote MCP server for owned-account testing.
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Browser QA agent that won't return a false green: verified PASS/FAIL + access-control probing.
Browse and inspect sites in your own Kitsuvo browser through an opt-in authenticated relay.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to control a local Chromium browser via CDP for page snapshots, screenshots, human-like interactions, autonomous crawling, API/GraphQL reconnaissance, authenticated differential testing, and Burp-like intercept, repeater, and intruder workflows with scope enforcement and audit logging.MIT
- FlicenseNot gradedqualityCmaintenanceEnables guardrail and trust testing by exposing realistic malicious tool patterns such as shell execution, credential dumping, and data exfiltration, all without network access.-
- FlicenseNot gradedqualityCmaintenanceEnables security testing of MCP guardrails and SAST scanners by exposing intentionally vulnerable code patterns that are inert by default and make no network calls.-
- AlicenseBqualityBmaintenanceEnables self-hosted local file, terminal, document, and named-device tools for MCP clients, with an isolated document mode and a full-access mode.11MIT