Skip to content

feat(router): expose prompt-to-query via MCP - #3157

Closed
fiam wants to merge 4 commits into
wilson/cosmo-335-cosmo-cloud-prompt-to-query-via-mcp-productfrom
alberto/cosmo-335-prompt-to-query-via-mcp
Closed

feat(router): expose prompt-to-query via MCP#3157
fiam wants to merge 4 commits into
wilson/cosmo-335-cosmo-cloud-prompt-to-query-via-mcp-productfrom
alberto/cosmo-335-prompt-to-query-via-mcp

Conversation

@fiam

@fiam fiam commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • expose a generate_query tool through the router MCP server
  • send the active RouterConfig.version to the control-plane GenerateQuery RPC
  • resolve that version to the stored SDL in the control plane, call Yoko EnsureIndex on demand, and use its returned opaque index ID
  • add OAuth scope support and MCP documentation for the tool
  • add mcp-yoko-run.sh for a local Compose-backed end-to-end setup with a Codex-backed fake Yoko

Stack

Verification

  • CGO_ENABLED=0 go test ./... in router
  • control-plane TypeScript build
  • control-plane prompt-to-query service and ConnectRPC integration tests
  • live MCP call through router → control plane → fake Yoko → Codex using mcp-yoko-run.sh

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 61ed043e-9dcb-4499-8e31-ec71ecef0c41

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.43011% with 55 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.72%. Comparing base (c9d6d43) to head (189412b).

Files with missing lines Patch % Lines
...rolplane/src/core/services/PromptToQueryService.ts 60.97% 16 Missing ⚠️
router/pkg/controlplane/prompttoquery/client.go 63.63% 11 Missing and 5 partials ⚠️
router/pkg/mcpserver/server.go 87.95% 5 Missing and 5 partials ⚠️
router/core/supervisor_instance.go 0.00% 7 Missing ⚠️
router/core/router.go 0.00% 4 Missing and 1 partial ⚠️
router/core/graph_server.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                                       Coverage Diff                                        @@
##           wilson/cosmo-335-cosmo-cloud-prompt-to-query-via-mcp-product    #3157      +/-   ##
================================================================================================
- Coverage                                                         43.85%   43.72%   -0.13%     
================================================================================================
  Files                                                              1072     1073       +1     
  Lines                                                            140577   140751     +174     
  Branches                                                           7361     7389      +28     
================================================================================================
- Hits                                                              61655    61549     -106     
- Misses                                                            77071    77339     +268     
- Partials                                                           1851     1863      +12     
Files with missing lines Coverage Δ
controlplane/src/core/bufservices/NodeService.ts 38.35% <100.00%> (+19.17%) ⬆️
router/core/router_config.go 93.97% <ø> (ø)
router/gen/proto/wg/cosmo/node/v1/node.pb.go 30.28% <100.00%> (+2.72%) ⬆️
router/pkg/config/config.go 83.00% <ø> (ø)
router/pkg/mcpserver/auth_middleware.go 90.69% <100.00%> (+0.10%) ⬆️
router/core/graph_server.go 85.69% <0.00%> (-0.07%) ⬇️
router/core/router.go 68.11% <0.00%> (-2.88%) ⬇️
router/core/supervisor_instance.go 0.00% <0.00%> (ø)
router/pkg/mcpserver/server.go 76.67% <87.95%> (+6.11%) ⬆️
...rolplane/src/core/services/PromptToQueryService.ts 61.45% <60.97%> (+29.17%) ⬆️
... and 1 more

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown

Router image scan passed

✅ No security vulnerabilities found in image:

ghcr.io/wundergraph/cosmo/router:sha-de6f407209042586439e1b70efcde5b3f7a9489d

@fiam

fiam commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by a replacement draft PR using the ROUTER-575 branch name.

@fiam fiam closed this Aug 12, 2026
@fiam
fiam deleted the alberto/cosmo-335-prompt-to-query-via-mcp branch August 12, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant