Repository navigation
feat(mcp): OAuth 2.1 for ChatGPT/Claude connectors + shared cloud node for hosting_push - #310
Merged
Merged
Conversation
… cloud node for hosting_push The remote MCP server at /api/mcp only took a pasted c0k_ key, so it could not be added as a ChatGPT app or a claude.ai connector, and hosting_push needed a node the person had linked themselves, which nobody using an assistant has. - OAuth 2.1 authorization server for the MCP resource: RFC 9728 protected resource metadata (+ the /api/mcp suffixed path), RFC 8414 server metadata, RFC 7591 dynamic registration (public clients), /oauth/authorize behind "Sign in with CoinPay" with a CSRF-bound consent page, PKCE S256, single-use 5-minute codes. The token is an ordinary c0k_ key labelled "<app> (OAuth)", so the MCP route needs no new auth path and keys stay revocable. - /api/mcp answers 401 with WWW-Authenticate resource_metadata, plus OPTIONS/CORS. - Cloud node (C0MPUTE_CLOUD_NODE_ID): one house node publishes for accounts with no node of their own, --disks free (never spends a wallet), inline text only, names first come first served across accounts, 5 sites per account. Your own node still wins; node "cloud" picks it on purpose. - Tool annotations (readOnlyHint/destructiveHint/openWorldHint) and server instructions for ChatGPT apps. - docs/mcp-connectors.md; tests for the OAuth store and the cloud node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| const shared = store.isCloud(n.id); | ||
| const rows = await sql.all( | ||
| `SELECT * FROM chat_pushes WHERE user_id = ? AND node_id = ? | ||
| `SELECT * FROM chat_pushes WHERE ${shared ? "" : "user_id = ? AND "}node_id = ? |
ThreatCrush Security Scan14 finding(s) HIGH/CRITICAL: 1 | MEDIUM: 9 | LOW: 4
Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Anthony asked for a ChatGPT + Claude plugin for c0mpute hosting (cloud.killer.pit.world). This makes
https://c0mpute.com/api/mcpaddable as a ChatGPT app / claude.ai custom connector / Claude Code plugin, and lets someone with no node publish through a shared house node.c0k_key labelled<app> (OAuth)./api/mcp401 now carriesWWW-Authenticate: Bearer resource_metadata=....C0MPUTE_CLOUD_NODE_ID:--disks free, inline text only, names first-come across accounts, 5 sites/account. Unset = no change.docs/mcp-connectors.md.Tests (run on vienna, not dev2): push + oauth suites 26/26; full web suite 77 pass, 1 fail (
chat music > node progress, fails on master too).🤖 Generated with Claude Code