The Problem
Organizations adopting LLM‑based services that use the Model Context Protocol (MCP) lack a clear, vetted set of security controls. Existing guidance is fragmented, and teams struggle to map MCP‑specific threat vectors to real‑world mitigations.
What This Does
The repo consolidates the OWASP MCP Security Testing Guide into a single, navigable Markdown collection. Key files:
01. Project_Overview.md– high‑level framing.03. MCP Threats and Attack Patterns/3. MCP Threats and Attack Patterns.md– the threat catalogue, with 79 test cases spread across sub‑sections 3.1–3.19.04. Secure MCP Development.md– secure‑coding recommendations for MCP clients and servers.11. Appendix F - Suggested Reading.md– links to tooling and further reading.
The tests are defined in Markdown (test-case-format.md), not code, so they serve as a template rather than executable units.
How It Is Wired
The repository has no runtime entry point; its architecture is purely informational.
- Document graph: each chapter file references related sections via relative links (e.g.,
03. MCP Threats and Attack Patterns.mdlinks to3.01-information-gathering.md). - Test flow: the file
test-case-format.mdacts as a schema that red‑teams can copy into new test files. - Control scope: the
3. MCP Threats and Attack Patterns.mdfile owns the threat taxonomy; the4. Secure MCP Development.mdfile owns mitigation guidance.
No external code or network calls exist; the repo is a static knowledge base.
How To Use It
- Clone the repo. ``
bash git clone https://github.com/moses-y/MCP-Security-Testing-Guide`` - Navigate to the desired chapter (e.g.,
03. MCP Threats and Attack Patterns/). - Read threat definitions and corresponding tests.
- Create a new test file by copying the template from
test-case-format.md. - Run tests manually or with a custom harness that parses the Markdown for assertions.
The README’s how-to-run.md provides guidance on interpreting the test format and integrating with your own tooling.
Real‑World Use
A SOC team can import 3.07-prompt-instruction.md into their security review spreadsheet, then use the test template to validate that an MCP client correctly sanitizes prompt payloads before forwarding to an external LLM. Example workflow:
1️⃣ Load threat: Prompt Injection.
2️⃣ Verify mitigation: Client-level prompt sanitization.
3️⃣ Run custom test: send crafted prompt, assert no injection payload reaches the LLM.
Code Health & Issues
- (Medium/SDLC) No CI/CD pipeline detected – there is no
.github/workflow or CI config, so automated linting or test execution is absent. - (Low) All content is Markdown – no binary artifacts or compiled code, reducing runtime risk.
- (Low) Missing test harness – tests are declarative; a tool to execute them is not provided.
The Bottom Line
The MCP Security Testing Guide is a well‑structured reference for threat identification and mitigation. Its Markdown‑only nature makes it lightweight, but the lack of automated testing and CI means teams must manually enforce the guidance. Adopt it as a baseline for MCP‑centric security programs, supplementing with your own tooling and review processes.