MCP Server
The MCP server plugs MergeGuide into AI assistants. Claude Code, Cursor, and any MCP-compatible tool can check code against your policies before suggesting it.What is MCP?
Model Context Protocol (MCP) is an open standard for integrating external tools into AI assistants. MergeGuide provides an MCP server that works with Claude Code, Cursor, and other compatible clients.Installation
Configuration
Claude Desktop
Add to~/Library/Application Support/Claude/claude_desktop_config.json:
Cursor
Add to Cursor settings:VS Code with Continue
Add to.continue/config.json:
Available Tools
The MCP server exposes 10 tools to AI assistants:check_policy
Check a code snippet against a specific policy.
list_policies
List all policies available for the organization, including framework mappings and enabled state.
scan_repository
Run a full policy scan on the current repository.
scan_vulnerabilities
Scan dependencies for known vulnerabilities.
scan_licenses
Audit dependency licenses for compliance with your organization’s allowed license policy.
scan_cicd
Inspect CI/CD pipeline configuration files for security issues.
scan_iac
Scan Infrastructure as Code files (Terraform, CloudFormation, Kubernetes manifests) for misconfigurations.
generate_evidence
Generate compliance evidence artifacts for a specified framework.
generate_sbom
Generate a Software Bill of Materials.
get_remediation
Get remediation guidance for a specific violation type.
How AI Assistants Use MergeGuide
When writing code with an AI assistant, MergeGuide tools are available as part of the assistant’s context:- Pre-check suggestions — Before suggesting code, verify it passes your organization’s policies
- Explain violations — When you share code that violates a policy, the assistant explains why
- Suggest fixes — Get policy-compliant alternatives for flagged patterns
- Generate evidence — Ask the assistant to generate compliance artifacts for your auditor
Example Interaction
You: Write a database connection function AI (with MergeGuide):I’ll check this against your security policies before suggesting it.Passes your active policies:
no-hardcoded-secrets— connection string from environment variableno-sql-injection— parameterized query interface- SSL enabled in production
Environment Variables
| Variable | Description | Required |
|---|---|---|
MERGEGUIDE_API_KEY | API key for authentication | Yes |
MERGEGUIDE_ORG | Organization ID (uses default from key if omitted) | No |
MERGEGUIDE_API_URL | Custom API endpoint | No |
MERGEGUIDE_LOG_LEVEL | Logging level: debug, info, warn, error | No |
Troubleshooting
Server Not Starting
Authentication Errors
Tools Not Appearing
- Restart your AI assistant
- Verify MCP configuration JSON syntax
- Check server is running:
ps aux | grep mcp-server
Security Notes
- API keys are stored in your local MCP configuration
- Code is sent to the MergeGuide API for analysis
- No code is retained after analysis completes
- Use organization-scoped API keys for shared team environments