data-ai MCP Server
š”ļø The security firewall for AI agent tools & MCP servers (Claude 5, GPT-5.6, Gemini 3.8, Antigravity, Cursor, Codex, Hermes). Catch command injection, secret theft & toxic flows in <50ms. 100% offline Rust SAST + 1-click auto-fix + SARIF.
Discovered via github-topic:mcp and last synced 5d ago.
Install instructions not detected yet
Check the source repository for the latest setup steps.
Math expression evaluator (`2^10 + sqrt(144)`)
`http://localhost:11434`
`false`
Transport CB
Current time in any timezone
`ollama`
`false`
Primary coverage
`8080`
(empty)
open
closed
Cosine similarity to prompt via embeddings
Purpose
(empty)
`10s`
**failing**
Method
Source
`gpt-4o-mini`
(empty)
Trigram deduplication ā detects looping responses
During a chaos scenario: **100 ā 41 ā 78 ā 95**. Judges can watch the number recover in real-time as each component heals. --- ## Cost Savings Tracks estimated token costs per tier and computes savings. ``` Primary (llama3.2): $0.0018 spent Fallback (llama3.2:1b): $0.0004 spent (67% cheaper per token) Cache: $0.0000 spent Saved by cache: $0.0022 (would have cost primary rate) Saved by fallback: $0.0003 (delta vs primary rate) Total saved: $0.0025 (52% savings rate) ``` --- ## Per-Request Resilience Trace Every `Ask()` and `React()` generates a trace showing exactly what happened: ```json GET /trace/tr_a1b2c3d4 { "id": "tr_a1b2c3d4", "prompt": "explain circuit breakers", "total_ms": 1847, "final_tier": "fallback", "steps": [ { "tier": "primary", "latency_ms": 1230, "transport_cb": "closed", "semantic_cb": "failing", "quality_score": 0.18, "quality_signals": ["repetition", "refusal_marker"], "outcome": "semantic_failure" }, { "tier": "fallback", "latency_ms": 617, "transport_cb": "closed", "semantic_cb": "healthy", "quality_score": 0.91, "outcome": "success" } ] } ``` Trace ID is included in every response. Clickable `š trace` link in the dashboard. --- ## Webhook Notifications Configure a webhook to receive alerts when circuit breaker states change: ```bash POST /config/webhook {"url": "https://your-ops-system/alert"} ``` Payload on state change: ```json { "event": "semantic_cb_failing", "model": "primary", "prev_state": "degraded", "new_state": "failing", "reason": "rolling avg quality 38% < failing threshold 45%", "avg_quality": 0.38, "timestamp": "2026-04-30T14:32:01Z" } ``` --- ## Streaming Quality Gate `GET /chat/stream` streams tokens via SSE with an inline quality gate. If refusal/persona-leak markers are detected in the first 120 tokens, the stream aborts and continues from fallback ā automatically. ``` [token1][token2]...[token47] ā from primary ā” quality gate triggered at token 47 ā switching to fallback [token1][token2]... ā from fallback ``` --- ## Quick Start ### Local Ollama (free, default) ```bash # 1. Install Ollama brew install ollama # 2. Pull models (~4GB total) ollama pull llama3.2 ollama pull llama3.2:1b ollama pull nomic-embed-text # for semantic cache + quality coherence # 3. Start Ollama ollama serve # 4. Run AgentShield OLLAMA_URL=http://localhost:11434 go run . # 5. Open dashboard open http://localhost:8080 ``` ### Hosted OpenAI-compatible backend Any provider speaking the `/v1/chat/completions` contract works ā OpenAI, Groq, Together, OpenRouter, vLLM, Mistral, llama.cpp's server. ```bash export LLM_PROVIDER=openai export OPENAI_API_KEY=sk-... export OPENAI_BASE_URL=https://api.openai.com/v1 # or api.groq.com/openai/v1 export OPENAI_PRIMARY_MODEL=gpt-4o-mini export OPENAI_FALLBACK_MODEL=gpt-4o-mini # cheaper model is the safety net # Optional: keep embeddings on local Ollama (free) or run them through OpenAI: # export OPENAI_EMBED_MODEL=text-embedding-3-small go run . ``` ## Configuration
(empty)
`true`
Searches embedded resilience knowledge base
ā
(empty)
Returns live AgentShield metrics
`https://api.openai.com/v1`
`info`
`gpt-4o-mini`
Naive useful%
`text`
Parser
Regex parser
What AgentShield does
37 built-in contextual rules plus a declarative YAML custom rule engine (`.agentshield/rules/*.yaml`).
AgentShield is not a hosted monitoring service, runtime sandbox, or allowlist marketplace. Experimental runtime guard entrypoints are available behind opt-in feature flags; the stable contract is static scanning plus policy evaluation.
How AgentShield helps
Supported
General SAST for code vulnerabilities and quality issues
Hardcoded secrets across Git history and source files
Custom SAST rules, language-specific checks, SCA, and security policy
MCP, agent tools, prompt surfaces, filesystem/network/process capabilities, egress policy, SARIF, and runtime guard experiments
AgentShield
No
Runtime/cloud-oriented
Status
Cursor rule files and related agent guidance surfaces
Supported
Purpose
Flag
`--format console`
`--format json`
`--format sarif`
`--format html`
Meaning
Scan passed with no findings above threshold
Scan failed with findings above threshold
Scan error (e.g., invalid config); no supported adapter found is surfaced as scanner error and can be controlled by action `strict` mode
Runtime guard blocked or failed closed on invalid runtime input
Regex parser with source/sink patterns
MCP-focused