Skip to content

MCP Server with Python on Claude Desktop Never Exits #526

Open
@RodrigoPAml

Description

@RodrigoPAml

Describe the bug
When using an MCP Server (stdio) installed in Claude Desktop with the command uv run mcp istall server_test.py and then closing Claude Desktop, the process mcp.exe remains active in Task Manager on Windows 10.
If you open and close Claude Desktop again, the number of lingering mcp.exe processes increases.

To Reproduce
Steps to reproduce the behavior:

  1. Install server_test.py using the command above.
  2. Open Claude Desktop and ensure the MCP server is correctly set up.
  3. Close Claude Desktop and check Task Manager for mcp.exe or python.exe still running.
  4. Repeat steps 2 and 3 to see the processes being duplicated.

Expected behavior
The process should exit cleanly when Claude Desktop is closed.
I tested the MCP server provided by the C# SDK, and it exits correctly — so the issue might be specific to the Python implementation or FastMCP.

Screenshots
Image

Desktop

  • OS: Windows 10
  • Python 3.13.3
  • Claude Desktop version 0.9.2
  • mcp[cli]>=1.6.0
  • uv 0.6.13

Metadata

Metadata

Assignees

No one assigned

    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