mcp-server-triage
Skill2 starsChanged 40 days agoApache-2.0View on GitHub
Use when an MCP server fails, is missing, or is being added.
In this repository303 other files it gives its agents.
- AGENTS.mdAGENTS.md
- a2a-brain-meshlearn-verifySkill
- apple-notesSkill
- apple-remindersSkill
- findmySkill
- imessageSkill
- asi-core-integrationSkill
- asi-integration-architectureSkill
- asi-narrativeSkill
- asi-research-labSkill
- asi-capability-summarySkill
- asi-coreSkill
- asi-identitySkill
- auto-env-checkerSkill
- auto-best-practice-from-officialSkill
- auto-competitor-intelligence-ai-codingSkill
- auto-competitor-intelligence-an-aiSkill
- auto-competitor-intelligence-autogpt-improvemSkill
- auto-competitor-intelligence-claudepowered-aiSkill
- auto-competitor-intelligence-contractmd-theSkill
- auto-competitor-intelligence-crush-glamourousSkill
- auto-competitor-intelligence-devin-aiSkill
- auto-competitor-intelligence-electricity-useSkill
- auto-competitor-intelligence-intent-weavingSkill
- auto-competitor-intelligence-jetbrains-idesSkill
- auto-competitor-intelligence-jetbrains-zedSkill
- auto-competitor-intelligence-layerfs-aSkill
- auto-competitor-intelligence-mouse-precisionSkill
- auto-competitor-intelligence-okf-agentSkill
- auto-competitor-intelligence-opencode-aiSkill
- auto-competitor-intelligence-opencode-openSkill
- auto-competitor-intelligence-openhands-agentSkill
- auto-competitor-intelligence-pythonopenaichatSkill
- auto-competitor-intelligence-some-uncomfortabSkill
- auto-competitor-intelligence-stack-overflowSkill
- auto-competitor-intelligence-the-secretSkill
- auto-competitor-intelligence-things-iSkill
- auto-competitor-intelligence-undisclosed-addiSkill
- auto-competitor-intelligence-we-askedSkill
- auto-competitor-intelligence-what-iSkill
- auto-efficiency-learning-advanced-quantizatioSkill
- auto-efficiency-learning-a-visualSkill
- auto-efficiency-learning-edge-aiSkill
- auto-efficiency-learning-efficientqat-llmSkill
- auto-efficiency-learning-finetuning-llmsSkill
- auto-efficiency-learning-ondevice-llmSkill
- auto-efficiency-learning-pushing-theSkill
- auto-efficiency-learning-quantization-techniqSkill
- auto-efficiency-learning-quip-2bitSkill
- auto-efficiency-learning-ragkit-withSkill
- auto-efficiency-learning-show-hnSkill
- auto-efficiency-learning-small-languageSkill
- auto-efficiency-learning-splitquantv2-enhanciSkill
- auto-efficiency-learning-towards-optimalSkill
- auto-efficiency-learning-vptq-extremeSkill
- auto-explain-how-sleep-consolidationSkill
- auto-how-does-energy-efficiencySkill
- auto-internet-learning-40-ofSkill
- auto-internet-learning-ai-agentSkill
- auto-internet-learning-ai-agentsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 74
Run all three; the first level that fails localises the fault.
- Very specific: line 149
Verify both halves, because they are separate facts: openamer mcp list shows the entry enabled, openamer mcp test <name> proves it connects …
- Very specific: line 155
When the server's error says Tool … disabled, the fix is the family id, not a reinstall.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MCP server connection triage
Trigger
- The startup banner's MCP Servers block shows
— failedor a server with0 tool(s)next to it. - An MCP tool the user expects is not in the toolset.
logs/errors.logcontainsMCP server '<name>' failed initial connection ...orMCP OAuth setup failed for '<name>'.
The banner's MCP block is ground truth. It is rendered from the live connection state (per-server tool counts), so read it BEFORE theorising:
MCP Servers
blender (stdio) — disabled
linear (http) — 68 tool(s)
notion (http) — 69 tool(s)
sentry (http) — failed
stripe (http) — 15 tool(s)— disabled means the config entry has enabled: false (not a failure).
— failed means the connect attempt did not reach a live session.
The two failure classes (they look identical in the log)
| Log line | Class | Fix |
MCP server 'X' failed initial connection after 3 attempts, parking ...: TimeoutError | Transport/handshake — the server was reachable but the session never came up | see the probe ladder below |
MCP OAuth setup failed for 'X': MCP OAuth for 'X': non-interactive environment and no cached tokens found | Credentials — there is no usable token on disk | openamer mcp login X (needs a TTY) |
MCP server 'X' failed initial OAuth authentication, not retrying automatically: OAuthNonInteractiveError | same as above, worded from the other code path | same |
The TimeoutError is a symptom, not a diagnosis. A server with no cached
OAuth token can surface as a timeout, because the OAuth provider never gets a
usable bearer token and the handshake never completes. Do not report "the MCP
server is down" until you have separated the two classes.
Step 1 — the cheap discriminator: does a token exist, and is it live?
cd "$OPENAMER_HOME"
for n in linear notion stripe sentry supabase vercel; do
f="mcp-tokens/$n.json"
if [ -f "$f" ]; then
python -c "import json,time;d=json.load(open(r'$f'));print('$n','expires_in',round(d['expires_at']-time.time()),'s')"
else
echo "$n NO TOKEN FILE"
fi
done- No token file at all ⇒ that server was never authorized here. It can never
connect in a non-interactive context. Fix:
openamer mcp login <name>. - Token file exists but
expires_inis negative ⇒ expired; the provider should refresh it, but only if a refresh token is present. - Token file exists and is fresh ⇒ the credential is fine, so the failure is transport/handshake. Continue to step 2.
A <name>.client.json (dynamic client registration) and <name>.meta.json
(OAuth server metadata) may sit next to the token; their absence is normal for
pre-registered clients.
Step 2 — the probe ladder (prove where it breaks)
Run all three; the first level that fails localises the fault. Use
scripts/probe_mcp_servers.py for levels 2 and 3.
- Raw HTTP — is the endpoint alive and does it answer
initialize?curl -s -o /dev/null -w "%{http_code} %{time_total}s\n" -m 20 -X POST https://mcp.linear.app/mcp \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"probe","version":"1"}}}'401= the endpoint is alive and demands auth (expected without a token).000/timeout = the host is genuinely unreachable. - Raw SDK —
mcp.client.streamable_http.streamable_http_client+ClientSessionwith the stored bearer token. Success here proves the MCP handshake works. On mcp >= 1.24 the client must be constructed explicitly and passed in:
Gotcha:async with httpx.AsyncClient(follow_redirects=True, timeout=httpx.Timeout(30.0, read=300.0), headers={"Authorization": f"Bearer {tok}", "Accept": "application/json, text/event-stream"}) as c: async with streamable_http_client(url, http_client=c) as (r, w, sid): async with ClientSession(r, w) as s: await s.initialize(); await s.list_tools()streamable_http_client(url, headers=...)raisesTypeErroron mcp 1.24+ — theheaders=kwarg was removed. Build thehttpx.AsyncClient. - The real OpenAmer path —
tools.mcp_tool.MCPServerTask(name).start(config)with the config frommcp_tool._load_mcp_config(). This is the only level that exercises OpenAmer's own OAuth provider, transport options and parking logic. A level-2 success plus a level-3 failure means the fault is in OpenAmer's connection code, not in the network or the credentials.
Do not conclude "the network is broken" from level 3 alone. Measure the levels separately and report which one failed.
Step 3 — the fix per class
- Missing/expired token →
openamer mcp login <name>interactively (needs a real TTY; a background/cron/daemon context cannot complete the browser flow). Then restart the surface so it reconnects. - Handshake timeout on a server that HAS a token → re-run the probe ladder
once (startup races are common when every server connects concurrently) and
only then treat it as a real fault. Check
connect_timeoutin the server'smcp_serversconfig entry.
The other direction: ADDING a server without flooding context
Registering a server is the same object as triaging one — same config entry, same
.client.json / token directory, same banner — but the failure mode is inverted:
it connects fine and then costs context in every session, because every
advertised tool schema is paid for on load. Measured on a 229-tool server: 229
tools unscoped vs 79 after a scope of six families, with expected 79 /
observed 79 / missing [] from the server's own doctor.
Rules:
- Search before you build.
openamer a2a mcp-catalog "<keywords>" --limit 10queries the official registry (~40k servers, keyless) and falls back to the community README (~1.9k). Search only finds; installing still goes throughopenamer mcp add/openamer mcp install <approved-name>because those are supply-chain-pinned. Do not hand-pin an arbitrary repo from a search hit. - Measure the menu before registering.
openamer mcp addruns a discovery-first install and asksEnable all N tools? [Y/n/select]. ThatNis the number you are about to pay. If the server supports family scoping via an env var, set it in the registration (--env VAR=family-a,family-b) so the count is bounded at source, not by deselecting 150 rows. - Use an absolute interpreter path for a stdio server when more than one
runtime is installed.
--command noderesolves to whatever is first onPATH(possibly a version the package'senginesrejects); pin--command "C:/Users/<u>/tools/node-v<ver>/node.exe". - Headless registration hangs on the prompt.
openamer mcp addwaits for stdin:printf 'y\n' | openamer mcp add <name> --env … --command … --args …. Without it the output ends inEnable all N tools? … Cancelled.and nothing is written — which reads like a failed install. --argsmust be the LAST option (it is variadic and swallows what follows).- Verify both halves, because they are separate facts:
openamer mcp listshows the entry enabled,openamer mcp test <name>proves it connects and enumerates the tools it will advertise. - A new session is required before the tools appear in the agent's own toolset
(
Start a new session to use these tools.) — do not read the current session's unchanged tool list as a failed registration. - When the server's error says
Tool … disabled, the fix is the family id, not a reinstall; and when an invalid family id fails startup, the server prints the complete valid list in one line — that is the cheapest way to discover them.
Pitfalls
- A "This tip only shows once" banner hint is not a defect.
openclawresidue tips are gated byonboarding.seen.<flag>inconfig.yaml; if the flag istruethe tip is correctly suppressed. Verify withis_seen(config, OPENCLAW_RESIDUE_FLAG)before reporting it as a bug. - The
ctx --in the status bar is not a missing context window. It means the agent was not yet initialised when the bar was rendered. The real window is measurable:agent.context_compressor.context_lengthandagent.model_metadata.get_model_context_length(model, base_url=..., provider=...). Report the measured number, not the placeholder. - The banner's
upstream <sha> · local <sha> (+N carried commits)is a snapshot from process start. Re-rungit fetch origin mainandgit rev-list --count origin/main..HEADbefore quoting it; the local commit may already be pushed. - Never "fix" a failing MCP server by disabling it to make the banner look clean. Either fix the credential, or report it as failed with the measured evidence.
Verify
# after `openamer mcp login <name>`, restart the surface and re-read the banner
openamer chat -q "list your MCP tools" # or just start the CLI and read the block
# or measure directly:
python scripts/probe_mcp_servers.py # prints READY/FAIL per serverReferences & scripts
references/mcp-ecosystem-2026.md— where servers come from (official registry endpoint + response shape + the three parsing traps), the protocol versions actually installed vs current, the exactFastMCP→MCPServerbreak in mcp 2.x, and the A2A / WebMCP / commerce state. Read this before changing catalog, transport or protocol code.references/session-measurements.md— a measured 6-server triage on this host: which ones connect in ~2 s, which ones park, and the exact log lines.scripts/probe_mcp_servers.py— token-file/expiry check plus the raw-SDK and real-OpenAmer-path probes, with per-server timing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

