Repository navigation
Member subdomains: add Streamable HTTP MCP endpoint for agents - #470
Conversation
Add POST /jtech-subdomains/mcp (JSON-RPC 2.0) exposing list_subdomains, claim_subdomain, update_subdomain, and delete_subdomain so AI agents can manage subdomains on a member's behalf using a Discourse User API Key (User-Api-Key header). Enforces all eligibility, rate-limit, validation, AI review, and primary-domain-only display settings.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef1f5025d7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| def handle | ||
| body = parse_json_body | ||
| return render_rpc_error(nil, -32_700, "Invalid JSON") unless body.is_a?(Hash) |
There was a problem hiding this comment.
Register subdomain tools with Discourse's existing MCP server
On Discourse installations with the bundled MCP server, this introduces a second MCP transport instead of using the existing tool registry. The repository already demonstrates the integration in sub_plugins/ads.rb through register_mcp_tool, availability predicates, and required scopes; spec/requests/ads_mcp_spec.rb exercises its OAuth and group-scope authorization. This separate endpoint does not participate in those controls or the existing /mcp tool discovery, requiring agents and administrators to configure another authentication and authorization path. Register the subdomain operations with that server rather than maintaining a parallel JSON-RPC controller, as required by the repository's “Don't rebuild Discourse” rule.
AGENTS.md reference: AGENTS.md:L13-L15
Useful? React with 👍 / 👎.
Exposes POST /jtech-subdomains/mcp (JSON-RPC 2.0, gated by member_subdomains_mcp_enabled) with list_subdomains, claim_subdomain, update_subdomain, and delete_subdomain tools authenticated via Discourse User API Keys.