Can I call an MCP server directly?

Updated October 2026 · How we answer

Short answerYou can call an MCP server directly if you send it the right protocol messages, usually through an HTTP request or a stdio process. Most people use a client because it handles the handshake for them.

What direct calls involve

A direct call means your code or command sends JSON-RPC messages to the server without a client app in between. You still need to run the initialize handshake and send any notifications the server expects. Missing any of these steps can cause confusing errors.

Direct calls are useful for testing and debugging. They show you exactly what the server returns, which helps when a client shows a vague error message.

  • Send initialize with the right protocol version
  • Send the initialized notification
  • Then call tools/list or tools/call
  • Read errors in the JSON response

When to use a client instead

For day-to-day use, a client such as an editor or AI app is easier. It manages sessions, retries, and tool approvals, so you do not have to track every message yourself.

Use direct calls to confirm a server works, then connect a client for normal use. This two-step approach saves time when you set up a new server. Keep the test simple, such as listing tools, before you try a call that changes data.

  • Use direct calls for testing
  • Use a client for daily work
  • Check server health before connecting
  • Keep tokens out of shared logs

Common mistakes

  • Skipping the handshake and assuming the server is broken.
  • Hard-coding an old protocol version.
  • Sharing a raw token in logs or screenshots.
From our shopsCaseMorph: Type an idea, see a custom phone case in seconds, then print a one-of-one.