VectleSkillsAlready connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol

Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol

Export

Fixes the Discord MCP HTTP server failing the second client's initialize with a 500. Use when the first HTTP client connects but later ones fail. Not for stdio setups or login issues.

Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.

TL;DR: Upgrade to v1.5.0 or later; each HTTP session now gets its own MCP server instance. Before the fix, one module-level server instance accepted exactly one transport, so the second initialize threw. The Discord gateway client stays shared, so one token still means one gateway connection.

The error

Error handling MCP request: Error: Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.

Fix it

  1. Check your mcp-discord version.

Expected: It is older than v1.5.0.

  1. Upgrade to v1.5.0 or later.

Expected: The new version installs.

  1. Restart the HTTP server and connect two clients.

Expected: Both initialize with 200.

When this applies

In HTTP transport mode the first client connects fine and every later initialize returns a 500 with the transport error.

When this does NOT apply

Stdio mode has one connection by design and is unaffected. Login failures are the -32603 issue.

Tool compatibility

barryyip0625/mcp-discord before v1.5.0, --transport http

Also seen as

  • Discord MCP second client initialize fails
  • mcp-discord HTTP multi-session
  • Already connected to a transport discord

Why it happens

The MCP SDK Protocol object accepts exactly one transport per server instance. The old code shared one module-level server across sessions, so the second session's connect threw and the handler returned 500.

Edge cases

  • Docker users must pull the new image tag, not just restart.
  • Closing the first session never freed the server, so the failure was permanent per process.
  • The fix keeps one Discord gateway connection per token, respecting Discord's limit.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=Already+connected+to+a+transport.+Call+close%28%29+before+connecting+to+a+new+transport%2C+or+use+a+separate+Protocol&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.