Skip to content

Commit 012219c

Browse files
dinasaur404GregBrimble
authored andcommitted
Add best practices to MCP docs (#22114)
1 parent e99efc2 commit 012219c

File tree

1 file changed

+6
-0
lines changed
  • src/content/docs/agents/model-context-protocol

1 file changed

+6
-0
lines changed

src/content/docs/agents/model-context-protocol/index.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ The MCP standard supports two modes of operation:
2626
- **Remote MCP connections**: MCP clients connect to MCP servers over the Internet, establishing a [long-lived connection using HTTP and Server-Sent Events (SSE)](/agents/model-context-protocol/transport/), and authorizing the MCP client access to resources on the user's account using [OAuth](/agents/model-context-protocol/authorization/).
2727
- **Local MCP connections**: MCP clients connect to MCP servers on the same machine, using [stdio](https://spec.modelcontextprotocol.io/specification/draft/basic/transports/#stdio) as a local transport method.
2828

29+
### Best Practices
30+
- **Tool design**: Don’t treat your MCP server as a wrapper around your full API schema. Instead, build tools that are optimized for specific user goals and reliable outcomes. Fewer, well-designed tools often outperform many granular ones, especially for agents with small context windows or tight latency budgets.
31+
- **Scoped permissions**: Deploying several focused MCP servers, each with narrowly scoped permissions, reduces the risk of over-privileged access and makes it easier to manage and audit what each server is allowed to do.
32+
- **Tool descriptions**: Detailed parameter descriptions help agents understand how to use your tools correctly — including what values are expected, how they affect behavior, and any important constraints. This reduces errors and improves reliability.
33+
- **Evaluation tests**: Use evaluation tests (“evals”) to measure the agent’s ability to use your tools correctly. Run these after any updates to your server or tool descriptions to catch regressions early and track improvements over time.
34+
2935
### Get Started
3036

3137
Go to the [Getting Started](/agents/guides/remote-mcp-server/) guide to learn how to build and deploy your first remote MCP server to Cloudflare.

0 commit comments

Comments
 (0)