You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f543139
Browse filesBrowse the repository at this point in the historyBrowse files
Add the device authorization grant to mcp-oauth-console
From MiniMax Code 3.1.2 the Host authenticates every request to the
assigned loopback port, so the browser redirect of an authorization-code
flow answers 401 and the callback handler never runs. The device
authorization grant (RFC 8628) has no redirect at all, so it is not
affected; the page now offers it as the recommended method and keeps the
PKCE method with the callback URL copied back by hand.
Also rebase onto upstream main, document the Agent turns and the two sign-in
methods, and tag the row action buttons with data-action so they can be
targeted unambiguously.
Copy file name to clipboardExpand all lines: plugins/microbiosis/mcp-oauth-console/README.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,19 @@ The page lists every MCP server in the MiniMax Code configuration and shows **tw
21
21
| Action | What it does |
22
22
|---|---|
23
23
| Detect | Re-probes the endpoint with a handshake that matches the declared transport, and shows the result in that server's own row |
24
-
| Authorize | Runs the authorization-code + PKCE flow: dynamic client registration, browser consent, callback, then a confirmation dialog showing exactly which field will change |
24
+
| Authorize | Runs an OAuth sign-in for that server, then a confirmation dialog showing exactly which field will change |
25
25
| Confirm write | Patches `mcpServers.<name>.headers.Authorization` in `mcp.json`, backs the file up first, then verifies the token with a real MCP handshake |
26
26
| Refresh | Exchanges the stored refresh token for a new access token and writes it back |
27
27
| Refresh expiring | Refreshes every stored token that is within 30 minutes of expiry |
28
28
29
+
## Signing in
30
+
31
+
Two methods are offered, and the page recommends the first one.
32
+
33
+
**Device code (recommended).** The server asks the authorization server for a short user code, the page shows it next to a link to the provider's verification page, and the server polls the token endpoint until you approve. There is no redirect, so nothing depends on the browser reaching this Mini App.
34
+
35
+
**Authorization code + PKCE.** The browser opens the consent page and the provider redirects back to this Mini App's loopback port. **From MiniMax Code 3.1.2 the Host authenticates every request to that port**, so the callback page answers `401` and your handler never runs. The address bar still carries the authorization code, so copy that whole URL back into the page and the flow completes — the callback page itself is never needed.
36
+
29
37
## How detection works
30
38
31
39
The probe uses the transport the server declares in the configuration:
@@ -90,6 +98,10 @@ Arguments are passed as an argv array and never through a shell. The URL is the
90
98
91
99
All durable state lives under `context.dataDir`, the private directory the Host creates for this plugin. Nothing is written outside it except the MCP configuration listed above.
92
100
101
+
### Agent turns
102
+
103
+
None. The package declares no `agentAccess`, so it never asks the Agent to run a turn, read a file, or call a tool. Everything happens inside the Node process or in the provider's own page.
104
+
93
105
### Credentials
94
106
95
107
Token material stays in the Node process. The page receives metadata only: scope, expiry, and an eight-character SHA-256 fingerprint used to tell two tokens apart. A fingerprint is not reversible and is not usable as a credential. Credentials are never placed in HTML, client JavaScript, log messages, or error responses.
@@ -101,14 +113,15 @@ Token material stays in the Node process. The page receives metadata only: scope
Verified end to end against the Hugging Face authorization server and the Hugging Face Inference Endpoints MCP server.
107
119
108
120
## Known limitations
109
121
110
122
- The plugin can only manage servers that are already in the MCP configuration, or that you add through the page. It does not discover servers on its own.
111
123
- A server that needs a credential but does not declare OAuth cannot be signed in to from the page; the header has to be set by hand.
124
+
- The PKCE method needs the callback URL copied back by hand, because the Host guards the loopback port. Use the device code method unless the provider offers nothing else.
112
125
- The detection probe checks the handshake. A server may accept an unauthenticated `initialize` and still require a token for tool calls.
113
126
- The refresh timer runs while the Mini App is running. A token that expires while the app is stopped is refreshed the next time it starts.
0 commit comments