An MCP server that provides access to FedRAMP 20x security requirements and controls.
An MCP (Model Context Protocol) server that provides access to FedRAMP 20x security requirements and controls with Azure-first guidance.
This server loads FedRAMP 20x data from the official FedRAMP documentation repository and provides tools for querying requirements by control, family, or keyword.
Data Sources:
Azure Focus: All implementation examples, architecture patterns, and vendor recommendations prioritize Microsoft Azure services (Azure Government, Microsoft Entra ID, Azure Key Vault, AKS, Azure Functions, Bicep, etc.) while remaining cloud-agnostic where appropriate.
The server provides access to 321 requirements (199 FRRs + 72 KSIs + 50 FRDs) across FedRAMP 20x documents:
FedRAMP Requirements (FRR) - 199 requirements across 10 families:
Key Security Indicators (KSI) - 72 indicators across 11 families:
FedRAMP Definitions (FRD) - 50 official term definitions
cli-tool, mcp-server, web-app, api-service, iac-only, library, batch-job, full) via the application_profile parameter on analysis toolsThe server uses a unified pattern-based architecture for all FedRAMP 20x compliance analysis:
Architecture Overview:
GenericPatternAnalyzer) replaces 271 traditional analyzersPattern Coverage by Family:
How It Works:
data/patterns/ directoryBenefits:
Important Clarification: OSCAL Format FedRAMP 20x requires machine-readable formats (JSON, XML, or structured data) for Authorization Data Sharing. OSCAL is NOT mentioned in FedRAMP 20x requirements - it's a NIST standard that can be used as one potential implementation approach. The actual requirement is simply "machine-readable" - you can use custom JSON/XML or OSCAL based on your implementation needs.
# Clone the repository
git clone https://github.com/KevinRabun/FedRAMP20xMCP.git
cd FedRAMP20xMCP
# Create virtual environment and install
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e .
# If using uv (alternative package manager):
uv pip install -e .Dependencies:
mcp>=1.2.0 - Model Context Protocol SDKhttpx>=0.27.0 - HTTP client for fetching FedRAMP dataopenpyxl>=3.1.0 - Excel file generation for export featurespython-docx>=1.1.0 - Word document generation for KSI specificationstree-sitter>=0.21.0 - AST parsing library for code analysistree-sitter-python>=0.21.0 - Python language bindings for tree-sittertree-sitter-c-sharp>=0.21.0 - C# language bindings for tree-sittertree-sitter-java>=0.21.0 - Java language bindings for tree-sittertree-sitter-javascript>=0.21.0 - JavaScript/TypeScript language bindingsTroubleshooting:
If you encounter issues, see Advanced Setup Guide for detailed troubleshooting steps.
Vulnerability Disclosure: If you discover a security vulnerability, please see our Security Policy for responsible disclosure procedures (KSI-PIY-03).
Audit Logging: All MCP server operations are logged to stderr for audit purposes (KSI-MLA-05).
Security Features:
For complete security documentation, see SECURITY.md.
Install the VS Code MCP extension (if not already installed)
Configure the MCP server - Choose one of the following scopes:
Option A: Workspace-level (Recommended for sharing)
Add to .vscode/mcp.json in your project:
{
"servers": {
"fedramp-20x-mcp": {
"type": "stdio",
"command": "python",
"args": ["-m", "fedramp_20x_mcp"]
}
}
}If Python is not in PATH, update the command to use your virtual environment's Python:
{
"servers": {
"fedramp-20x-mcp": {
"type": "stdio",
"command": "${workspaceFolder}/.venv/Scripts/python.exe", // Windows
// "command": "${workspaceFolder}/.venv/bin/python", // macOS/Linux
"args": ["-m", "fedramp_20x_mcp"]
}
}
}Option B: User-level (Global across all projects)
Add to VS Code User Settings (settings.json):
{
"github.copilot.chat.mcp.servers": {
"fedramp-20x-mcp": {
"type": "stdio",
"command": "python",
"args": ["-m", "fedramp_20x_mcp"]
}
}
}Security Note: Do NOT use "alwaysAllow" in configuration. VS Code will prompt you to grant permissions on first use, which is a security best practice.
Optional: Configure VS Code settings by copying .vscode/settings.json.example to .vscode/settings.json
Reload VS Code to activate the MCP server
Grant permissions when prompted by VS Code (first use only)
Use with GitHub Copilot Chat:
@workspace to query specific controls or familiesAdd this server to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"fedramp-20x": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/FedRAMP20xMCP",
"run",
"fedramp-20x-mcp"
]
}
}
}Note: Replace /absolute/path/to/FedRAMP20xMCP with your actual installation path.
Test the server using the MCP Inspector:
npx @modelcontextprotocol/inspector python -m fedramp_20x_mcpThis repository uses strict instructions for all AIβassisted coding.
See: Copilot Instructions
For CI/CD integration, multi-server setup with Azure and GitHub, or detailed troubleshooting, see:
The server provides 48 tools organized into the following categories:
Core Tools (8): Query requirements (get_control, list_family_controls, search_requirements), definitions (get_definition, list_definitions, search_definitions), and KSIs (get_ksi, list_ksi) KSI Tools (9): KSI implementation status, evidence automation, evidence queries, evidence artifacts, implementation matrix, implementation summary, coverage summary, coverage status, family status FRR Analysis Tools (7): Analyze code against specific FRRs, all FRRs, or FRR families; list FRRs; get FRR metadata, evidence automation, and implementation status Documentation Tools (3): Search and retrieve FedRAMP documentation Enhancement Tools (6): Implementation examples, dependencies, effort estimation, cloud-native guidance, architecture validation, Rev 4 comparison Export Tools (2): Excel/CSV export Planning Tools (2): Generate implementation questions and step-by-step checklists Evidence Collection Tools (4): Infrastructure code templates, collection code, architecture guidance, KSI specifications Code Analysis Tools (4): AST-powered analysis of infrastructure code, application code, CI/CD pipelines, and FedRAMP config validation Security Tools (2): CVE vulnerability checking for packages and dependency files Code Enrichment Tools (1): Add FedRAMP requirement comments to code
Get detailed information about a specific FedRAMP requirement or control.
Parameters:
control_id (string): The requirement identifier (e.g., "FRD-ALL-01", "KSI-AFR-01")List all requirements within a specific family.
Parameters:
family (string): The family identifier (e.g., "FRD", "KSI", "MAS")Search for requirements containing specific keywords.
Parameters:
keywords (string): Keywords to search for in requirement textGet the FedRAMP definition for a specific term.
Parameters:
term (string): The term to look up (e.g., "vulnerability", "cloud service offering")List all FedRAMP definitions with their terms.
Returns: Complete list of all FedRAMP definition terms
Search FedRAMP definitions by keywords.
Parameters:
keywords (string): Keywords to search for in definitionsGet detailed information about a specific Key Security Indicator.
Parameters:
ksi_id (string): The KSI identifier (e.g., "KSI-AFR-01")List all Key Security Indicators.
Returns: Complete list of all Key Security Indicators with their names
Get evidence automation recommendations for a specific KSI. 65 active KSIs include automated evidence collection guidance.
Parameters:
ksi_id (string): The KSI identifier (e.g., "KSI-IAM-01", "KSI-CNA-01")Returns: Guidance for automating evidence collection including:
Coverage: All 65 active KSIs across 11 families:
Example: get_ksi_evidence_automation("KSI-IAM-01") returns automated evidence collection for phishing-resistant MFA including Entra ID Conditional Access policies, sign-in logs via Log Analytics, MFA method registration queries, and compliance reporting dashboards.
Get ready-to-use evidence collection queries for a specific KSI.
Parameters:
ksi_id (string): The KSI identifier (e.g., "KSI-IAM-01", "KSI-CNA-01")Returns: Production-ready queries for collecting evidence from Azure (5 queries per KSI):
Example: get_ksi_evidence_queries("KSI-CNA-01") returns Resource Graph queries for NSG rules, Azure Firewall policies, virtual network configurations, subnet segmentation analysis, and network topology validation.
Get specifications for evidence artifacts to collect for a specific KSI.
Parameters:
ksi_id (string): The KSI identifier (e.g., "KSI-IAM-01", "KSI-CNA-01")Returns: Detailed artifact specifications (5 artifacts per KSI):
Example: get_ksi_evidence_artifacts("KSI-IAM-01") returns sign-in logs (CSV, daily, 90 days), Conditional Access policy exports (JSON, weekly, 1 year), MFA method registration reports (XLSX, monthly, 3 years), authentication dashboard screenshots (PNG, quarterly, 1 year), and MFA compliance matrices (PDF, monthly, 7 years).
Analyze code against a specific FedRAMP Requirement (FRR) for compliance issues.
Parameters:
frr_id (string): FRR identifier (e.g., "FRR-VDR-01", "FRR-RSC-01", "FRR-ADS-01")code (string): Code to analyzelanguage (string): Language/platform - "python", "csharp", "java", "typescript", "bicep", "terraform", "github-actions", "azure-pipelines", "gitlab-ci"file_path (string, optional): File path for contextReturns: Analysis results with findings, severity levels, and remediation recommendations
Supported FRR Families:
What It Checks: Analyzes code for FRR-specific compliance issues using AST-powered semantic analysis:
Example Usage:
# Check Python code for FRR-VDR-01 compliance (vulnerability scanning)
result = analyze_frr_code(
frr_id="FRR-VDR-01",
code="""import subprocess
subprocess.run(['trivy', 'image', 'myapp:latest'])
""",
language="python"
)
# β
Detects Trivy vulnerability scanning implementation
# Check Bicep for FRR-ADS-01 compliance (machine-readable evidence)
result = analyze_frr_code(
frr_id="FRR-ADS-01",
code="""resource apiManagement 'Microsoft.ApiManagement/service@2023-05-01-preview' = {
name: 'evidence-api'
properties: {
publisherEmail: 'admin@contoso.com'
publisherName: 'Contoso'
}
}""",
language="bicep"
)
# β
Validates API Management for authorization data sharingAnalyze code against all 199 FedRAMP requirements for compliance analysis.
Parameters:
code (string): Code to analyzelanguage (string): Language/platform (python, csharp, java, typescript, bicep, terraform, github-actions, azure-pipelines, gitlab-ci)file_path (string, optional): File path for contextReturns: Analysis results grouped by FRR family with summary statistics
Use Cases:
Output Structure:
Example Usage:
# Comprehensive FRR analysis of Bicep infrastructure code
result = analyze_all_frrs(
code=bicep_template,
language="bicep",
file_path="main.bicep"
)
# Returns findings across all 10 FRR familiesPerformance: Analyzes all 199 FRRs in 2-5 seconds using parallel processing and AST caching.
Analyze code against all requirements in a specific FRR family.
Parameters:
family (string): Family code - "VDR", "RSC", "UCM", "SCN", "ADS", "CCM", "MAS", "ICP", "FSI", "PVA"code (string): Code to analyzelanguage (string): Language/platformfile_path (string, optional): File path for contextReturns: Analysis results for all requirements in the specified family
Common Use Cases:
VDR Family (59 requirements):
# Check CI/CD pipeline for vulnerability management compliance
result = analyze_frr_family(
family="VDR",
code=github_actions_yaml,
language="github-actions"
)
# Checks: Vulnerability scanning, patch procedures, remediation timeframes,
# deviation management, KEV tracking, monthly reportingADS Family (22 requirements):
# Validate authorization data sharing API implementation
result = analyze_frr_family(
family="ADS",
code=python_api_code,
language="python"
)
# Checks: Machine-readable formats, API authentication, data accuracy,
# real-time updates, audit logging, access controlsRSC Family (10 requirements):
# Check infrastructure for secure configuration compliance
result = analyze_frr_family(
family="RSC",
code=terraform_code,
language="terraform"
)
# Checks: Security baselines, configuration standards, hardening,
# drift detection, compliance validationList all FRR requirements in a specific family with implementation status.
Parameters:
family (string): Family code (VDR, RSC, UCM, SCN, ADS, CCM, MAS, ICP, FSI, PVA)Returns: List of all FRRs in the family with:
Example Usage:
# List all vulnerability detection requirements
result = list_frrs_by_family("VDR")
# Returns 59 VDR requirements with status indicators
# List all authorization data sharing requirements
result = list_frrs_by_family("ADS")
# Returns 22 ADS requirementsUse Cases:
Get detailed metadata for a specific FRR including NIST controls, related KSIs, and detection strategy.
Parameters:
frr_id (string): FRR identifier (e.g., "FRR-VDR-01")Returns: FRR metadata including:
Example Usage:
# Get metadata for FRR-VDR-01 (vulnerability scanning)
result = get_frr_metadata("FRR-VDR-01")
# Returns: NIST controls (RA-5, SI-2), related KSIs (KSI-AFR-04),
# detection strategy (CI/CD pipeline analysis, tool configuration checks)
# Get metadata for FRR-ADS-01 (machine-readable evidence)
result = get_frr_metadata("FRR-ADS-01")
# Returns: NIST controls (CA-2, CA-5, CA-7), related KSIs (KSI-CED-01),
# detection strategy (API endpoint analysis, data format validation)Use Cases:
Get evidence automation recommendations for a specific FRR.
Parameters:
frr_id (string): FRR identifier (e.g., "FRR-VDR-01", "FRR-ADS-01")Returns: Evidence automation guidance including:
Example Usage:
# Get evidence automation for FRR-VDR-01 (vulnerability scanning)
result = get_frr_evidence_automation("FRR-VDR-01")
# Returns: Azure Defender for Cloud configuration, KQL queries for
# vulnerability data, scan result export automation, compliance dashboards
# Get evidence automation for FRR-ADS-01 (data sharing API)
result = get_frr_evidence_automation("FRR-ADS-01")
# Returns: API Management setup, authentication configuration,
# audit logging, API call metrics, response format validationSupported FRR Families:
Get implementation status summary across all FRR analyzers.
Parameters: None
Returns: Implementation status summary including:
Example Usage:
# Get overall FRR implementation status
result = get_frr_implementation_status()
# Returns: Family-by-family breakdown with implementation ratesUse Cases:
Output Example:
FRR Implementation Status:
- VDR Family: 59/59 patterns available
- RSC Family: 10/10 patterns available
- ADS Family: 22/22 patterns available
- Total: 199/199 patterns available
Code-Detectable: 145 FRRs (73%)
Process-Based: 54 FRRs (27%)Compare FedRAMP 20x with Rev 4/Rev 5 requirements for specific areas.
Parameters:
requirement_area (string): Area to compare (e.g., "continuous monitoring", "vulnerability management", "authorization boundary", "evidence collection", "change management", "incident response")Get practical implementation examples for specific requirements.
Parameters:
requirement_id (string): The requirement identifier (e.g., "KSI-IAM-01", "FRR-VDR-01")Check dependencies between FedRAMP 20x requirements.
Parameters:
requirement_id (string): The requirement identifier to check dependencies forEstimate implementation effort for specific requirements.
Parameters:
requirement_id (string): The requirement identifier to estimate effort forGet cloud-native implementation guidance for specific Azure and multi-cloud technologies.
Parameters:
technology (string): Technology to get guidance for (e.g., "kubernetes", "containers", "serverless", "terraform")Note: All cloud examples and best practices prioritize Azure services (AKS, Azure Functions, Key Vault, Bicep, etc.)
Validate a system architecture against FedRAMP 20x requirements.
Parameters:
architecture_description (string): Description of the architecture to validateSearch FedRAMP official documentation markdown files for specific keywords.
Parameters:
keywords (string): Keywords to search for in documentationReturns: Matching documentation sections with context from all available markdown files
Note: Automatically loads markdown files from the docs directory for searchability.
Get the full content of a specific FedRAMP documentation file.
Parameters:
filename (string): The markdown filename (e.g., "overview.md", "key-security-indicators.md")Returns: Full markdown content of the documentation file
List all available FedRAMP documentation files.
Returns: Complete list of all markdown documentation files dynamically discovered from the repository
Export FedRAMP 20x data to Excel files for offline analysis and reporting.
Parameters:
export_type (string): Type of data to export:
"ksi" - All 72 Key Security Indicators"all_requirements" - All 329 requirements across all families"definitions" - All FedRAMP term definitionsoutput_path (string, optional): Custom output path. If not provided, saves to Downloads folderReturns: Path to the generated Excel file with professional formatting (styled headers, borders, frozen panes)
KSI Export Columns:
All Requirements Export Columns:
Definitions Export Columns:
Example usage:
export_to_excel("ksi")export_to_excel("all_requirements")export_to_excel("definitions")Export FedRAMP 20x data to CSV files for data analysis and spreadsheet imports.
Parameters:
export_type (string): Type of data to export:
"ksi" - All 72 Key Security Indicators"all_requirements" - All 329 requirements across all families"definitions" - All FedRAMP term definitionsoutput_path (string, optional): Custom output path. If not provided, saves to Downloads folderReturns: Path to the generated CSV file
Columns: Same structure as Excel export (see above for detailed column descriptions)
Example usage:
export_to_csv("ksi")export_to_csv("all_requirements")export_to_csv("definitions")Generate a product specification Word document for a KSI to guide engineering implementation and planning.
Parameters:
ksi_id (string): The KSI identifier (e.g., "KSI-AFR-01")evidence_collection_strategy (string): High-level evidence collection strategy description provided by the useroutput_path (string, optional): Custom output path. If not provided, saves to Downloads folderReturns: Path to the generated Word (.docx) document
Document Contents:
Azure Services Recommended (context-aware based on KSI category):
Example usage:
Generate specification for KSI-AFR-01:
> generate_ksi_specification with ksi_id="KSI-AFR-01"
and evidence_collection_strategy="Collect Azure Policy compliance reports quarterly using Azure Automation runbooks. Store evidence in Azure Blob Storage with immutable storage policy."Generate strategic interview questions for product managers and engineers to facilitate thoughtful planning discussions.
Parameters:
requirement_id (string): The requirement or KSI identifier (e.g., "FRR-CCM-01", "KSI-IAM-01")Returns: Strategic questions organized by stakeholder role
Question Categories:
Strategic Questions for Product Managers (10 questions):
Technical Questions for Engineers (15 questions):
Cross-Functional Questions (10 questions):
Azure-Specific Considerations (dynamic, up to 20 questions):
Additional Guidance:
Analyze Infrastructure as Code (IaC) files for FedRAMP 20x compliance issues and provide actionable recommendations.
Parameters:
code (string): The IaC code content to analyzefile_type (string): Type of IaC file - "bicep" or "terraform"file_path (string): Path to the file being analyzed (for reporting)context (string, optional): Additional context about the code (e.g., PR description)application_profile (string, optional): Application type for context-aware filtering to reduce false positives. Supported profiles: "cli-tool", "mcp-server", "web-app", "api-service", "iac-only", "library", "batch-job", "full" (default: no filtering)Returns:
Supported Languages:
What It Checks: Analyzes your infrastructure code against 40+ FedRAMP KSIs including:
Example Usage:
// This Bicep code will be flagged for missing diagnostic settings
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' = {
name: 'mystorageaccount'
location: location
properties: {
// Missing: diagnostic settings for KSI-MLA-05
}
}Analyze application code for FedRAMP 20x security compliance issues.
Parameters:
code (string): The application code content to analyzelanguage (string): Programming language - "python", "csharp", "java", "typescript", or "javascript"file_path (string): Path to the file being analyzed (for reporting)dependencies (array, optional): List of project dependencies (e.g., ["flask==2.3.0", "requests==2.31.0"])application_profile (string, optional): Application type for context-aware filtering. Same profiles as analyze_infrastructure_code.Returns:
Supported Languages & Frameworks:
FedRAMP Requirements Checked (Phase 1 + Phase 2):
Phase 1 - Foundation:
Phase 2 - Application Security:
Phase 3 - Secure Coding Practices:
Analyze CI/CD pipeline configurations for FedRAMP 20x DevSecOps compliance.
Parameters:
code (string): The pipeline configuration content (YAML/JSON)pipeline_type (string): Type of pipeline - "github-actions", "azure-pipelines", "gitlab-ci", or "generic"file_path (string): Path to the pipeline file (for reporting)application_profile (string, optional): Application type for context-aware filtering. Same profiles as analyze_infrastructure_code.Returns:
Supported Platforms:
.github/workflows/*.yml)azure-pipelines.yml).gitlab-ci.yml)FedRAMP Requirements Checked (Phase 4):
Example usage:
# GitHub Actions workflow that will be flagged for missing security scans
name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: docker build -t myapp .
- run: docker push myapp:latest
# β No vulnerability scanning
# β No test execution
# β No evidence collectionπ‘ Result: Analyzer recommends adding Trivy container scanning, unit test execution, security gates, and artifact uploads for compliance evidence.
Example usage:
# This Python code will be flagged for multiple issues
from flask import Flask
app = Flask(__name__)
API_KEY = "sk-1234567890abcdef" # KSI-SVC-06: Hardcoded secret
@app.route('/api/users') # KSI-IAM-01: Missing authentication
def get_users():
users = [
{'name': 'Alice', 'ssn': '123-45-6789'}, # PII in logs - see NIST SI-12
]
return {'users': users}Automated PR Review Workflow:
Purpose: Help teams think deeply about implementation considerations, trade-offs, and success criteria before committing resources. Questions are designed to facilitate planning sessions, design reviews, and stakeholder alignment.
Generate Infrastructure as Code templates (Bicep or Terraform) for automated evidence collection infrastructure.
Parameters:
ksi_id (string): The Key Security Indicator identifier (e.g., "KSI-IAM-01", "KSI-MLA-01")infrastructure_type (string): Either "bicep" or "terraform"Returns: IaC templates for deploying evidence collection infrastructure
Supported KSI Families:
Example Usage:
> get_infrastructure_code_for_ksi with ksi_id="KSI-IAM-01" and infrastructure_type="bicep"
Output Includes:
Generate business logic code (Python, C#, PowerShell, Java, or TypeScript) for collecting and storing KSI evidence programmatically.
Parameters:
ksi_id (string): The Key Security Indicator identifier (e.g., "KSI-IAM-01")language (string): Either "python", "csharp", "powershell", "java", or "typescript" (also accepts "javascript")Returns: Code examples with authentication, evidence collection, and storage
Code Features:
Supported Languages:
Example Usage:
> get_evidence_collection_code with ksi_id="KSI-MLA-01" and language="python"
Output Includes: