feat: project-webhook — HTTP endpoint to trigger new-project from claude.ai #10
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
hyperguild new-projectwill be a CLI command — callable from a terminal or Claude Code session. But from claude.ai web/mobile, there is no way to trigger it directly because:Solution
Add a lightweight webhook endpoint to the existing
cmd/routingHTTP server (which already runs on koala as an MCP server behind Dex/OAuth). A single new route:Response:
How claude.ai calls it
The routing pod is already exposed as an MCP server via gitea-mcp-adjacent infrastructure. Two options:
Option A: Add
project_createas a new MCP tool in the routing pod's tool registry — callable directly from claude.ai via the existing connector.Option B: Expose as a plain HTTP endpoint, call it from claude.ai via a new minimal MCP tool
hyperguild_webhookthat wraps the HTTP call.Recommendation: Option A — the routing pod already has the MCP server infrastructure (
mcp.NewServer,registry.New()), auth via Dex JWT, and is reachable from claude.ai. Adding a tool is a singlereg.Register(...)call.What the tool does (v1, three steps)
Create GitHub repo from template (
template-go-agentortemplate-go-web)POST /repos/mathiasb/template-go-agent/generatereposcope in env/secretCommit staging namespace manifest to infra repo
k8s/staging/<name>/namespace.yamlOpen GitHub issue with experiment brief
POST /repos/mathiasb/<name>/issuesReturns URLs +
next_stepsstring with exact local commands to run.What it does NOT do (v2+)
task new-project)Security
cmd/routing/main.goRequired secrets/config (new)
Testing the concept (before full implementation)
Minimal proof-of-concept to validate the claude.ai → webhook → koala flow:
ping_projectMCP tool to routing pod that takes{name: string}and returns{echo: name, timestamp: ...}If ping works → full implementation is straightforward.
Related issues
Architecture update — 2026-05-14
Original issue assumed we needed a separate webhook endpoint + GitHub API access from claude.ai. That's not needed.
Revised approach: Gitea-first, GitHub via push mirror
The complete
new-projectflow works entirely through the existing gitea-mcp connector already available in claude.ai:No new HTTP endpoints needed. No GitHub API access from claude.ai. No routing pod changes needed.
ADR exception (pragmatic)
GitHub-as-master ADR is preserved for all ongoing work (Claude Code, Actions, PRs). One exception: repo creation originates in Gitea, GitHub receives it via push mirror seconds later. After that, GitHub is canonical for all development.
What this issue becomes
Rather than a webhook endpoint, this is now about orchestrating the gitea-mcp tool sequence as a single composite
project_createMCP tool in the routing pod's registry — callable directly from claude.ai as one action instead of four manual tool calls.The composite tool: repo_create → repo_mirror_push → file_write_branch (infra) → issue_create, with idempotency and rollback on failure.
Blockers
Test plan (manual, before composite tool)