Skip to main content
Glama
abreed05

Security Context MCP Server

by abreed05

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 build

Initial Setup

Before using the MCP server, fetch and index the security documentation:

npm run fetch-docs

This will:

  1. Download documentation from all configured sources

  2. Index the content for fast semantic search

  3. 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 topic

  • limit (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:

  1. A01:2021 - Broken Access Control

  2. A02:2021 - Cryptographic Failures [... detailed information about each category ...]

Architecture

Components

  • MCP Server (src/index.ts): Main server implementing MCP protocol

  • Vector Store (src/vector/simple-store.ts): TF-IDF based search with local caching

  • Document Sources (src/sources/): Fetchers for each security authority

  • Document Fetcher (src/fetcher.ts): Orchestrates downloading and indexing

Data Flow

  1. Fetch Phase: npm run fetch-docs downloads documentation from sources

  2. Index Phase: Content is processed and indexed with TF-IDF for semantic search

  3. Cache Phase: Indexed documents saved to ~/.security-mcp/documents.json

  4. Query 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:

  1. Replace SimpleVectorStore with a real vector DB (ChromaDB, Pinecone, Weaviate)

  2. 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-docs

Consider setting up a cron job to update weekly:

# Run every Sunday at 2am
0 2 * * 0 cd /path/to/security-mcp && npm run fetch-docs

Technical 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-docs

Server 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:

  1. Create a new source file in src/sources/

  2. Implement the DocumentSource interface

  3. Add the source to src/fetcher.ts

  4. Submit 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 tools
get_owasp_top10C

Get information about OWASP Top 10 vulnerabilities for a specific year or category

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryNoOptional: Specific OWASP Top 10 category (e.g., 'A01:2021 - Broken Access Control')

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves information (implying a read-only operation) but doesn't address critical aspects like whether it requires authentication, rate limits, error handling, or the format/scope of returned data. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It is front-loaded with the core purpose and appropriately sized for a simple tool with one optional parameter, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for effective use. It doesn't explain what information is returned (e.g., vulnerability details, descriptions, mitigations), how results are structured, or any behavioral constraints. For a tool with no structured data to supplement it, the description should provide more context to be fully actionable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal value beyond the input schema, which has 100% coverage. It mentions 'for a specific year or category,' hinting at the optional 'category' parameter's purpose, but doesn't provide additional context like valid year ranges or category examples beyond what's in the schema. With high schema coverage, the baseline is 3, and the description doesn't significantly enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get information about') and resource ('OWASP Top 10 vulnerabilities'), making it immediately understandable. It distinguishes the tool by specifying the domain (OWASP Top 10) but doesn't explicitly differentiate it from sibling tools like 'get_security_context' or 'search_security_docs', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings (get_security_context, list_security_sources, search_security_docs). It mentions the scope ('for a specific year or category'), but this is more about parameter usage than contextual alternatives. Without explicit when/when-not instructions or named alternatives, it falls short of providing meaningful usage guidelines.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_security_contextC

Get comprehensive security context for a specific topic. Returns detailed information from multiple authoritative sources.

ParametersJSON Schema
NameRequiredDescriptionDefault
topicYesSecurity topic (e.g., 'SQL injection', 'zero trust', 'IAM best practices')

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'Returns detailed information from multiple authoritative sources,' which gives some context about output richness, but doesn't cover important aspects like whether this is a read-only operation, potential rate limits, authentication requirements, or what format the information returns. For a tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with two sentences that directly address purpose and output characteristics. It's front-loaded with the main function. While efficient, it could potentially benefit from slightly more structure to separate purpose from behavioral context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no annotations, no output schema, and the description provides minimal behavioral context, the description is incomplete. It doesn't explain what 'comprehensive security context' entails, how the information is structured, or what users can expect from the 'multiple authoritative sources.' For a tool that presumably returns complex security information, this leaves significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'topic' well-documented in the schema. The description adds no additional parameter information beyond what's already in the schema. According to the scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('comprehensive security context'), and specifies the scope ('for a specific topic'). However, it doesn't explicitly differentiate from sibling tools like 'get_owasp_top10' or 'search_security_docs', which might also provide security information.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings. It mentions 'multiple authoritative sources' but doesn't specify when this comprehensive approach is preferred over the more focused 'get_owasp_top10' or broader 'search_security_docs'. No exclusions or alternatives are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_security_sourcesA

List all available security documentation sources and their categories

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool lists sources and categories, but does not describe return format (e.g., structure, pagination), performance characteristics, or any constraints (e.g., rate limits, authentication needs). This leaves significant gaps for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('List all available security documentation sources and their categories') with zero redundant information. Every word contributes directly to understanding the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate for basic understanding but incomplete for operational use. It lacks details on return values (since no output schema exists) and behavioral traits, which are critical for an agent to invoke it effectively in context with sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and schema description coverage is 100% (empty schema). The description appropriately does not discuss parameters, as none exist. It focuses on the tool's purpose, which is sufficient given the parameterless design.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('List') and resource ('all available security documentation sources and their categories'), distinguishing it from sibling tools like get_owasp_top10 (specific standard), get_security_context (context retrieval), and search_security_docs (search functionality). It precisely defines the tool's scope without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for obtaining a comprehensive overview of security sources, but provides no explicit guidance on when to use this tool versus alternatives like search_security_docs for filtered results or get_security_context for contextual information. It lacks explicit when-not-to-use statements or prerequisite conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesThe security question or topic to search for
limitNoMaximum number of results to return (default: 5)
sourceNoOptional: Filter results to a specific source (OWASP, NIST, AWS, Azure, Google, SANS, CIS, MITRE, Compliance)

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the tool's function (searching security docs with natural language) and scope (specific sources and content types), but does not disclose behavioral traits such as rate limits, authentication requirements, response format, or error handling. The description is accurate but lacks operational details needed for full transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured in two sentences: the first defines the tool's purpose and scope, and the second provides usage instructions. Every sentence adds essential information without redundancy, making it front-loaded and appropriately sized for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (search across multiple sources), lack of annotations, and no output schema, the description is partially complete. It covers the purpose, scope, and basic usage but omits details on behavioral traits, response format, and error handling. This is adequate as a minimum viable description but has clear gaps for a search tool with no structured output information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters (query, limit, source) thoroughly. The description adds minimal value beyond the schema by implying the 'query' parameter accepts natural language and listing possible sources for filtering, but does not provide additional syntax, format details, or examples. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Search across security documentation') and identifies the comprehensive scope of sources (OWASP, NIST, AWS, etc.) and content types (guidance, best practices, vulnerabilities, controls). It distinguishes itself from sibling tools like 'get_owasp_top10' (specific to OWASP) and 'list_security_sources' (listing rather than searching) by emphasizing broad, multi-source search capabilities.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('Use natural language queries to find relevant security guidance...'), but it does not explicitly state when not to use it or name specific alternatives. It implies usage for broad searches across multiple sources, which differentiates it from more focused siblings, but lacks explicit exclusions or direct comparisons.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.6/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count4/5

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.

Completeness4/5

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

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Allows 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.
    17
    9
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A 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.
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI coding assistants to search and retrieve information from a locally ingested knowledge base using hybrid search, grounded in user-curated documentation.
    17
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables 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.
    9
    195
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/abreed05/cybersecurity-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server