Skip to content

fix: Remote MCP type shows 'connected' but silently fails to register tools #9425

Closed

Description

Description

When configuring an MCP server with "type": "remote", OpenCode shows the server as "connected" in the MCP status, but tools are silently not registered and unavailable. There is no error message in the UI or logs indicating the failure.

This is different from previously fixed issues #834 and #1595, which produced clear error messages like "MCP server failed to start".

Steps to Reproduce

  1. Configure a remote MCP server using SSE endpoint in ~/.config/opencode/opencode.json:
{
  "mcp": {
    "exa": {
      "type": "remote",
      "url": "https://mcp.exa.ai/mcp?exaApiKey=YOUR_KEY"
    }
  }
}
  1. Start OpenCode TUI
  2. Check MCP status - shows "connected" (green checkmark)
  3. Try to use any Exa tools - they are not available
  4. Check logs at ~/.local/share/opencode/log/ - no error messages about Exa

Expected Behavior

Either:

  • Tools should be registered and available when status shows "connected"
  • OR an error message should be displayed when tool registration fails

Actual Behavior

  • MCP status shows "connected" (implying success)
  • Tools are silently not registered
  • No error in UI or logs
  • User has no indication anything is wrong until they try to use the tools

Workaround

Using "type": "local" with npx works correctly:

{
  "mcp": {
    "exa": {
      "type": "local",
      "command": ["npx", "-y", "exa-mcp-server"],
      "environment": {
        "EXA_API_KEY": "your-key"
      }
    }
  }
}

Environment

Related Issues

This issue is distinct because the connection appears to succeed but tool registration silently fails.

Suggested Fix

When type: "remote" connection completes, verify that tools were actually registered. If tool registration fails, either:

  1. Display an error message to the user
  2. Update the MCP status to indicate partial failure
  3. Log a warning with troubleshooting guidance

Activity

  1. github-actions commented on Jan 19, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of or related to an existing issue. Please check:

    Also note that there have been recent infrastructure improvements:

    These issues may provide context for debugging the silent tool registration failure you're experiencing.

  2. socrabytes commented on Jan 23, 2026

    @socrabytes

    I encountered similar error as well:

    Side Note: I tested these MCP's about two days ago and they functioned properly except for the fact that my ZAI dashboard never saw the MCP tool usage. This was using the same configuration below but without the oauth config option being present.

    Image

    Global opencode.jsonc :

    {
        "$schema": "https://opencode.ai/config.json",
        "mcp": {
            "zread": {
                "type": "remote",
                "url": "https://api.z.ai/api/mcp/zread/mcp",
                "enabled": true,
                "oauth": false,
                "headers": {
                    "Authorization": "Bearer your_api_key"
                }
            }
        }
    }

    Logs containing mcp:

    INFO  2026-01-23T18:55:57 +1ms service=mcp key=zread type=remote found
    INFO  2026-01-23T18:55:57 +0ms service=server method=GET path=/mcp request
    INFO  2026-01-23T18:55:57 +1ms service=server status=started method=GET path=/mcp request
    INFO  2026-01-23T18:55:58 +506ms service=server status=completed duration=846 method=GET path=/mcp request
  3. vxnuaj commented on Feb 12, 2026

    @vxnuaj

    Receiving similar error on my end.

  4. github-actions commented on Apr 14, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions