# MCP server security checklist: what our audit found

> An MCP server security checklist from our November 2026 audit: bind and Host checks, owner-only actions, file path tools, agent-to-agent trust.

Author: Dominic Frei. Published 2026-12-01, updated 2026-12-01.
Canonical: https://pendpost.com/blog/mcp-server-security-checklist

## Key takeaways

- The MCP spec says servers must validate the Origin header and should bind to 127.0.0.1 when local and authenticate connections; most real gaps sit in what the tools themselves allow.
- A November 2026 audit of pendpost found ten gaps, and most were ways a connected agent could reach a file or an action it should never touch.
- Binding to 0.0.0.0 without a token let any network peer forge a Host header and use every tool, so pendpost now refuses to start in that posture.
- Any tool argument that is a file path is a read primitive: check the file's real type and location, not its name.
- Split actions into what an agent may do and what only the owner may do, and enforce the split on the server, not in the tool description.

An MCP server security checklist has two halves. The transport half comes straight from the spec: validate the `Origin` header, bind to `127.0.0.1` when you run locally, and authenticate every connection. The tool half is where our own audit found the real problems: refuse to start on a network address without a token, keep owner-only actions out of the agent's reach on the server side, treat every file path argument as a way to read files, and never let one agent's output stand in for another's decision. Below is each item, with the gap we found in pendpost and the fix that shipped.

## Why write another MCP server security checklist?

Because the published guidance covers the protocol well and the tools hardly at all, and the tools are where an agent does damage. In November 2026 we audited pendpost, an MCP server that drafts and publishes social posts. The audit found ten gaps. Most of them, in the words of our release notes, "were ways an agent connected over MCP could reach a file or an action it should never touch." None needed a protocol bug. Each was an ordinary feature doing slightly more than intended.

