Security Context MCP Server
Provides access to Google's authoritative security documentation and implementation guidelines through semantic search and context retrieval tools.
Retrieves security documentation and best practices for Google Cloud, including specific guidance on BeyondCorp and Zero Trust architectures.
Provides comprehensive access to OWASP security documentation, including detailed information on the OWASP Top 10 vulnerabilities and security cheat sheets.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Security Context MCP Server What are the best practices for securing AWS S3 buckets?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Security Context MCP Server
An MCP (Model Context Protocol) server that provides instant access to authoritative security documentation from OWASP, NIST, AWS, Google Cloud, SANS, CIS, and other cybersecurity authorities. Think of it as having a security expert at your fingertips.
Features
Comprehensive Security Knowledge Base: Aggregates documentation from multiple authoritative sources
Semantic Search: Find relevant security guidance using natural language queries
Local Caching: Fast, offline-capable access to indexed documentation
Multiple Security Domains:
OWASP Top 10, Cheat Sheets
NIST Cybersecurity Framework, SP 800-53, SP 800-171, Zero Trust
AWS Security Best Practices, Well-Architected Framework
Google Cloud Security, BeyondCorp Zero Trust
SANS/CWE Top 25, CIS Controls
CIS Benchmarks
Related MCP server: Grimoire
Installation
npm install
npm run buildInitial Setup
Before using the MCP server, fetch and index the security documentation:
npm run fetch-docsThis will:
Download documentation from all configured sources
Index the content for fast semantic search
Cache everything locally in
~/.security-mcp/
The fetch process takes 2-5 minutes depending on your internet connection. You only need to run this once, or periodically to update the documentation.
Usage
As an MCP Server
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"security-context": {
"command": "node",
"args": ["/path/to/security-mcp/dist/index.js"]
}
}
}Or if installed globally:
{
"mcpServers": {
"security-context": {
"command": "security-mcp"
}
}
}Available Tools
Once configured, Claude will have access to these tools:
1. search_security_docs
Search across all security documentation using natural language.
Example queries:
"How do I prevent SQL injection?"
"What are AWS IAM best practices?"
"Explain zero trust architecture"
"NIST incident response guidelines"
Parameters:
query(required): Your security question or topiclimit(optional): Max results (default: 5)source(optional): Filter to specific source (OWASP, NIST, AWS, Google, SANS, CIS)
2. get_security_context
Get comprehensive context on a topic from multiple sources.
Example:
{
"topic": "authentication best practices"
}Returns aggregated information from all relevant sources.
3. list_security_sources
List all available documentation sources and their categories.
4. get_owasp_top10
Get specific OWASP Top 10 vulnerability information.
Parameters:
category(optional): Specific category like "A01:2021 - Broken Access Control"
Examples
Example 1: Finding Security Guidance
User: "How should I secure my AWS S3 buckets?"
Claude (using search_security_docs):
Found relevant guidance from AWS Security Best Practices:
Enable S3 Block Public Access by default
Use IAM roles and policies for access control
Enable versioning and Object Lock
Implement bucket encryption [... detailed results with links ...]
Example 2: Understanding Frameworks
User: "What is NIST CSF and how do I use it?"
Claude (using get_security_context):
The NIST Cybersecurity Framework provides structured approach to managing risk... [Shows information from multiple NIST sources about CSF functions, implementation tiers, and profiles]
Example 3: Vulnerability Research
User: "Tell me about the latest OWASP Top 10"
Claude (using get_owasp_top10):
OWASP Top 10 2021 includes:
A01:2021 - Broken Access Control
A02:2021 - Cryptographic Failures [... detailed information about each category ...]
Architecture
Components
MCP Server (
src/index.ts): Main server implementing MCP protocolVector Store (
src/vector/simple-store.ts): TF-IDF based search with local cachingDocument Sources (
src/sources/): Fetchers for each security authorityDocument Fetcher (
src/fetcher.ts): Orchestrates downloading and indexing
Data Flow
Fetch Phase:
npm run fetch-docsdownloads documentation from sourcesIndex Phase: Content is processed and indexed with TF-IDF for semantic search
Cache Phase: Indexed documents saved to
~/.security-mcp/documents.jsonQuery Phase: MCP tools search the indexed cache and return relevant results
Storage
Documents are stored in: ~/.security-mcp/documents.json
To update documentation, simply run npm run fetch-docs again.
Customization
Adding New Sources
Create a new source in src/sources/:
import { DocumentSource, SecurityDocument } from "../types.js";
export class CustomSource implements DocumentSource {
name = "CustomSource";
async fetchDocuments(): Promise<SecurityDocument[]> {
// Fetch and return documents
return [];
}
}Then add it to src/fetcher.ts:
import { CustomSource } from "./sources/custom.js";
const sources = [
// ... existing sources
new CustomSource(),
];Upgrading to Vector Embeddings
The current implementation uses TF-IDF for simplicity and zero external dependencies. For better semantic search, you can upgrade to proper embeddings:
Replace
SimpleVectorStorewith a real vector DB (ChromaDB, Pinecone, Weaviate)Add embedding generation using:
OpenAI embeddings API
Local models via Sentence Transformers
Anthropic's Claude API
Updating Documentation
Security documentation changes frequently. Update your cache periodically:
npm run fetch-docsConsider setting up a cron job to update weekly:
# Run every Sunday at 2am
0 2 * * 0 cd /path/to/security-mcp && npm run fetch-docsTechnical Details
Technologies Used
MCP SDK: Official Model Context Protocol implementation
TypeScript: Type-safe development
Axios & Cheerio: Web scraping and HTML parsing
Natural: NLP and TF-IDF search
PDF Parse: PDF document processing (for future enhancements)
Performance
Initial fetch: 2-5 minutes
Index size: ~2-5 MB (for all sources)
Search latency: <100ms (local cache)
Memory usage: ~50-100 MB
Limitations
Web scraping may break if source websites change structure
TF-IDF is simpler than embedding-based search
No automatic update mechanism (manual refresh required)
English language only
Troubleshooting
Documents not found
Run the fetcher to download documentation:
npm run fetch-docsServer not connecting
Check your MCP configuration in Claude Desktop and ensure the path is correct.
Fetch errors
Some sources may be temporarily unavailable. The fetcher continues with other sources even if one fails.
Empty results
Try different query phrasings or use list_security_sources to see what's available.
Contributing
To add more security sources:
Create a new source file in
src/sources/Implement the
DocumentSourceinterfaceAdd the source to
src/fetcher.tsSubmit a pull request
Potential sources to add:
Microsoft Security Best Practices
Azure Security
PCI DSS guidelines
HIPAA security rules
ISO 27001/27002
SOC 2 requirements
License
MIT
Security & Privacy
All documentation is cached locally
No external API calls during query time
No telemetry or data collection
Open source and auditable
Support
For issues or questions:
File an issue on GitHub
Check the documentation
Review the source code
Built with ❤️ for the security community
Available Tools
4 toolsget_owasp_top10C
Get information about OWASP Top 10 vulnerabilities for a specific year or category
Inputs: category.
get_security_contextC
Get comprehensive security context for a specific topic. Returns detailed information from multiple authoritative sources.
Inputs: topic (required).
list_security_sourcesA
List all available security documentation sources and their categories
Inputs: no named parameters.
search_security_docsA
Search across security documentation from OWASP, NIST, AWS, Azure, Google, SANS, CIS, MITRE ATT&CK, and compliance frameworks (PCI DSS, HIPAA, ISO 27001, SOC 2, GDPR). Use natural language queries to find relevant security guidance, best practices, vulnerabilities, and controls.
Inputs: query (required), limit, source.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose with no overlap: get_owasp_top10 retrieves specific vulnerability data, get_security_context provides comprehensive topic analysis, list_security_sources enumerates available sources, and search_security_docs performs cross-source document searches. The descriptions clearly differentiate their functions, eliminating any potential for agent misselection.
All tool names follow a consistent verb_noun pattern with snake_case formatting: get_owasp_top10, get_security_context, list_security_sources, and search_security_docs. This predictable naming convention makes the tool set easy to understand and navigate for agents.
With 4 tools, the count is slightly lean but reasonable for a security context server focused on information retrieval. Each tool serves a distinct purpose, though the scope might benefit from additional tools for more granular operations like filtering or updating security data, but the current set is well-scoped for its core functions.
The tool set covers key retrieval operations for security context: listing sources, searching documents, getting specific vulnerability data, and obtaining comprehensive context. Minor gaps exist, such as the lack of tools for modifying or analyzing security data beyond retrieval, but agents can work around this to access authoritative security information effectively.
Maintenance
Related MCP Connectors
Answer security questionnaires and RFPs from your AI knowledge base.
Versioned documentation registry and semantic search for AI tools and coding assistants.
Securely search and manage workspace context files for AI agents and teams.
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
Related MCP Servers
AlicenseBqualityCmaintenanceAllows developers to query security findings (SAST issues, secrets, patches) using natural language within AI-assisted tools like Claude Desktop, Cursor, and other MCP-compatible environments.1711MIT- AlicenseNot gradedqualityDmaintenanceA local security knowledge base that indexes documentation like CVEs and CWEs using hybrid keyword and semantic search. It enables LLM agents to query indexed materials via MCP for accurate, offline retrieval during security audits and code reviews.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI coding assistants to search and retrieve information from a locally ingested knowledge base using hybrid search, grounded in user-curated documentation.17MIT
- AlicenseAqualityCmaintenanceEnables AI models to search and retrieve offline security knowledge from over 20 curated sources including HackTricks, PayloadsAllTheThings, and OWASP guides, via the Model Context Protocol.9205MIT