Skip to content

app/: the public MCP server's build, review and comment tools (sc-8900) - #75

Merged
ndbroadbent merged 7 commits into
mainfrom
laravel-read
Dec 2, 2026
Merged

ndbroadbent merged 7 commits into
mainfrom
laravel-read

Conversation

@ndbroadbent

Copy link
Copy Markdown
Member

Part of sc-8900 (the data side of the Laravel Rust port). Stacked on #73.

What's here

  • The public MCP server at /mcp (app/src/mcp), on rmcp as today. It's stateless, answers in JSON, and only for our own hosts.
  • Who the request acts for: the auth::Principal extractor, so a personal token (vcu_) or a project token (vci_) works now. OAuth joins when app/: the OAuth server for MCP clients (sc-8900) #57 merges, through the same extractor's guard.
  • Tools ported, with their descriptions, schemas and behaviour unchanged:
    • get_skill, list_builds, get_build, contact_sheet, get_snapshot, get_pr_changeset, snapshot_history;
    • review, review_page;
    • list_comments, post_comment, update_comment, resolve_comment, delete_comment;
    • create_build, upload_snapshots, finalize_build;
    • support_send.
  • POST /api/v1/support/feedback, plus a FeedbackReceived event. The team email listens to it (emails are subdomains').
  • app/src/mcp/context.rs: rmcp runs each tool on its own task, where Laravel's task-local context is gone, so call_tool runs every tool inside the HTTP request's context. This is a workaround until Handle a route with a Tower service laravel/rust-framework#520 is released, and it lives in this one module.
  • Answers keep today's sorted JSON keys. This app's serde_json keeps insertion order, so structured() and the text headers sort them explicitly. The argument help lists required fields first, then the rest by name, as today.
  • finalize_build answers with the build as finalizing left it (processing), as today, even when the job has already run.

Not here yet

  • whoami, list_organizations, get_organization, invite_member, create_organization, create_project, get_project, update_project, create_project_token, delete_project_token and download_build.
    • The organization and token tools call subdomains' functions on app/: creating an organization (sc-8900) #70.
    • download_build calls the downloads port (another PR).
    • They come in the next PR, together with lists_the_tools_each_kind_of_token_can_use and the golden tests that call them.
  • The two calls these tests make to those tools are left out of app/tests/mcp.rs, with a comment saying so.
  • runs_a_build checks its one credit through credits::used_this_month instead.

Tests

app/tests/mcp.rs ports 8 of today's MCP tests and checks every call against tests/golden/mcp. The whole app suite passes on docspring-dev, and clippy (-D warnings) is clean.

@visualci-com

visualci-com Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #388 · 333 unchanged · no changes

This PR vs base: 22 changed, 2 added since #275, across 11 builds

Updated as builds change. Agents can review with VisualCI's MCP tools.

@ndbroadbent
ndbroadbent force-pushed the laravel-read branch 2 times, most recently from 2252452 to e64c946 Compare December 2, 2026 16:05
@ndbroadbent
ndbroadbent force-pushed the laravel-process branch 2 times, most recently from 4bf084a to 3673a53 Compare December 2, 2026 20:28
@ndbroadbent
ndbroadbent changed the base branch from laravel-process to main December 2, 2026 20:38
…builds, get_build, contact_sheet, get_snapshot, get_pr_changeset, snapshot_history, review, review_page, the comment tools, create_build, upload_snapshots, finalize_build and support_send, against today's answers; POST /api/v1/support/feedback; tools run in the request's Laravel context (until laravel/rust-framework#520); answers keep today's sorted keys
…tests (a project token reaches only its project, approving with people, every tool refuses arguments it doesn't take, the Free, Staff and Team credit scenarios); approved_elsewhere and earlier keep to the build's suite; list_builds and snapshot_history filter in SQL; a snapshot is looked up by name directly; review reads the build's snapshots once, refuses unknown snapshot names and runs under the build's lock; a feedback key sent twice at once answers duplicate; the feedback endpoint refuses unknown fields; the MCP tests put their files in the blob store
@ndbroadbent
ndbroadbent merged commit c523ae2 into main Dec 2, 2026
11 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.

1 participant