All of them shipped as fixes in pendpost 2.13.0 on 12 November 2026. The full list is in the [changelog](https://pendpost.com/changelog). This post turns the ones that apply to any MCP server into a checklist.

## What are the MCP security best practices in the spec?

The spec's transport and tool sections give you four rules. As of the [2026-07-28 spec](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http), servers using Streamable HTTP:

| Rule | Spec wording | Why |
|---|---|---|
| Validate `Origin` | MUST, and answer an invalid one with 403 | Stops DNS rebinding from a web page |
| Bind to localhost when local | SHOULD bind to 127.0.0.1, not 0.0.0.0 | Keeps other machines out |
| Authenticate connections | SHOULD | Anyone who reaches the port is otherwise trusted |
| Human in the loop | SHOULD always be a human who can deny tool calls ([tools](https://modelcontextprotocol.io/specification/2026-07-28/server/tools)) | The model is not the authority |

The tools page adds one more that matters for server authors: clients must treat tool annotations such as `readOnlyHint` and `destructiveHint` as untrusted unless the server is trusted. So the annotation is documentation. The limit itself has to live in your code.

The MCP project's [security best practices](https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/security_best_practices) page covers the authorization side (confused deputy, token passthrough, SSRF, state handle hijacking, scope minimization) and local server compromise. For a local server over HTTP it recommends requiring an authorization token or using a Unix socket, and stdio where you can. The [OWASP MCP Security Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/MCP_Security_Cheat_Sheet.html) adds least privilege per server and explicit user confirmation for destructive, financial or data-sharing operations. Read both. Neither can tell you which of your own tools does too much, and that is where our audit found its gaps.

## Is binding to localhost enough?

No. Binding is only one of the checks, and the dangerous moment is when someone changes it. pendpost has always bound to `127.0.0.1` by default and kept an allowlist of accepted `Host` headers. The gap was the other posture. With `PENDPOST_HOST=0.0.0.0` and no `PENDPOST_AUTH_TOKEN`, the optional auth gate stayed off and only the Host allowlist was left. A browser cannot fake a Host header. A script on the network can. It sent `Host: 127.0.0.1:8090` and got every REST route, every MCP tool and the Studio owner token.

The container image made this easy to hit. Docker's [port publishing docs](https://docs.docker.com/engine/network/port-publishing/) say a port mapped without a host address is published on all host addresses, and our documented command was `docker run -p 8090:8090`. Inside a container the server has to bind `0.0.0.0`, so the same command on a laptop in a shared network could expose the whole API to everyone on it.

The fix is to fail closed at boot. Since 2.13.0 the server refuses to start in that posture. We ran it while writing this post:

```text
$ PENDPOST_HOST=0.0.0.0 node server.mjs
[err] refusing to listen on 0.0.0.0 without PENDPOST_AUTH_TOKEN: anyone who can
reach this port would control pendpost. Set PENDPOST_AUTH_TOKEN (see
site-docs/always-on.mdx), or publish the port on host loopback only
(docker run -p 127.0.0.1:8090:8090 ...) and set PENDPOST_ALLOW_UNAUTHENTICATED=1.
```

With the explicit opt-out set and the port published on host loopback only, the server starts, and a request with a foreign Host header gets `421 Misdirected Request`. Checklist items:

- Refuse a non-loopback bind without authentication. Make the unsafe posture an explicit flag, not a default.
- Ship your container instructions with `-p 127.0.0.1:PORT:PORT`.
- Treat the Host allowlist as protection against browsers, not against network peers.

## Which actions should an agent never be able to call?

Anything that changes who controls the server: credentials, billing, cloud connections and the approval of the agent's own work. Before 2.13.0, our REST calls that connect, replace, copy or delete platform credentials sat on the same footing as every other call. An agent with HTTP access to the port could reach them, even though the MCP tool list never offered them.

Now those calls, and the ones that connect, migrate, eject, sign out of or bill the cloud, need the Studio owner token, which the dashboard holds and agents do not. Without it the answer is:

```json
{"code":"owner_token_required","message":"this operator action needs the Studio token (x-pendpost-studio-token header); agents cannot run it"}
```

Reads, rechecks, pushes and heals stay open to agents, because an agent that cannot read state cannot help. The other owner-only action is approval itself: the actor that created a post can never approve it. [How a fail-closed approval gate works](https://pendpost.com/blog/human-approval-gate-ai-agents) covers that rule in detail.

- List every route and tool, and mark each one agent-allowed or owner-only.
- Enforce owner-only on the server with a credential the agent never sees.
- Check the REST surface too. An agent with a shell can call your HTTP API directly.

## Why is every file path argument a risk?

Because a tool that reads a path the agent chooses can read any file the process can. Don't lean on MCP roots for this: the [2026-07-28 spec](https://modelcontextprotocol.io/specification/2026-07-28/client/roots) calls them guidance, not access control, and deprecates them. Your server has to confine paths itself. Two of our findings show how that goes wrong in practice:

| Tool argument | Intended use | What an agent could do before 2.13.0 | Fix |
|---|---|---|---|
| `asset_upload` with `filePath` | Copy an image or video into the media library | Copy any local file into the media folder under an image name, then fetch it back over `/media`, including a client's signing key | The file must really be a JPEG, PNG, MP4 or MOV, checked by content |
| `captionPath` on a YouTube post | Attach an `.srt` or `.vtt` subtitle file | Point it at the client's `.env`, which the YouTube lane would upload as captions | Must be a real `.srt` or `.vtt` outside dot folders, with subtitle timings inside, checked on write and again at publish |

Neither tool was written to read secrets. Both took a path and trusted its name. The fix in both cases checks what the file is, not what it is called, and checks it again at the moment of use.

- Check file type by content, not by extension.
- Refuse dot folders and anything outside the workspace.
- Validate again at use time if time passes between write and use.

## Can one agent's output become another agent's permission?

Yes, if you let a message stand in for a decision. pendpost's Radar can draft replies to public threads, and a "respond for me" mode lets the owner's own triage run decide which threads to answer. The audit found that another MCP client could plant a signal and report a decision of its own while the triage agent was idle. Now decisions are accepted only with a token that only that run's brief carries, so the two are bound together. A related fix: a triage decision can no longer queue an original post at all. Only the theme sweep does that, and only behind its own owner setting.

This is OWASP's [excessive agency](https://genai.owasp.org/llmrisk/llm06:2025-excessive-agency/) in small, caused by excessive functionality, permissions and autonomy. OWASP's 2026 reports file it as LLM03:2026. The [OWASP MCP Top 10](https://owasp.org/www-project-mcp-top-10/), in beta as of December 2026, covers tool poisoning and context injection in the same spirit.

- Bind each automated decision to the run that was asked for it.
- Give each automated role the smallest action set it needs.
- Never treat text from a feed, a thread or another tool as an instruction.

## What else belongs on the checklist?

The smaller items, which are easy to skip:

- Links your server hands to the operating system. Our Mac app now passes only `http`, `https` and `mailto` to the system, and a feed item keeps its link only when it is `http` or `https`. A hostile feed could otherwise have opened any URL scheme handler with one click. The MCP best practices page sets the same allowlist rule for authorization URLs.
- Anything your server browses. The automation browser now opens only the platform's own hosts and blocks the daemon's own port on every loopback address.
- Outbound secrets. The cloud key travels only over https, and checkout and billing links open only when they are plain https.
- Share links. A reviewer's link can now decide only the posts waiting for that review.
- CI. Dependabot's auto-merge acts only on Dependabot's own pull request, at the commit CI checked.

## How do I check my own MCP server?

Run the attacks, not just the review. Three tests catch most of the above in minutes:

1. Start the server on `0.0.0.0` without a token. It should refuse.
2. Send a request with a forged `Host` header and one with a foreign `Origin`. Both should be refused.
3. Call every tool that takes a path with `../.env`, a dot folder and a renamed text file. Each should be refused.

pendpost's test suite covers the bind refusal, the owner-only routes and the caption path check, so a regression fails CI. If you want to watch the owner-only split from the agent's side, start pendpost in [mock mode](https://docs.pendpost.com/mock-mode), connect your client to the [MCP server](https://pendpost.com/mcp), and ask the agent to approve its own draft. The [security page](https://pendpost.com/security) and the [approval and circuit breaker docs](https://docs.pendpost.com/approval-and-circuit-breakers) describe the rest of the model.

## Frequently asked questions

### Is a local MCP server safe if it only listens on localhost?

Safer, not safe. Binding to 127.0.0.1 keeps other machines out, but a web page in your browser can still try to reach the port, which is why the MCP spec also requires Origin validation against DNS rebinding. And every process and agent on your own machine can still call the server, so the tools need their own limits.

### What does the MCP spec require for server security?

The Streamable HTTP transport section of the 2026-07-28 spec says servers must validate the Origin header and answer an invalid one with 403, should bind only to localhost when running locally, and should authenticate all connections. The tools section adds that there should always be a human in the loop who can deny tool calls.

### Can I trust MCP tool annotations like readOnlyHint?

No. The spec calls all tool annotations hints and says clients must treat them as untrusted unless they come from a trusted server. A server author should still set them honestly, but the real limit has to be enforced in the server code.

### What is excessive agency in an MCP server?

OWASP defines excessive agency as the weakness that lets an LLM's unexpected, ambiguous or manipulated output cause damaging actions, with excessive functionality, permissions and autonomy as the root causes. It was LLM06 in the 2025 list and OWASP's own 2026 reports file it as LLM03:2026. For an MCP server it means tools that can do more than the task needs.

### What are the most common MCP server vulnerabilities?

The OWASP MCP Top 10, still in beta as of December 2026, starts with token mismanagement and secret exposure, privilege escalation through scope creep, tool poisoning, supply chain tampering and command injection. In our own audit the common thread was simpler: tools that took a path or a request and trusted it. Each one did slightly more than its job.

### Are MCP roots a security boundary?

No. The 2026-07-28 spec calls roots informational guidance rather than an access-control mechanism, says the protocol does not enforce that servers stay within them, and deprecates the feature. A server that takes file paths has to confine them itself.


## Sources

- [MCP specification 2026-07-28: Streamable HTTP transport, security](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http)
- [MCP specification 2026-07-28: tools](https://modelcontextprotocol.io/specification/2026-07-28/server/tools)
- [MCP specification 2026-07-28: roots](https://modelcontextprotocol.io/specification/2026-07-28/client/roots)
- [MCP docs: security best practices](https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/security_best_practices)
- [OWASP Top 10 for LLM applications 2026](https://genai.owasp.org/resource/owasp-genai-llm-top-10-2026/)
- [OWASP: LLM06:2025 Excessive Agency](https://genai.owasp.org/llmrisk/llm06:2025-excessive-agency/)
- [OWASP GenAI exploit roundup Q3 2026 (LLM03:2026 Excessive Agency)](https://genai.owasp.org/2026/10/08/genai-and-agentic-ai-exploit-roundup-q3-2026/)
- [OWASP MCP Security Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/MCP_Security_Cheat_Sheet.html)
- [OWASP MCP Top 10 project](https://owasp.org/www-project-mcp-top-10/)
- [Docker docs: port publishing](https://docs.docker.com/engine/network/port-publishing/)
- [pendpost changelog (2.13.0 security fixes)](https://pendpost.com/changelog)
