mcpproxy-go icon indicating copy to clipboard operation
mcpproxy-go copied to clipboard

[bug] Hi, I noticed today that mcp proxy is using very high CPU (>100%) even when idl

Open mcpproxy-feedback[bot] opened this issue 1 month ago • 1 comments

[!NOTE] This issue contains verbatim text submitted anonymously via the in-app mcpproxy feedback form. 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

mcpproxy-feedback[bot] avatar Oct 21 '26 16:10 mcpproxy-feedback[bot]

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:

  1. Your mcpproxy version: mcpproxy version
  2. OS and version, and Intel or Apple Silicon
  3. How you run it: the macOS app (tray), Homebrew, or mcpproxy serve
  4. Which process is using the CPU. In Activity Monitor or top -o cpu, is it mcpproxy (core), mcpproxy-tray, or a child process such as node/npx, uvx/python or docker?
  5. The output of mcpproxy doctor and mcpproxy 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!

Dumbris avatar Oct 23 '26 08:10 Dumbris