DecaGuard MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
DecaGuard MCP Server
AI-powered code smell detection and security analysis server using the Model Context Protocol (MCP).
Quick Start
Option 1: Using npx (Recommended)
No installation required! Use directly via npx:
Configure Cursor IDE
Edit ~/.cursor/mcp.json (create if it doesn't exist):
With OpenAI:
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"OPENAI_API_KEY": "your-api-key-here"
}
}
}
}With OpenRouter (Recommended for flexibility):
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-your-key-here",
"LLM_MODEL": "openai/gpt-4o-mini"
}
}
}
}With Local Ollama (Privacy-focused):
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"LLM_BASE_URL": "http://localhost:11434/v1",
"LLM_MODEL": "codellama"
}
}
}
}Restart Cursor
Completely quit and restart Cursor IDE.
Option 2: Install via npm
npm install -g deca-guard-mcp-serverThen configure ~/.cursor/mcp.json:
{
"mcpServers": {
"decaguard": {
"command": "deca-guard-mcp-server",
"env": {
"OPENAI_API_KEY": "your-api-key-here"
}
}
}
}Option 3: Local Development Setup
For development or local installation:
git clone https://github.com/tomtarpey/deca-guard-mcp-server.git
cd deca-guard-mcp-server
npm installThen configure ~/.cursor/mcp.json:
{
"mcpServers": {
"decaguard": {
"command": "node",
"args": ["/absolute/path/to/deca-guard-mcp-server/index.js"],
"env": {
"OPENAI_API_KEY": "your-api-key-here"
}
}
}
}Related MCP server: Argus MCP
Usage
After configuration, open any code file in Cursor and ask:
"Analyze this code for security vulnerabilities"
"Check this file for code smells"
"Review this code for quality and security issues"
Available Tools
1. analyze_code_smells
Detects maintainability issues:
Long methods
Duplicated code
Large classes
Feature envy
Primitive obsession
Dead code
Magic numbers
Nested conditionals
2. analyze_security_vulnerabilities
Scans for security issues:
SQL/Command injection
XSS vulnerabilities
Hardcoded secrets
Insecure cryptography
Broken authentication
Path traversal
Insecure deserialization
Input validation issues
Sensitive data exposure
3. analyze_code_quality_and_security
Combined analysis in a single call.
Supported Languages
JavaScript
TypeScript
Python
Java
Go
Rust
Configuration Options
Using Different LLM Providers
DecaGuard supports multiple LLM providers through OpenAI-compatible APIs. Configure your provider by setting the appropriate environment variables in mcp.json.
OpenAI (Default)
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"OPENAI_API_KEY": "sk-...",
"LLM_MODEL": "gpt-4o-mini"
}
}
}
}OpenRouter
OpenRouter provides access to multiple models from different providers at competitive prices. Get your API key from openrouter.ai.
Basic Setup:
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-...",
"LLM_MODEL": "openai/gpt-4o-mini"
}
}
}
}Example: Using Claude 3.5 Sonnet (High Quality)
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-...",
"LLM_MODEL": "anthropic/claude-3.5-sonnet"
}
}
}
}Example: Using GPT-4 Turbo (Best Quality)
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-...",
"LLM_MODEL": "openai/gpt-4-turbo"
}
}
}
}Example: Using Gemini Pro (Cost-Effective)
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-...",
"LLM_MODEL": "google/gemini-pro-1.5"
}
}
}
}Example: Using Llama 3.1 (Open Source)
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-...",
"LLM_MODEL": "meta-llama/llama-3.1-70b-instruct"
}
}
}
}Example: Using Mistral Large (Fast & Accurate)
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-...",
"LLM_MODEL": "mistralai/mistral-large"
}
}
}
}Popular OpenRouter Models for Code Analysis:
Model | Best For | Speed | Cost |
| Fast analysis, cost-effective | ⚡⚡⚡ | $ |
| Best quality analysis | ⚡⚡ | $$$ |
| High quality, detailed reports | ⚡⚡ | $$$ |
| Fast, good quality | ⚡⚡⚡ | $$ |
| Balanced performance | ⚡⚡ | $$ |
| Open source, privacy-focused | ⚡⚡ | $ |
| Fast and accurate | ⚡⚡⚡ | $$ |
| With web search context | ⚡⚡ | $$ |
See all available models and pricing at openrouter.ai/models.
Benefits of OpenRouter:
Access to 100+ models from different providers
Automatic failover and load balancing
Competitive pricing
Single API key for multiple providers
No need to manage multiple API keys
Local LLMs (Ollama, LM Studio, etc.)
Run models locally for privacy, cost savings, and offline use. Works with any OpenAI-compatible API.
Ollama (Recommended for Local):
Install Ollama from ollama.ai
Start the server and pull a model:
ollama serve
ollama pull codellama # Code-specific model
ollama pull llama3.1:70b # General purpose, high quality
ollama pull mistral # Fast and efficient
ollama pull deepseek-coder # Code-focused modelConfigure in
mcp.json:
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"LLM_BASE_URL": "http://localhost:11434/v1",
"LLM_MODEL": "codellama"
}
}
}
}Example: Using Llama 3.1 70B (Best Quality)
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"LLM_BASE_URL": "http://localhost:11434/v1",
"LLM_MODEL": "llama3.1:70b"
}
}
}
}Example: Using DeepSeek Coder (Code-Focused)
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"LLM_BASE_URL": "http://localhost:11434/v1",
"LLM_MODEL": "deepseek-coder"
}
}
}
}LM Studio:
Download and install LM Studio
Load a model and start the local server
Configure in
mcp.json:
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"LLM_BASE_URL": "http://localhost:1234/v1",
"LLM_MODEL": "your-model-name"
}
}
}
}vLLM (High Performance):
For running models with high throughput:
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"LLM_BASE_URL": "http://localhost:8000/v1",
"LLM_MODEL": "codellama/CodeLlama-34b-Instruct-hf"
}
}
}
}Text Generation WebUI:
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"LLM_BASE_URL": "http://localhost:5000/v1",
"LLM_MODEL": "your-model-name"
}
}
}
}LocalAI:
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"LLM_BASE_URL": "http://localhost:8080/v1",
"LLM_MODEL": "gpt-4"
}
}
}
}Recommended Local Models for Code Analysis:
CodeLlama (
codellama) - Specialized for code, good balanceDeepSeek Coder (
deepseek-coder) - Excellent for code understandingLlama 3.1 70B (
llama3.1:70b) - Best quality, requires more RAMMistral (
mistral) - Fast and efficientStarCoder (
starcoder) - Code generation and analysis
Benefits of Local LLMs:
Complete privacy - code never leaves your machine
No API costs
Works offline
No rate limits
Full control over model selection
Anthropic Claude
Direct integration with Anthropic's Claude models.
Example: Claude 3.5 Sonnet (Recommended)
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-...",
"LLM_BASE_URL": "https://api.anthropic.com/v1",
"LLM_MODEL": "claude-3-5-sonnet-20241022"
}
}
}
}Example: Claude 3 Opus (Highest Quality)
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-...",
"LLM_BASE_URL": "https://api.anthropic.com/v1",
"LLM_MODEL": "claude-3-opus-20240229"
}
}
}
}Example: Claude 3 Haiku (Fast & Cost-Effective)
{
"mcpServers": {
"decaguard": {
"command": "npx",
"args": ["-y", "deca-guard-mcp-server"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-...",
"LLM_BASE_URL": "https://api.anthropic.com/v1",
"LLM_MODEL": "claude-3-haiku-20240307"
}
}
}
}Available Claude Models:
claude-3-5-sonnet-20241022- Best balance of quality and speedclaude-3-opus-20240229- Highest quality, slowerclaude-3-sonnet-20240229- Good quality, balancedclaude-3-haiku-20240307- Fastest, most cost-effective
Environment Variables Reference
Variable | Description | Default |
| OpenAI API key | - |
| OpenRouter API key (takes priority) | - |
| Anthropic API key | - |
| Custom base URL for LLM API | Auto-detected for OpenRouter |
| Model name to use |
|
Troubleshooting
Server not starting
Check that Node.js (v18+) is installed:
node --versionVerify the command in mcp.json is correct
Check logs in Cursor's developer console
Tools not appearing
Restart Cursor completely
Verify mcp.json syntax is valid JSON
Check that API key is set correctly
Analysis taking too long
Use a faster model (e.g., gpt-4o-mini)
Consider analyzing smaller code snippets
Check your API rate limits
Development
Test the server locally
npm testRun in development mode (with auto-reload)
npm run devPublishing
For maintainers, to publish a new version to npm:
npm version patch|minor|major
npm publishThe prepublishOnly script will automatically verify the package before publishing.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI code governance and code review for Claude Code, Copilot and Cursor. Checks rules and security.
Security scanner for AI-written code: SAST, secrets, dependencies, IaC, containers and DAST.
AI-powered codebase analysis — call graphs, security, dead code, complexity. 150+ tools.
Scores your code across 12 areas, with findings, fix prompts, and re-assessment in your AI agent
Related MCP Servers
- AlicenseAqualityDmaintenanceAI-powered code review tool that detects AI-generated code defects invisible to traditional linters — hallucinated packages, deprecated APIs, cross-file contradictions, hidden security anti-patterns, and over-engineering. Works as a standalone CLI, GitHub Action, or MCP server. Supports TypeScript, Python, Java, Go, and Kotlin. Free for individuals, no API key required.442Business Source 1.1
- AlicenseNot gradedqualityDmaintenanceEnables AI-powered, zero-trust code review with multiple models, supporting single files, git diffs, and multiple files, with security, performance, and architecture checks across 10+ languages.15MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI-powered code review and improvement, including analysis, refactoring suggestions, and automatic test generation, with an optional agentic loop for iterative refinement.MIT
- AlicenseAqualityDmaintenanceAI-powered code review assistant that analyzes repositories for security vulnerabilities, performance bottlenecks, and code quality issues through natural language interactions.2MIT