Skip to content

feat(mcp): OAuth 2.1 for ChatGPT/Claude connectors + shared cloud node for hosting_push - #310

Merged
ralyodio merged 2 commits into
masterfrom
feat/mcp-oauth-cloud-node
Nov 11, 2026
Merged

ralyodio merged 2 commits into
masterfrom
feat/mcp-oauth-cloud-node

Conversation

@ralyodio

Copy link
Copy Markdown
Collaborator

Anthony asked for a ChatGPT + Claude plugin for c0mpute hosting (cloud.killer.pit.world). This makes https://c0mpute.com/api/mcp addable as a ChatGPT app / claude.ai custom connector / Claude Code plugin, and lets someone with no node publish through a shared house node.

  • OAuth 2.1 for the MCP resource (RFC 9728 / 8414 / 7591, PKCE S256, CoinPay sign-in + consent). Token = a normal c0k_ key labelled <app> (OAuth).
  • /api/mcp 401 now carries WWW-Authenticate: Bearer resource_metadata=....
  • Cloud node via C0MPUTE_CLOUD_NODE_ID: --disks free, inline text only, names first-come across accounts, 5 sites/account. Unset = no change.
  • MCP tool annotations + server instructions.
  • Docs: 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

… 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 = ?
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

ThreatCrush Security Scan

14 finding(s)

HIGH/CRITICAL: 1 | MEDIUM: 9 | LOW: 4

Severity Rule Location
HIGH js-ssrf-outbound-request apps/web/public/sw.js:24
MEDIUM js-unescaped-html-sink apps/web/src/app/blog/[slug]/page.tsx:53
MEDIUM js-unescaped-html-sink apps/web/src/app/layout.tsx:89
MEDIUM sql-template-interpolation apps/web/src/lib/chat/push.ts:476
MEDIUM sh-remote-script-execution scripts/dev-setup.sh:25
MEDIUM sh-eval-expansion scripts/dev-setup.sh:35
MEDIUM sh-remote-script-execution scripts/install.sh:185
MEDIUM sh-remote-script-execution scripts/install.sh:210
MEDIUM sh-remote-script-execution scripts/install.sh:408
MEDIUM sh-remote-script-execution scripts/install.sh:450
LOW py-ssrf-outbound-request examples/business-strategist-agent/chat.py:37
LOW py-ssrf-outbound-request examples/business-strategist-agent/train.py:54
LOW secret-generic-credential node/crates/c0mpute-core/src/webhook.rs:1171
LOW py-path-traversal node/crates/c0mpute-core/tests/fixtures/fake-infernet-text:29

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 343faf6 into master Nov 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants