#6374·deepagents

[dcode] MCP login cannot resolve plugin-provided servers

Author: imacomberCreated Sep 17, 2026Updated Sep 17, 2026
Labelstype:bugtopic:mcporg:externalpriority:backlogpackage:dcode

Submission checklist

  • This is a bug, not a usage question.
  • I added a clear and descriptive title.
  • I searched existing issues and didn't find this.
  • I can reproduce this with the latest released version.
  • I included a minimal reproducible example and steps to reproduce.

Area (Required)

  • deepagents (SDK)
  • dcode
  • talon
  • acp
  • evals
  • daytona
  • modal
  • quickjs
  • runloop
  • vercel
  • langsmith-sandbox
  • Other / not sure / general

Related Issues / PRs

No response

Reproduction Steps / Example Code (Python)

python
import json
import os
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest.mock import patch


def write_json(path, data):
    path.parent.mkdir(parents=True, exist_ok=True)
    path.write_text(json.dumps(data), encoding="utf-8")


with TemporaryDirectory() as temporary:
    root = Path(temporary).resolve()
    home = root / "home"
    profile = home / ".deepagents"
    plugin = profile / "plugins" / "fixture-sentry"
    project = root / "project"
    (project / ".git").mkdir(parents=True)
    plugin_id = "sentry@claude-plugins-official"

    write_json(profile / ".mcp.json", {
        "mcpServers": {
            "docs-langchain": {"type": "http", "url": "https://example.invalid/mcp"}
        }
    })
    write_json(profile / ".state" / "plugin_state.json", {
        "version": 1, "enabledPlugins": {plugin_id: True}
    })
    write_json(profile / ".state" / "installed_plugins.json", {
        "version": 2,
        "plugins": {plugin_id: [{"installPath": str(plugin), "version": "1.4.0"}]}
    })
    write_json(plugin / ".claude-plugin" / "plugin.json", {
        "name": "sentry", "version": "1.4.0",
        "mcpServers": {
            "sentry": {"type": "http", "url": "https://mcp.sentry.dev/mcp?utm_source=plugin"}
        }
    })

    original_cwd = Path.cwd()
    try:
        os.chdir(project)
        with patch.dict(os.environ, {
            "HOME": str(home),
            "USERPROFILE": str(home),
            "DEEPAGENTS_HOME": str(profile),
            "DEEPAGENTS_CODE_PLUGIN_CACHE_DIR": str(profile / "plugins"),
        }):
            os.environ.pop("DEEPAGENTS_HOME_IS_DEFAULT", None)

            from deepagents_code.mcp_login_service import (
                ConfigErrorKind, ConfigResolutionError, resolve_mcp_config, select_server,
            )
            from deepagents_code.plugins.adapters.mcp import (
                discover_plugin_mcp_configs, scoped_mcp_server_name,
            )

            server = scoped_mcp_server_name(plugin_id, "sentry")
            layers = discover_plugin_mcp_configs()
            assert any(server in layer["mcpServers"] for layer in layers), layers
            print(f"Runtime plugin discovery finds: {server}")

            resolution = resolve_mcp_config(None)
            assert not isinstance(resolution, ConfigResolutionError), resolution
            control = select_server(resolution, "docs-langchain")
            assert not isinstance(control, ConfigResolutionError), control
            print("Control: ordinary MCP server resolves successfully.")

            result = select_server(resolution, server)
            if isinstance(result, ConfigResolutionError):
                assert result.kind == ConfigErrorKind.UNKNOWN_SERVER, result
                print(f"Error: MCP login failed: {result.message}")
                raise SystemExit(1)
            print("Bug not reproduced: login resolves the plugin server.")
    finally:
        os.chdir(original_cwd)

Error Message and Stack Trace (if applicable)

bash
Error: MCP login failed: Server 'plugin__sentry_claude-plugins-official_535f70ee__sentry' not found in /Users/ianmacomber/.deepagents/.mcp.json.    
▎ Known servers: ['docs-langchain', 'reference-langchain']

Description

I installed the Sentry Plugin from the official Claude plugin registry. After reloading dcode, I expected to see that the Sentry MCP server (installed as part of the plugin installation) connected successfully, but instead I got the error message (provided within this bug form).

MCP login should resolve enabled plugin-provided servers using the same namespaced identities and effective configurations used at startup. Users should not need to duplicate plugin configuration in .mcp.json to authenticate.

Environment / System Info

Package: deepagents-code 0.1.70 OS: macOS 27 Python: 3.13.11 Plugin: sentry@claude-plugins-official, version 1.4.0