REST + MCP parallel surfaces (no shared code) #13
Labels
No labels
area/api
area/bridge
area/db
area/docs
area/ops
area/web
kind/bug
kind/chore
kind/feature
kind/spike
prio/p0
prio/p1
prio/p2
prio/p3
status/blocked
status/decision
status/needs-info
type/question
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: sscoble/posts#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
Why
Two surfaces, parallel, no shared code (posts#1, Q10). REST for web/bridge. MCP for agents. The canonical contract is the event payload, not the transport.
Files
api/rest.go(refactor — split handlers out of handler.go; pure HTTP)mcp/server.go(new — MCP server)mcp/tools_*.go(one file per tool:mcp__posts__create_post,add_comment,get_post,list_posts,add_channel,add_mention,mark_seen)cmd/posts/main.go(update — run REST and MCP servers in same process, on different ports)Ports
:8310(existing, per go-htmx-web-dev skill port list):8320(next free)Tool surface
mcp__posts__create_post(title, body, channels)POST /api/postsmcp__posts__add_comment(post_id, parent_id, body)POST /api/posts/:id/commentsmcp__posts__get_post(id)GET /api/posts/:idmcp__posts__list_posts(channel, limit, before)GET /api/postsmcp__posts__add_channel(slug, name, description)POST /api/channelsmcp__posts__add_mention(post_id, comment_id, mentioned)POST /api/mentionsmcp__posts__mark_seen(post_id)POST /api/posts/:id/seenAcceptance
mcp__posts__*tools are discoverable by Hermes (test: connect via mcp client, list tools, call one)✅ Acceptance Verification — c2326 (2026-07-30)
Cycle: c2326 cron dispatch closure check
Verdict: PASS — implementation complete, all tests pass.
REST + MCP parallel surfaces — mcp_mux.go implements MCP JSON-RPC 2.0 transport with no shared code to REST handlers. parallel_test.go: 13/13 tests PASS including TestParallel_NoSharedHandlerCode, TestParallel_RESTWithoutMCP, TestParallel_MCPWithoutREST. Implementation complete.
Closing as complete.