Skip to content

Common MCP Server Mistakes

Frequent errors when building MCP servers — too many tools, stdout logging, oversized outputs, weak auth — and fixes.

Editorial team 1 min read

MCP servers often fail in predictable ways. Avoiding these mistakes saves debugging time and protects users.

Too Many Tools

Exposing every API endpoint as a tool bloats context and confuses models. Fix: offer fewer, task-oriented tools.

Vague Descriptions

"Gets data" tells the model nothing. Fix: describe purpose, usage, inputs and outputs precisely.

Logging to stdout

In stdio servers, stray output corrupts the protocol. Fix: log to stderr.

Huge Outputs

Returning thousands of records floods context. Fix: paginate, filter and summarise.

Unhelpful Errors

Stack traces don't help models recover. Fix: return clear error messages with suggestions.

Weak Authorisation

Skipping token validation or accepting tokens meant for other services. Fix: validate tokens and apply per-user permissions.

Unsafe Input Handling

Passing arguments into shell commands or SQL unsafely. Fix: validate inputs and use parameterised queries.

Ignoring Side Effects

Write tools without clear warnings or confirmation hints. Fix: mark destructive tools and keep them separate from read tools.

No Tests

Fix: test with an inspector, automated tests and real model interactions.

More in MCP

All MCP guides →
MCP Guide · 1 min

MCP Architecture: Hosts, Clients and Servers

How the Model Context Protocol is structured: the host application, the clients it creates and the servers that expose capabilities.

MCP 1 min read 2 Sep 2025

MCP Guide · 2 min

MCP Tools, Resources and Prompts

The three main things an MCP server can offer, who controls each, and when to use which.

MCP 2 min read 1 Sep 2025

MCP Guide · 1 min

MCP Transports: stdio and HTTP

How MCP messages travel: standard input and output for local servers, HTTP for remote ones, and how to choose.

MCP 1 min read 31 Aug 2025

MCP Guide · 1 min

Building Your First MCP Server

A walkthrough of the steps to create a simple MCP server that exposes a tool, and how to test it.

MCP 1 min read 30 Aug 2025