Agent Skill
2/7/2026mcp-setup-and-debug
Configure and debug MCP servers for OpenCode, Codex CLI, and Claude Code, including auth headers, scope, and validation checks. Use when MCP tools fail to connect or when adding a new MCP server.
C
chronote
3GitHub Stars
1Views
npx skills add Chronote-gg/Chronote
SKILL.md
| Name | mcp-setup-and-debug |
| Description | Configure and debug MCP servers for OpenCode, Codex CLI, and Claude Code, including auth headers, scope, and validation checks. Use when MCP tools fail to connect or when adding a new MCP server. |
name: mcp-setup-and-debug description: Configure and debug MCP servers for OpenCode, Codex CLI, and Claude Code, including auth headers, scope, and validation checks. Use when MCP tools fail to connect or when adding a new MCP server.
MCP Setup And Debug
Overview
Add or fix MCP server configs across OpenCode, Codex, and Claude Code. Confirm endpoints, auth headers, scopes, and validate with each client command.
Workflow
1) Confirm endpoints and auth requirements
- Identify the MCP endpoint and transport. For Langfuse Prompt MCP (US) use
https://us.cloud.langfuse.com/api/public/mcpwith Basic auth. For Langfuse Docs MCP usehttps://langfuse.com/api/mcpwith no auth. - Use web search to verify URLs and required headers if unsure.
2) Prepare auth header (when required)
- Use
LANGFUSE_PUBLIC_KEYandLANGFUSE_SECRET_KEYin.env.local, then runnode scripts/setup-langfuse-mcp-auth.jsto generate.opencode/langfuse.mcp.auth,.opencode/langfuse.public, and.opencode/langfuse.secretfor OpenCode. - Codex and Claude Code still expect
LANGFUSE_MCP_AUTHin the environment. - Keep credentials out of repo files.
3) Configure each client
- OpenCode: add a remote MCP server in
opencode.jsonundermcp.- Include
headersand setoauthtofalsefor API key based servers. - For local MCP servers that run via uvx, use
type: "local"andcommand: ["uvx", "--python", "3.11", "langfuse-mcp", "--read-only", "--tools", "traces,observations"]. - Validate with
opencode mcp list.
- Include
- Codex CLI: add entries in
.codex/config.tomlor~/.codex/config.toml.- For HTTP servers, use
env_http_headersto pullLANGFUSE_MCP_AUTHfrom the environment. - Validate with
node scripts/mcp-env.js codex mcp listand/mcpin the TUI.
- For HTTP servers, use
- Claude Code: add entries in
.mcp.jsonor useclaude mcp add --transport http.- Validate with
node scripts/mcp-env.js claude mcp listand/mcpinside Claude Code.
- Validate with
4) Debug checklist
- 401 Unauthorized usually means the auth header is missing or malformed.
- HTML or 404 responses often mean the URL is wrong or OAuth was attempted on a non OAuth server.
- For OpenCode, set
oauth: falsewhen using API keys. - Confirm environment variables are available to the client process.
5) Report status
- Summarize which clients connect and which fail.
- Provide the exact error text for each failing client and propose the next fix.
Skills Info
Original Name:mcp-setup-and-debugAuthor:chronote
Download