Skip to content

[Bug]: Claude Desktop attach 실패 — uvx dartlab mcp 방식 (status: running 표시되나 attach 불가) #28

@champahn

Description

@champahn

DartLab Version

0.9.27

Python Version

3.12

Area

Company / Core

Description

Summary

When configuring dartlab MCP in Claude Desktop (Windows) using the uvx dartlab mcp stdio method, the server shows as "running" in Developer settings but fails to attach with the error popup:

Could not attach dartlab mcp server.

The server starts successfully when run manually in PowerShell, but Claude Desktop cannot establish the MCP connection.

Environment

  • OS: Windows 11
  • Claude Desktop: Latest version (consumer app, not Claude Code)
  • Node.js: v22.14.0
  • uv: Installed via winget (C:\Users\<user>\AppData\Local\Microsoft\WinGet\Links\uv.exe)
  • Python: System Python (no virtualenv)
  • dartlab: Installed automatically by uvx (88 packages, 33 tools loaded)

Steps to Reproduce

  1. Install uv via winget
  2. Add the following to %APPDATA%\Claude\claude_desktop_config.json:
{
  "mcpServers": {
    "dartlab": {
      "command": "uvx",
      "args": ["dartlab", "mcp"]
    }
  }
}
  1. Fully quit Claude Desktop (including tray process)
  2. Restart Claude Desktop
  3. Open Settings → Developer → check dartlab status
  4. Try to use a dartlab tool in a new chat

Expected Behavior

  • Server attaches successfully and tools become callable from chat

Actual Behavior

  • Settings → Developer: dartlab shows status running
  • Manual PowerShell test (uvx dartlab mcp): Successfully boots with output:
  Installed 88 packages in 37.85s
  MCP 서버 초기화 -- 33 도구
  MCP 서버 초기화 -- 33 도구
  DartLab MCP 서버 시작 (stdio)
  DartLab MCP 서버 시작 (stdio)
  • Tool invocation in chat: Popup appears with message:

    Could not attach dartlab mcp server.

Note: The "MCP 서버 초기화" and "DartLab MCP 서버 시작" messages each appear twice in the manual test output — possibly indicating duplicate initialization or stdout buffering issue.

Other Methods Attempted (all failed)

Method Result
"url": "https://eddmpython-dartlab.hf.space/mcp/sse" (per README) Claude Desktop rejects with "유효한 mcp 로드 서버 구성이 아니다" — Desktop does not support url key
mcp-remote proxy to hf.space hf.space deployment returns: ModuleNotFoundError: No module named 'pyarrow', 'Company' object has no attribute 'insights', missing GEMINI_API_KEY
uv run dartlab mcp from home directory error: Failed to spawn: dartlab — program not found (uv expects project context)
uvx dartlab mcp (this report) Status "running" but attach fails

Hypothesis

Possible causes for the attach failure:

  1. stdout pollution: Korean log messages (MCP 서버 초기화...) being written to stdout instead of stderr, breaking JSON-RPC framing
  2. Duplicate initialization: The doubled output suggests the server may be initializing twice, possibly causing Claude Desktop's first connection attempt to be invalidated
  3. stdio buffering: Without PYTHONUNBUFFERED=1, JSON-RPC responses may be delayed past Claude Desktop's attach timeout

Logs

Claude Desktop log (%APPDATA%\Claude\logs\mcp-server-dartlab.log):

2026-04-29T08:24:35.796Z [info] [dartlab] Using MCP server command: C:\Users\<user>\AppData\Local\Microsoft\WinGet\Links\uv.exe with args: ['run', 'dartlab', 'mcp']
2026-04-29T08:24:35.861Z [info] [dartlab] Server started and connected successfully
2026-04-29T08:24:37.693Z [info] [dartlab] Message from client: {"method":"initialize",...}
2026-04-29T08:24:58.540Z [info] [dartlab] Server transport closed
2026-04-29T08:24:58.540Z [info] [dartlab] Server transport closed unexpectedly, this is likely due to the process exiting early.
2026-04-29T08:24:58.540Z [error] [dartlab] Server disconnected.

The server transport closes ~23 seconds after initialization message is sent, suggesting the server fails to respond to initialize request within Claude Desktop's timeout window.

Request

Could the maintainer please clarify:

  1. Is uvx dartlab mcp officially supported for Claude Desktop (consumer app), or only for Claude Code (CLI)?
  2. Are the duplicate initialization log lines expected behavior?
  3. Is there a recommended environment variable set or configuration template for Windows + Claude Desktop?

Thank you for maintaining this project.

Steps to Reproduce

{
  "mcpServers": {
    "dartlab": {
      "command": "uvx",
      "args": ["dartlab", "mcp"]
    }
  }
}

Expected Behavior

Server attaches successfully and tools become callable from chat

Actual Behavior

Settings → Developer: dartlab shows status running ✓
Manual PowerShell test (uvx dartlab mcp): Successfully boots with output:
Installed 88 packages in 37.85s
MCP 서버 초기화 -- 33 도구
MCP 서버 초기화 -- 33 도구
DartLab MCP 서버 시작 (stdio)
DartLab MCP 서버 시작 (stdio)
Tool invocation in chat: Popup appears with message:
Could not attach dartlab mcp server.

Error Output / Logs


Operating System

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions