MCP Configuration
Insecure MCP server configurations that weaken security boundaries or expose sensitive settings
What is mcp configuration?
MCP configuration issues are security problems in how an MCP server is set up, not in what its tools do. These include overly permissive CORS policies, disabled authentication, exposed debug endpoints, insecure transport settings, missing rate limits, and configurations that allow the server to be accessed from unintended networks.
Think of it this way: a tool might be perfectly safe, but if the MCP server hosting it accepts connections from anywhere, does not authenticate clients, and logs all requests (including credentials) to a world-readable file, the tool safety is irrelevant. The server configuration has already compromised everything.
Aguara MCP configuration rules check for seven common misconfiguration patterns. These are not theoretical risks. They are the same classes of misconfiguration that have caused countless breaches in web applications, APIs, and microservices. The AI agent ecosystem is repeating these mistakes because MCP server development is moving fast, and security configuration is not most developers first priority.
Why this matters for AI agents
MCP servers occupy a uniquely sensitive position. They sit between the AI agent (which has broad access to user data and capabilities) and the tools that actually execute actions. A misconfigured MCP server is not just an insecure API. It is an insecure API with the ability to influence an AI agent behavior.
Consider a local MCP server with authentication disabled. Any process on the user machine can connect to it and issue tool calls. A browser exploit, a malicious Electron app, or even a compromised npm package running a post-install script can connect to the open MCP server and use the agent tools. The user does not know because the MCP server does not distinguish between the legitimate agent and the attacker.
Remote MCP servers with misconfigured CORS or transport security are exposed to the internet. If they are hosting tools with file system access, command execution, or credential access, the attacker does not even need to be on the same machine. They just need to find the server endpoint, which is often discoverable through registry listings or DNS scanning.
Real-world examples
An MCP server ships with a default configuration that binds to 0.0.0.0 (all interfaces) instead of 127.0.0.1 (localhost only). The developer intended it for local use, but the default config exposes it to the local network. Anyone on the same Wi-Fi can connect and issue tool calls.
A server configuration includes auth_required: false with a comment saying "TODO: enable in production." The skill is published to a registry with this default. Users who install it get an unauthenticated MCP server running on their machine, accessible to any local process.
A server has debug mode enabled in its published configuration, which logs all tool inputs and outputs (including file contents and credentials) to a file in /tmp. The log file is world-readable. Another process on the machine reads the log and exfiltrates credentials that the agent passed through MCP tool calls.
How to protect against it
Before publishing an MCP server, review every configuration option. Bind to localhost by default. Require authentication. Disable debug logging. Use TLS for any non-local transport. Set restrictive CORS policies. These are table-stakes security practices, not optional hardening.
Document your server security configuration clearly. Users need to understand what each setting does and what the security implications are. If a setting trades security for convenience (like disabling auth for local development), make the trade-off explicit and provide instructions for securing it in production.
As a user, check the configuration files of every MCP server you install. Look for bind addresses, authentication settings, and transport security. If the server binds to all interfaces or does not require auth, reconfigure it before connecting your agent. Five minutes of configuration review can prevent a full compromise.
Aguara detection rules (7)
Detects MCP server configs using npx to run packages without version pinning
Detects shell metacharacters (pipes, backticks, subshells) in MCP server command arguments
Detects hardcoded API keys, tokens, or passwords in MCP server environment configuration
Detects MCP server configurations connecting to non-localhost remote URLs
Detects MCP servers using inline code execution via -e, -c, or eval flags
Detects Docker containers in MCP configs with privileged mode or dangerous host mounts
Detects -y, --yes, or --auto-approve flags in MCP/skill install commands that bypass user confirmation
Want to check if your skills have mcp configuration issues?
Scan now (free, runs in your browser)