Back to skill

Security audit

mcp-config

Security checks for vulnerabilities and agentic risk

Overview

This MCP configuration skill is mostly coherent, but it gives copy-paste guidance that can persistently change agent integrations and run unpinned external packages without enough safety warnings.

Review this skill before installing. Use it only when you intentionally want help changing MCP configuration, pin package versions where possible, verify package publishers, avoid committing .mcp.json entries with secrets or machine-specific paths, and treat agent config files and debug logs as sensitive.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (18)

MCP Config Access

High
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill accesses MCP server configuration files (mcp.json). MCP configs contain server URLs, authentication tokens, and tool definitions — reading them allows the skill to discover and potentially abuse other tool integrations.

Content

Scanner excerpt · diagnostics.md (reported line 26)May include surrounding context.

1. Quick Status Check (Start Here)

bash
# List all MCP servers and their connection status
claude mcp list

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · diagnostics.md (reported line 37)May include surrounding context.

md
| Priority | File | Description |
|----------|------|-------------|
| 1 | `~/.claude.json` | **Claude Code global MCP config** (mcpServers section) |
| 2 | `~/.claude/settings.json` | Claude Code settings mcpServers |
| 3 | `~/.claude/settings.local.json` | Local overrides |
| 4 | `.mcp.json` (project root) | Project-level MCP config |
| 5 | `~/.config/claude/mcp.json` | User-level (legacy) |

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · diagnostics.md (reported line 38)May include surrounding context.

md
|----------|------|-------------|
| 1 | `~/.claude.json` | **Claude Code global MCP config** (mcpServers section) |
| 2 | `~/.claude/settings.json` | Claude Code settings mcpServers |
| 3 | `~/.claude/settings.local.json` | Local overrides |
| 4 | `.mcp.json` (project root) | Project-level MCP config |
| 5 | `~/.config/claude/mcp.json` | User-level (legacy) |
| 6 | `~/.utcp_config.json` | UTCP-specific config |

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · diagnostics.md (reported line 116)May include surrounding context.

ls -lt ~/.claude/debug/ | head -5

Read a specific log

cat ~/.claude/debug/.txt

text

### 5. Manual Server Test

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list includes broad phrases such as "MCP error", "MCP connection failed", and especially "code-mode not working", which can overlap with ordinary troubleshooting requests and cause the skill to activate in contexts where the user did not intend MCP configuration help. This is not code-execution dangerous by itself, but it can misroute the agent, increase exposure to unrelated configuration files, and produce incorrect or overly invasive guidance during normal support workflows.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The example instructs users to run an unpinned package via npx, which will resolve and execute the latest published version at install time. If the package is compromised, typo-squatted, or changed upstream, users could execute attacker-controlled code on their machine during MCP server setup.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

This example again uses npx with an unpinned package name, creating a supply-chain risk because the fetched code is not fixed to a known-good version. In an MCP configuration skill, this is more dangerous because the guidance is procedural and likely to be copied verbatim by users configuring a trusted agent integration.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The postgres example encourages an MCP server to run with --access-mode=unrestricted and shows credentials embedded directly in DATABASE_URI without any warning about the security implications. In a configuration catalog intended for copy/paste use, this can normalize overly broad database access and secret exposure in shell history, config files, logs, or source control.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding

uvx/uv tool run commands without ==version create a rug-pull risk.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding

uvx/uv tool run commands without ==version create a rug-pull risk.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding

uvx/uv tool run commands without ==version create a rug-pull risk.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding

The example uvx mcp-server-qdrant describes invoking a package without an exact version. If a user follows this pattern, uvx may resolve and execute an unpinned current release, creating supply-chain risk similar to unpinned npx usage.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The documentation instructs users to run npx -y @utcp/code-mode-mcp without pinning an exact package version. Because npx resolves the latest published package by default, a future malicious or compromised release could be executed during troubleshooting, turning a diagnostic step into remote code execution on the user's machine.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This is a second instance of the same unpinned npx -y @utcp/code-mode-mcp command, now combined with an environment variable. The environment variable does not reduce risk; the command still fetches and executes whatever version is current, which could be abused if the package supply chain is compromised.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The example shows a full plaintext DATABASE_URI containing embedded username and password, which normalizes unsafe secret handling in configuration documentation. In the context of an MCP configuration skill, users may copy this example directly into real config files, leading to credential exposure in dotfiles, repositories, logs, screenshots, or shell history.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The instructions say .mcp.json may be edited manually for project-scope removal, but do not explicitly warn that this file is repository-scoped and may be committed, affecting teammates and CI/project behavior. In this skill's context, that omission matters because project-scope MCP settings are intended for team sharing, so changes can silently alter trusted tooling configuration across the repository.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The example uses npx my-mcp-server without pinning a specific version, which can cause different code to be fetched and executed over time. In an MCP configuration context, this is more dangerous than a generic example because users may copy the command directly into persistent agent/server setup, creating a supply-chain execution risk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.