Test your own MCP server
Connect an MCP server, see every tool an AI agent would see, call a tool with checks, and be told when a tool changes or looks unsafe.
In short
"MCP servers", under "Build" › "Mocks, streams & docs", tests an MCP server you build or run. "Discover" connects to it and lists every tool, resource and prompt an AI agent would see. A safety review reads the tools for hidden instructions and unsafe hints, you approve the listing, and every later discovery says what changed since. You can call any tool with checks and save the call to run again.
Before you start
- Who: anyone who can open the project sees its MCP servers. "Discover" and calling a tool need Run on the project. Adding, changing or deleting a server, saving a call, approving a listing and dismissing a finding need Edit.
- Plan: every plan. Each discovery and each call counts 1 API request.
- First: the server's Streamable HTTP address, reachable from the internet, and the token it asks for, if any. {{brand}} connects from its own servers, never to a private address.
Steps
- Open "Build", choose "Mocks, streams & docs" and open "MCP servers".
- Press "New MCP server". To try it first, press "Try the sandbox MCP server": a small bookstore server with one unsafe tool description on purpose.
- Give it a "Name" and its "Address", starting with http:// or https://. Under "Headers", add what it needs, one per line as Name: value, with a token in a variable - for example Authorization: Bearer {{mcpToken}}. Press "Save".
- Press "Discover". It shows "Connecting…" while it reads the server.
- Read the line under it: the server's name and version, its protocol, how many tools and how long it took.
Result: "Tools" lists each tool with what it may do - "Read-only" or "May change data" - and hints such as "Destructive", "Safe to repeat" or "Reaches outside". The safety review and the changes sit above it.
Review the tools and approve the listing
- Read "Safety review". Each finding says how serious it is (High, Medium or Low), which tool it is about - or "The server" - what is wrong and what was seen.
- If a finding does not apply, press "Dismiss", say why in "Why it does not apply" and press "Dismiss finding". "Bring back" puts it back.
- When the tools are what you expect, press "Approve this listing" under "Changes since the approved listing".
- After a later "Discover", read that part again: each tool, resource or prompt added, removed or changed, marked "Breaking", "Review" or "Safe". Approve the new listing when it is right.
The review reads tool names, descriptions and hints by fixed rules. It flags, for example, text that talks to the AI model instead of describing the tool, characters a person cannot see, a tool whose name says it changes something but is not marked, and a server that answers without the credential you gave it.
Call a tool with checks
- Under "Tools", click the tool. "Call" opens with its name.
- Fill its arguments in "Form", or switch to "JSON" and write one JSON object.
- If the tool is not marked read-only, tick "This call may change data on the server". Calls run against the real server.
- Under "Checks", press "Add a check" and choose "What to check", for example "The tool did not fail", "Text contains", "JSON field", "Time in ms" or "Matches the output schema". A call has at most 20 checks.
- Press "Call" and read the "Answer": whether the tool answered or said it failed, its text or structured content, each check, and "Messages exchanged".
- To keep it, type a "Call name" and press "Save as a call". It is listed under "Saved calls" with "Run", "Open" and "Delete".
Good to know
- This tests an MCP server you build. To let a coding agent use {{brand}} itself, see /help/api-testing/coding-agents.
- Once the project has a server, "New MCP server" is the last choice in the "MCP server" list above it.
- Credentials in the headers are masked in every stored run.
- A project holds up to 50 MCP servers, and a server up to 200 saved calls.
- You can have 2 MCP sessions open at once, and a workspace 5.
- Deleting a server deletes its saved calls and all its runs; deleting a saved call deletes its runs. Both ask first.
- A saved call's "Open" waits until a discovery lists its tool.
If something goes wrong
- "We did not connect": the address is not one {{brand}} can send to, such as a private address.
- "The session ended early": the reason follows, for example "The server answered with an HTTP error." or "The answer was not an MCP message." Check that the address is the server's Streamable HTTP address and that the headers are right.
- "The server listed more than a session reads, so the list is not complete."
- "Too many MCP sessions are open.": try again when one has ended.
- "Call" cannot be pressed: tick "This call may change data on the server", or fix the arguments and finish every check.
- "This project already has an MCP server named …": choose another name.
Related
- /help/api-testing/coding-agents
- /help/api-testing/mock-servers
- /help/api-testing/stream-sessions