Skip to content

feat: Support MCP servers defined by datasources #222

@SandersAaronD

Description

@SandersAaronD

We have #53, still open, for adding Tempo support. Towards the end of that issue you can find the link to the PR that adds an MCP server to Tempo.

It is almost certainly better to have Tempo (or any other team) supporting the Tempo datasource than to support it over in the grafana mcp server. We do, however, want to be able to query our core datasources after only installing this mcp server. It's difficult to see how to do this.

Currently, it looks like the way to do this would be to have the mcp server iterate over available datasources and check them for available mcp servers by quering a known endpoint or configuration for them. We could then expose an mcp tool from mcp-grafana that simply proxies to the datasource mcp server. This introduces a few difficulties:

  1. In cases where different datasources have mcp servers with the same name but different arguments, we would have to give them different names before exposing them and keep track of which mcp tools could validly be called on which datasources.
  2. It's not obvious how to proxy an mcp server; the protocol is underdocumented and this use case has not seen a lot of use generally.
  3. To keep the listing of MCP tools current, the mcp server would have to poll the grafana instance periodically, which could be thorny.

I did look briefly at importing the Tempo MCP server into this one and exposing it, but this seems like it creates more problems than it solves.

If we don't have a better idea for how to expose datasource mcp tools to the user, it would seem like a good idea to proceed with implementing the proxying approach described above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions