Repository navigation
feat(mcp): serve the BackWave tools on /mcp through McpToolAccess - #545
Merged
Merged
Conversation
Add BackWave.Pro.Mcp (BackWave 1.7.0 -> 1.9.0). Its tools join the one MCP server of the app. McpToolAccess gives each tool of the BackWave assembly the ManageAllTenants rule, and JobsMcp allows only requeue and cancel among the writes. The app's filters run before BackWave's, and the server keeps the name of the app. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a2045d-65f9-767c-a723-e94e1f37f5d4
Owner
Author
|
review-gate: passed e93f07b Independent review (thermo-nuclear rubric + dotnet stack pack) found no high or medium findings. Low findings, all addressed in d703d40 except the last:
|
A Worker process and the integration tests no longer take on the license of BackWave Pro or log its notice. Amp-Thread-ID: https://ampcode.com/threads/T-01a2045d-65f9-767c-a723-e94e1f37f5d4 Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
AI agents should be able to watch and repair background jobs over MCP. BackWave ships this as
BackWave.Pro.Mcp.What changed
BackWave.ProandBackWave.Pro.Mcp.AddMcpadds its tools to the one MCP server of the process, so the BackWave tools are on/mcp. Only a process that serves requests adds them.McpToolAccessgives each tool of theBackWave.Pro.Mcpassembly theManageAllTenantsrule. A tool of another assembly with no[ToolAccess]still stops startup.JobsMcpsets the gates of BackWave. Reads, requeue, and cancel are on. Pause and resume, a trigger of a schedule, a concurrency limit, and the payload and output of a job stay denied.AddEntrypointsputs the app's MCP filters before BackWave's, so a denial is apermission_deniedtool error with the app's telemetry. It also clearsServerInfo, whichAddMcpsets toBackWave.endpoints.mdandbackground-jobs.md.Tradeoffs
/backwave-mcpendpoint. There is one MCP server for each DI container, soMapBackWaveProMcpwould serve the app's tools too.ManageAllTenants, notJobOperators. The tools show the jobs of all tenants, and an operator of the dashboard is never an agent.AuthorizeViewallows each request. BackWave's view gate covers the whole server, so a deny would also hide the app's tools.Blast Radius
AddBackWavePro, so a Worker and the integration tests run without it. Pro is free under $1M of annual revenue and needs a license key (BackWave:ProLicense) above it. With no key it logs one notice.ManageAllTenantsClientIdsis empty by default, so a default deploy shows the tools to nobody.get_job. The docs tell job handlers to keep personal data out of exception messages.Verification
dotnet build FullstackTemplate.slnx: 0 warnings.pause_queue, apermission_deniedfor a tenant admin and a delegated agent, and the server name.