DEV Community

Cover image for How to Test MCP Servers in Minutes
Preecha
Preecha

Posted on

How to Test MCP Servers in Minutes

How to Test MCP Servers with Apidog's Built-In MCP Client

Model Context Protocol (MCP) has become an open standard for connecting LLM applications to external data and tools. Whether you're building your own MCP server or integrating a third-party one, you need a reliable way to verify that tools, prompts, and resources behave as expected. Apidog's MCP client provides a built-in, professional environment for exactly that — making it one of the most effective MCP server testing tools available today.

Try Apidog today

This guide walks through the full workflow: creating an MCP client in an HTTP project, connecting via STDIO or HTTP, exercising every Tool, Prompt, and Resource, and applying best practices to keep your MCP integrations robust and maintainable.

Why Use Apidog MCP Client to Test MCP Servers

Your testing environment determines how fast you can iterate and how confident you are in the integration. Apidog's MCP client fits into a single, unified workflow instead of forcing you to juggle separate tools:

Benefit What it means for you
Single workspace Create an MCP client inside an HTTP project and switch between API and MCP debugging without changing apps.
Full protocol support Debug Tools, Prompts, and Resources — the three core MCP features — from one interface.
Dual transport Test local servers via STDIO and remote servers via HTTP (Streamable HTTP), including auth.
Reuse and collaboration Save configured MCP clients in the project and share them with your team.

Apidog also supports variables in server addresses, environment values, headers, and parameters, so you can switch between environments (e.g. dev vs prod) without re-entering configuration. For teams already using Apidog for API design and testing, adding MCP server testing here reduces context switching and keeps documentation and behavior in one place.

What You Need Before Testing MCP Servers

