Skip to content

POC: expose datasource capabilities via embedded MCP#740

Draft
sunker wants to merge 5 commits intomainfrom
feat/embedded-mcp
Draft

POC: expose datasource capabilities via embedded MCP#740
sunker wants to merge 5 commits intomainfrom
feat/embedded-mcp

Conversation

@sunker
Copy link
Copy Markdown

@sunker sunker commented May 5, 2026

Adopts the new experimental/mcp package from grafana/grafana-plugin-sdk-go#1549 to expose query types, resource routes and a health check tool over MCP.

Generates the v0alpha1 query schema (20 query types) via schemabuilder and hand-authors routes.json for the /labels and /milestones endpoints. Schema lives at pkg/schema/v0alpha1/ so Go's //go:embed can pick it up. pkg/main.go wires an mcp.Server and registers one example custom prompt (investigate-pull-requests).

Depends on grafana/grafana-plugin-sdk-go#1549. The local go.mod uses a replace directive against the SDK branch - to merge upstream, the SDK changes need to land first and the replace needs to be removed in favor of a real version bump.

Test plan

  • go test ./pkg/... passes
  • TestSchemaDefinitions regenerates schema files idempotently
  • Manual smoke via mcp-inspector (see SMOKE_TEST.md in workspace)

sunker added 4 commits May 5, 2026 10:37
Add a replace directive pointing the SDK at the local sibling repo so
this datasource picks up the in-progress embedded MCP work. Add
TestSchemaDefinitions (adapted from PR #291) which uses the
schemabuilder to produce v0alpha1/query.types.json and
query.examples.json under pkg/schema/ - this location lets Go's
//go:embed pick up the schema later for the MCP integration.
@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented May 5, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ mckn
❌ sunker
You have signed the CLA already but the status is still pending? Let us recheck it.

@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented May 5, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants