Title: MCP Server with Python on Claude Desktop Never Exits · Issue #526 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: MCP Server with Python on Claude Desktop Never Exits · Issue #526 · modelcontextprotocol/python-sdk
X Title: MCP Server with Python on Claude Desktop Never Exits · Issue #526 · modelcontextprotocol/python-sdk
Description: 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 ope...
Open Graph Description: 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 i...
X Description: 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 i...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/526
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"MCP Server with Python on Claude Desktop Never Exits","articleBody":"**Describe the bug**\nWhen 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.\nIf you open and close Claude Desktop again, the number of lingering mcp.exe processes increases.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Install ```server_test.py``` using the command above.\n2. Open Claude Desktop and ensure the MCP server is correctly set up.\n3. Close Claude Desktop and check Task Manager for ```mcp.exe``` or ```python.exe``` still running.\n4. Repeat steps 2 and 3 to see the processes being duplicated.\n\n**Expected behavior**\nThe process should exit cleanly when Claude Desktop is closed.\nI 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.\n\n**Screenshots**\n\n\n**Desktop**\n - OS: Windows 10\n - Python 3.13.3\n - Claude Desktop version 0.9.2\n - mcp[cli]\u003e=1.6.0\n - uv 0.6.13","author":{"url":"https://github.com/RodrigoPAml","@type":"Person","name":"RodrigoPAml"},"datePublished":"2025-04-16T01:16:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/526/python-sdk/issues/526"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e78eac48-e3b4-b508-b32b-670110faf7cc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B06A:77B5A:A2F985:EDFEBC:6A579802 |
| html-safe-nonce | aee0519b51af0ac5b70439a6a50e7de55141e7d31a7bf5e23ee0a050070e35ec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDZBOjc3QjVBOkEyRjk4NTpFREZFQkM6NkE1Nzk4MDIiLCJ2aXNpdG9yX2lkIjoiNjk4Njc2MDA0MTA2MTEyODE5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e9c084485a14ba64b54273ffd2da051180e4446350202ffccb64ba4734e8e907 |
| hovercard-subject-tag | issue:2998049922 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/python-sdk/526/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9a7e0703b41174d1ff788d473a6472f991446d5f4917f7d9d92fffe531b93c01/modelcontextprotocol/python-sdk/issues/526 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9a7e0703b41174d1ff788d473a6472f991446d5f4917f7d9d92fffe531b93c01/modelcontextprotocol/python-sdk/issues/526 |
| og:image:alt | 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 i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | RodrigoPAml |
| hostname | github.com |
| expected-hostname | github.com |
| None | a87fc68e9bdf22e1c7e48ac6a60b98882f4bb103314b3f26b3460c61fc5441ae |
| turbo-cache-control | no-preview |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a2198d0212ed703af207673eb4d0868d4f867a5b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width