[bug] Hi, I noticed today that mcp proxy is using very high CPU (>100%) even when idl
[!NOTE] This issue contains verbatim text submitted anonymously via the in-app
mcpproxy feedbackform. It was relayed automatically and was not written by the issue author shown above.
User Feedback
Hi,
I noticed today that mcp proxy is using very high CPU (>100%) even when idle. I'm not seeing any requests flow through and have stopped and started core already. It is draining my battery substantially - is there any way to debug this further?
Context
| Field | Value |
|---|
Contact: [email protected]
Submitted via MCPProxy telemetry feedback
Hi, thanks for reporting this, and sorry about the battery drain.
Unfortunately the in-app feedback form didn't save the context it was supposed to attach (app version, OS, server counts). That's a bug on our side and we're fixing it. So we have no details about your setup yet. Could you tell us:
- Your mcpproxy version:
mcpproxy version - OS and version, and Intel or Apple Silicon
- How you run it: the macOS app (tray), Homebrew, or
mcpproxy serve - Which process is using the CPU. In Activity Monitor or
top -o cpu, is itmcpproxy(core),mcpproxy-tray, or a child process such asnode/npx,uvx/pythonordocker? - The output of
mcpproxy doctorandmcpproxy upstream list
Capturing a CPU profile
The core has built-in Go profiling at /debug/pprof/, protected by your API key. While the CPU is high:
# API key from your config (or copy "api_key" from ~/.mcpproxy/mcp_config.json by hand)
KEY=$(jq -r .api_key ~/.mcpproxy/mcp_config.json)
# 30-second CPU profile
curl -s -H "X-API-Key: $KEY" "http://127.0.0.1:8080/debug/pprof/profile?seconds=30" -o mcpproxy-cpu.pprof
# Stacks of all goroutines (shows what is busy-looping)
curl -s -H "X-API-Key: $KEY" "http://127.0.0.1:8080/debug/pprof/goroutine?debug=2" -o mcpproxy-goroutines.txt
If you changed listen in your config, use that address instead of 127.0.0.1:8080. If you have Go installed, go tool pprof -top mcpproxy-cpu.pprof gives a quick summary. Either way, you can attach both files here. They contain function names and stack traces, not your config or tool data, but if you'd rather not post them publicly, reply to the email we sent you and attach them there.
Logs from around the time it happens also help: ~/Library/Logs/mcpproxy/main.log on macOS, ~/.mcpproxy/logs/main.log on Linux.
Thanks!