Before you start, make sure you have:

  • An Apidog account and project — create or open an HTTP project where you will add the MCP client.
  • MCP server details — either a command for STDIO (e.g. npx -y @modelcontextprotocol/server-everything) or a URL for HTTP (e.g. https://example-server.modelcontextprotocol.io/mcp).
  • Runtime for STDIO — if you use a local command, the required runtime (e.g. Node.js) must be installed and on your PATH.
  • Auth credentials (for HTTP) — if the server uses OAuth 2.0, API Key, Bearer [REDACTED], or other auth, have the credentials or config ready. Apidog can fetch OAuth 2.0 configuration automatically for supported servers.

No extra plugins or separate MCP testing tools are required — Apidog's MCP client is built in and ready to use.

How to Test MCP Servers Step by Step with Apidog

Step 1: Create an MCP Client in Apidog

  1. Open your HTTP project in Apidog.
  2. Create a new endpoint and choose MCP as the type.
  3. The MCP client configuration screen opens, where you can enter the server address or paste a configuration file.

Create MCP Client

This creates a dedicated MCP client endpoint in your project, so you can test MCP servers alongside your other API assets.

Step 2: Connect to Your MCP Server

Enter the server address. Apidog accepts several input styles and infers the transport from what you paste:

  • Paste a terminal command → protocol switches to STDIO. Example: npx -y @modelcontextprotocol/server-everything
  • Paste a URL → protocol switches to HTTP. Example: https://example-server.modelcontextprotocol.io/mcp

You can also paste an MCP configuration file — Apidog parses it and fills in server name, command or URL, environment variables, and related fields. If the file lists multiple servers, the first one is used.

Example MCP servers file (STDIO):

{
  "mcpServers": {
    "Everything Server": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-everything"],
      "env": {}
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Example MCP server entry (HTTP):

{
  "type": "streamable-http",
  "url": "https://example-server.modelcontextprotocol.io/mcp"
}
Enter fullscreen mode Exit fullscreen mode

Establish the connection:

  • Click Connect.
  • STDIO: Apidog may show a security confirmation before running the local process; after you confirm, it starts the process and connects.
  • HTTP: Apidog sends a connection request to the URL. For OAuth 2.0, it can retrieve the auth configuration and show the authentication window; for API Key, Bearer [REDACTED], Basic Auth, etc., configure them in the Auth tab.

After a successful connection, the directory tree shows the server's Tools, Prompts, and Resources. You can now use Apidog as your main MCP server testing tool for this server.

Step 3: Debug Tools, Prompts, and Resources

  • Tools — executable server-side functions. Select a tool, set parameters via the form or JSON editor, then click Run. Results appear in the response area.

Debug Tools

  • Prompts — predefined prompt templates. Select a prompt, fill in any parameters, and click Run to get the generated prompt text.

Debug Prompts

  • Resources — data resources exposed by the server. Select a resource and click Run to fetch its content.

Debug Resources

Exercise all three surfaces for full coverage when you test an MCP server — this catches misconfigured or broken behavior before it reaches an LLM client.

Step 4: Configure Environment, Auth, and Headers

  • Environment (STDIO only): set environment variables for the MCP server process (e.g. ACCESS_TOKEN, NODE_ENV) in the Environment section.
  • Auth (HTTP only): use the Auth tab to set API Key, Bearer Token, JWT Bearer, Basic Auth, Digest Auth, or OAuth 2.0. For OAuth 2.0–capable servers, Apidog can auto-retrieve and populate auth configuration.

Auth configuration

  • Headers (HTTP only): add any custom HTTP headers required by your MCP server.

Variables ({{variable_name}}) are supported in server address/command, environment values, headers, auth, and parameter values — define once, reuse across environments.

Step 5: View Responses and Save Your Setup

The response area has two tabs:

  • Messages — user-driven events: connect/disconnect, requests/responses.
  • Notifications — server-driven messages (e.g. notifications, tool list updates).

Click a message to see details (type, content, timestamp), and switch to With Envelope to view the full JSON-RPC payload.

View Response

Save the MCP client to the project for reuse and team collaboration. The directory tree (list of tools, prompts, resources) is refreshed on each connection and stored locally.

MCP Server Testing Best Practices

  • Start with one transport — use STDIO for local development and HTTP for remote or production-like testing so you know both paths work.
  • Test all three surfaces — run at least one Tool, one Prompt, and one Resource to validate the server end to end.
  • Use variables — put server URLs, tokens, and env values in variables so you can switch environments without editing the client each time.
  • Check the Notifications tab — if the directory tree is empty after connect, open Notifications to see whether the server sent tool/list updates or errors.
  • Validate parameter types — in form mode Apidog validates types; in JSON editor mode, avoid quoting numbers and use true/false for booleans to prevent parameter type mismatches.

Troubleshooting Common MCP Server Testing Issues

Issue What to do
STDIO: "command not found" Install the required runtime (e.g. Node.js) and ensure the command path is correct.
HTTP: 401 Let Apidog try OAuth 2.0 auto-config; if it fails, set authentication manually in the Auth tab.
Connected but empty tree Verify server configuration and check the Notifications tab for tool/list responses from the server.
Parameter type mismatch Use form mode for validation, or in JSON ensure numbers are unquoted and booleans are true/false.

Conclusion

Testing MCP servers is straightforward when you use a single, capable tool. Apidog's built-in MCP client lets you create an MCP endpoint in your HTTP project, connect via STDIO or HTTP, and debug Tools, Prompts, and Resources without leaving Apidog — no separate installs, no context switching. You get one workspace for both REST/HTTP APIs and MCP servers, so your team can adopt MCP without adding another testing app to the stack.

A few things that keep the workflow fast and repeatable:

  • Config paste — paste an existing MCP config file and let Apidog fill in connection details, cutting setup time.
  • Variables — keep dev, staging, and production server addresses and credentials in check.
  • Messages vs. Notifications — the split between your actions and server-driven updates makes it easier to see whether an issue is client-side or server-side.

Whether you are integrating a third-party MCP server or validating your own, following this guide will help you test MCP servers with confidence and keep your LLM–tool integrations reliable. Sign up for Apidog to bring MCP server testing into the same platform where you design, test, and document your APIs.

Top comments (0)