The open source coding agent.
TypeScript
docs: add MCP OAuth debugging section (#6047)
Matt Silverlock4e1a9b62167f
diff --git a/packages/web/src/content/docs/mcp-servers.mdx b/packages/web/src/content/docs/mcp-servers.mdxindex 48b38442c7d..58b14d12d03 100644--- a/packages/web/src/content/docs/mcp-servers.mdx+++ b/packages/web/src/content/docs/mcp-servers.mdx@@ -171,7 +171,7 @@ For most OAuth-enabled MCP servers, no special configuration is needed. Just con}```-If the server requires authentication, OpenCode will prompt you to authenticate when you first try to use it.+If the server requires authentication, OpenCode will prompt you to authenticate when you first try to use it. If not, you can [manually trigger the flow](#authenticating) with `opencode mcp auth <server-name>`.#### Pre-registered Client@@ -240,6 +240,20 @@ opencode mcp logout my-oauth-serverThe `mcp auth` command will open your browser for authorization. After you authorize, OpenCode will store the tokens securely in `~/.local/share/opencode/mcp-auth.json`.+#### Debugging++If a remote MCP server is failing to authenticate, you can diagnose issues with:++```bash+# View auth status for all OAuth-capable servers+opencode mcp auth list++# Debug connection and OAuth flow for a specific server+opencode mcp debug my-oauth-server+```++The `mcp debug` command shows the current auth status, tests HTTP connectivity, and attempts the OAuth discovery flow.+---## Manage