ScreenshotNeo

BlogAI agents

How to Test an MCP Server Online

Use MCP Inspector to connect to local or remote servers, verify tools and auth, exercise failures, and automate repeatable checks.

By the ScreenshotNeo team1 October 20267 min read

The best way to test an MCP server online is with the official MCP Inspector. Run the Inspector locally, connect it to the server’s real transport and endpoint, inspect the capabilities it advertises, and invoke the tools your client will use. “Online” usually means a locally running Inspector connecting to a remotely reachable server; the Inspector itself does not need public hosting.

Use a tunnel or deploy the server only when a separate remote client must reach a server bound to your computer. Keep the endpoint, credentials, and test data authorized and controlled.

What you need before testing

  • The server’s documented startup command, transport, endpoint, and required environment variables.
  • A test account or token with the minimum permissions needed.
  • Node.js and npm or npx for the Inspector.
  • A safe test URL if the server can perform writes or external actions.

Do not guess the transport. A local stdio server, Streamable HTTP endpoint, and older HTTP/SSE endpoint require different connection settings.

Test a local MCP server with the Inspector

  1. Start the server with its documented command. For example, OpenAI’s MCP quickstart uses a Streamable HTTP endpoint at http://localhost:8787/mcp. Follow your server’s own README if its port or path differs.
  2. Launch the Inspector:
npx @modelcontextprotocol/inspector
  1. Open the Inspector interface in your browser.
  2. Select the transport your server exposes, such as Streamable HTTP.
  3. Enter the complete endpoint, including the /mcp path.
  4. Connect and inspect the negotiated capabilities.

The Inspector is an interactive developer tool for testing and debugging MCP servers. Its interface provides views for tools, resources, prompts, logs, and notifications. Use those views to verify what the server actually advertises instead of assuming that the implementation matches its documentation.

Minimum local smoke test

  1. Connect successfully.
  2. Confirm the expected protocol capabilities are present.
  3. List tools and verify each name, description, and input schema.
  4. Call one tool with a known-safe valid input.
  5. Call it with a missing required argument and an invalid value.
  6. Review the returned error, server logs, and any notifications.

Test a remote MCP server online

For a deployed server, run the Inspector locally and enter the remote URL. Cloudflare’s guide describes this workflow as testing a remote MCP server: open the Inspector, provide the server URL, connect, and complete authentication when required.

  1. Confirm the remote endpoint is reachable from your network.
  2. Run npx @modelcontextprotocol/inspector.
  3. Select the matching HTTP transport.
  4. Enter the remote endpoint exactly as documented.
  5. Connect, then inspect capabilities and invoke representative methods.

Authentication

If the server uses OAuth, open the Inspector’s authentication settings, choose its Quick OAuth Flow, authenticate with the provider, return to the Inspector, and reconnect. For token-based services, use the Inspector CLI’s documented custom-header support and pass an authorization header without committing the secret to source control.

# Illustrative header value; use the exact CLI syntax shown by the installed Inspector version
Authorization: Bearer YOUR_TEST_TOKEN

Use a test identity. Check that an unauthenticated request fails, a valid identity receives only its permitted tools, and an expired or insufficient token produces a clear error.

Expose a local server only when a remote client needs it

A local Inspector can reach localhost directly, so a tunnel is unnecessary for ordinary development. If a hosted client, teammate, or external test environment must reach your computer, deploy the server or use an authorized tunnel. OpenAI’s development guide uses ngrok as one example and keeps the /mcp path on the resulting public URL.

# Example shape only; use your tunnel provider’s current command and access controls
ngrok http 8787

Then give the remote client the public URL plus /mcp, if that is the server’s path. Do not expose administrative endpoints, production credentials, or private data through an unauthenticated tunnel.

Inspect capabilities before invoking tools

A successful connection proves reachability, not correctness. Record the server’s negotiated capabilities and compare them with what your application needs.

Check What to verify
Connection Correct transport, endpoint path, protocol handshake, and response time.
Tools Expected names, descriptions, required fields, enums, defaults, and return shapes.
Resources URI patterns, readable content, authorization boundaries, and update notifications.
Prompts Names, arguments, generated messages, and behavior with missing values.
Errors Stable error structure, useful messages, and no secret leakage.
Notifications Progress, logging, and update events arrive when expected.

Exercise valid and invalid inputs

For every production-critical tool, create a small matrix of cases:

  • Typical valid input.
  • Each required field omitted.
  • Wrong type, empty string, and boundary values.
  • Unknown enum or unsupported option.
  • Oversized input and an upstream timeout.
  • Duplicate request to check idempotency where relevant.
  • Unauthorized resource or another user’s identifier.

