Prompt injection before tool use
MCP tools expose names, descriptions, resources, and prompts to the model. A malicious server can hide instructions in those descriptions, influencing the agent before the user intentionally calls that tool.
Tool poisoning and shadowing
One malicious MCP can try to shape how the model uses other tools, e.g. by telling it to exfiltrate secrets through a trusted-looking workflow or to prefer the malicious tool.
Executable third-party code
Local stdio MCPs may run npx, uvx, bootstrap scripts, package installs, or cloned repo code. That is not just “configuration”; it is code execution.
Risk
Hermes control
Best practice
Credential leakage
Filtered stdio environment; only safe baseline env vars plus explicitly configured env are passed.
Give each server only the one token/scope it needs; rotate and revoke aggressively.
Oversized tool surface
tools.include, tools.exclude, and toggles for resources/prompts.
Expose the smallest practical tool set. Default to allowlists for untrusted or powerful servers.
Prompt/resource injection
Tool-selection UI and server-level config; Hermes also documents prompt-injection/security scanning outside MCP.
Disable prompt/resource wrappers unless needed; inspect tool descriptions and upstream source.
Server-initiated LLM calls
Per-server sampling config: enable/disable, token caps, timeouts, rate limits, model allowlists, max tool rounds.
Set sampling: { enabled: false } for untrusted servers.
Remote MCP trust
HTTP headers/OAuth/TLS options and token storage under ~/.hermes/mcp-tokens/.
Treat remote MCPs like vendors with access to sensitive workflow context.