agent-tracking

Agent Guardrails & Monitoring · Guide

How do I audit MCP server security and detect config drift across my team?

Model Context Protocol (MCP) servers give coding agents direct access to databases, GitHub, Stripe, and internal APIs. The highest real-world risks in engineering teams are unpinned npx packages, cleartext http:// endpoints, hardcoded JSON secrets, blanket Bash(*) permissions, and unnoticed config drift. A zero-prompt local audit catches these risks immediately without ever transmitting source code or credentials.

By · Updated 2026-11-25

Diesen Guide auf Deutsch lesen

MCP server constellation highlighting an anomalous drifted server isolated by an inspection ring
Continuous SHA-256 config fingerprinting detects shadow MCP additions and permission changes without ever reading secret values.

Why shadow MCP servers are the #1 blind spot for engineering leads

Across a 25-person engineering org in 2026, developers simultaneously run Claude Code, Cursor, Codex CLI, Gemini CLI, and Antigravity. Any engineer can paste a community MCP server snippet into .mcp.json, ~/.claude.json, or ~/.cursor/mcp.json in ten seconds.

Traditional MDM, SIEM, and endpoint tools do not inspect coding-agent config files. Meanwhile, cloud LLM tracing platforms require uploading prompts and tool payloads—which most CISOs, GDPR officers, and European works councils immediately reject.

1. LOCAL CONFIGS.mcp.json · ~/.claude.json.cursor/mcp.json · CLAUDE.mdChecks: unpinned npx, http://, wildcardsSecrets stay 100% local2. SHA-256 FINGERPRINTDrift ComparisonFlags added MCP servers, altered rules & first-time tools.hash(config) != prev_hash3. TEAM ALERT & AUDITInstant Drift AlertSlack / Telegram / Webhook + GDPR-safe EU audit record.EU / DE Server · AGPL-3.0
How zero-prompt MCP auditing works: only cryptographic fingerprints and sanitized counts leave the developer machine.

MCP security risk matrix & concrete mitigations

Every item below maps to real operational vulnerabilities documented in the Model Context Protocol security specification and OWASP's guidance for LLM/agentic tool integrations:

Risk categoryWhat it looks like in configReal-world impactHow to detect & fix
Unpinned npx supply-chain drift"command": "npx", "args": ["-y", "@org/mcp"]Upstream package update silently executes new code on next restartFlag unpinned npx via agenttracking audit; pin exact @1.2.3 versions
Cleartext remote http:// MCP"url": "http://mcp.internal.example/sse"Auth headers and tool arguments exposed on network transitEnforce https:// for all non-localhost endpoints
Inline plaintext secrets in JSON"env": { "API_KEY": "sk_live_..." }Accidental commit of .mcp.json leaks production tokensDetect inline secret keys locally (never read values); use ${ENV_VAR} or vault
Blanket wildcard permissions"allow": ["Bash(*)", "Write(*)"] or bypass modeTool poisoning or prompt injection gains unrestricted shell executionTighten allowlists + enforce agenttracking guard --block-destructive on
Silent MCP / CLAUDE.md driftNew MCP server or first-time tool appears on a laptopShadow AI integration or rug-pull tool definition goes unnoticedMonitor SHA-256 config fingerprints & first-time tool alerts across the fleet
Zero-Prompt Governance (EU / GDPR)

Agent Tracking's audit and drift engine hashes configuration structures locally on the developer's machine. Secret values, prompts, and repository contents never leave the laptop—making security rollout straightforward even in strict GDPR / German Mittelstand environments.

Run an instant 100% offline MCP security scan

You can run a full MCP, permission, and guardrail audit on any macOS or Linux developer machine right now with zero account and zero network calls. Add --json to integrate into CI or internal security compliance scripts:

# Run 100% offline MCP & agent safety audit (zero upload)
curl -fsSL https://agenttracking.co/install.sh | sh -s -- audit

# Machine-readable JSON output for security teams / CI
agenttracking audit --json

# Example findings caught locally:
# [HIGH]   No runaway-loop or spend circuit breaker configured
# [HIGH]   1 remote MCP server(s) use unencrypted http://
# [MED]    2 MCP server(s) run unpinned npx packages
# [MED]    1 MCP server config(s) contain inline plaintext secret env vars

Continuous fleet drift alerts for teams

A one-time audit is a snapshot; real security requires drift detection. When machines are connected to Agent Tracking Pro or Team & Governance, every session sends a sanitized configuration fingerprint (MCP server count, plugin hash, CLAUDE.md hash, permission rule hash) and alerts Slack or Telegram whenever a machine adds an MCP server, modifies rules, or invokes a tool for the first time.

Test the drift alert workflow in our interactive live fleet demo (click billing-service to inspect a real MCP drift event).

Frequently asked questions

Does `agenttracking audit` ever upload my `.mcp.json` or environment variables?

Never. agenttracking audit executes 100% locally with zero outbound HTTP requests. Even when you later connect to the cloud dashboard, only SHA-256 hashes and integer counts are sent—never keys, values, or prompts.

Which agent MCP config files does `agenttracking audit` inspect?

It checks ~/.claude/settings.json, ~/.claude.json, ./.mcp.json, ~/.cursor/mcp.json, ~/.gemini/settings.json, and ~/.gemini/antigravity/mcp_config.json.

Why are unpinned `npx -y` MCP servers dangerous?

Without an explicit @major.minor.patch version, npx -y automatically fetches the latest registry tag. A compromised maintainer account or malicious release can execute arbitrary code with your developer credentials on the very next session.

How does Team & Governance work for 10–200 engineers?

Team plans (starting at $99/month, invoice billing available) provide a shared fleet view across all developer machines, shadow-MCP & config-drift alerts, centralized guardrail baselines, EU hosting in Germany, and AGPL-3.0 self-hosting if required.

Can we run the audit in GitHub Actions or device compliance checks?

Yes. Run agenttracking audit --json to get a structured 0–100 score, letter grade, and machine-readable finding array.

Primary sources & documentation