Verify that failures are contained: the server should reject bad input before performing side effects, return an actionable error, and keep the connection usable for subsequent calls.

Automate repeatable checks with the Inspector CLI

The Inspector project also provides a CLI for scriptable checks against remote HTTP or SSE connections. Use the CLI README for the exact options supported by the version you install; the important parameters are the remote URL, transport, method, and any required headers.

# Inspect the installed CLI options first
npx @modelcontextprotocol/inspector --help

# Then run a method check using the documented remote-connection options
# (for example, select the transport, URL, tools/list method, and headers)

A useful smoke check asserts that tools/list succeeds and that the specific tool names your integration depends on are present. Run it after deployment, configuration changes, and dependency updates. A generic successful handshake is not a substitute for checking your application’s actual methods.

Common errors and fixes

Error or symptom Likely cause Fix
Connection refused Server is stopped, wrong port, or bound to another interface. Start the documented command, verify the listening port, and use the exact endpoint.
404 Not Found Missing protocol path such as /mcp. Copy the complete URL from the server documentation.
Transport or handshake failure Inspector transport does not match the server. Select Streamable HTTP, HTTP/SSE, or stdio according to the server implementation.
401 or 403 Missing, expired, or insufficient credentials. Complete OAuth or provide a valid test header; verify scopes and audience.
Tools list is empty Server did not register tools, initialization failed, or the wrong environment is running. Inspect logs, confirm capability negotiation, and verify the startup configuration.
Schema validation error Required argument missing or wrong type. Use the Inspector schema, then retry with the smallest valid payload.
Tool hangs Upstream dependency, browser task, or server operation has no effective timeout. Check server logs and upstream health; add bounded timeouts and cancellation handling.
Works locally but not remotely Firewall, private bind address, tunnel path, proxy, or TLS configuration. Test the public endpoint from an independent network and preserve the required path.
Secrets appear in logs Debug logging captured headers or tool arguments. Redact tokens, rotate exposed credentials, and reduce logging in shared environments.

Performance, reliability, and cost checks

  • Measure the full path: handshake time, capability listing, tool latency, upstream latency, and error rate.
  • Test concurrency: send the level of parallel requests your client will use and watch for rate limits, shared state bugs, and resource exhaustion.
  • Check retries: retry only operations that are safe to repeat, and use request identifiers or idempotency controls for side effects.
  • Verify timeouts: a client timeout should leave the server able to finish or cancel work predictably.
  • Test reconnects: restart the server or interrupt the network, then confirm the client can reconnect and renegotiate capabilities.
  • Control test cost: use fixtures and mocks for expensive upstream services; reserve production-like calls for a small authorized set.

Security checklist

  • Use an endpoint and account you are authorized to test.
  • Keep tokens out of shell history, screenshots, CI logs, and bug reports.
  • Use least-privilege scopes and isolated test data.
  • Check that tool arguments cannot escape tenant or user boundaries.
  • Review current Inspector and server advisories before use. The NSA’s May 2026 MCP security report records that CVE-2025-49596 was fixed in Inspector 0.14.1; treat that as historical guidance and verify current releases and advisories.

Or skip the browser setup

If your MCP workflow needs website screenshots, ScreenshotNeo provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. It also offers a direct API, so you can test the capture path with one request instead of maintaining browser automation.

ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and each response identifies the result with X-Page-Verdict and X-Billed headers.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

See the ScreenshotNeo API documentation for options such as full-page or element capture, device presets, dark mode, custom CSS and JavaScript, waits, blocked resources, headers, cookies, geolocation, caching, signed links, PDFs, bulk capture, and async webhooks. The free plan includes 1,000 screenshots each month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.

FAQ

Does “online” require hosting the Inspector?

No. Run it locally and connect to a remote MCP endpoint. Host or tunnel the Inspector only if another person or service must access its interface.

Should I test through my final AI client?

Yes, after Inspector checks. A client such as Claude, Cursor, or another MCP host can reveal client-specific authentication, schema, and timeout behavior.

Is a successful connection enough?

No. List capabilities, invoke representative tools, test invalid inputs, inspect logs and notifications, and verify authorization boundaries.

When should I use a tunnel?

Only when a remote client must reach a server that is local to your machine. Local Inspector testing does not require one.

How do I keep tests repeatable?

Pin the server configuration, use isolated fixtures, record expected tool names and schemas, and run a small CLI smoke check such as capability listing after each deployment.