Skip to content

Conversation

sd2k
Copy link
Collaborator

@sd2k sd2k commented Oct 10, 2025

This commit adds support for 'proxied' datasource tools. These are tools
that are hosted on a remote MCP server (e.g., a Tempo datasource).
Before the first MCP method is called, provided a session is available
(i.e. not during an 'initialize' request), the MCP server will iterate
over all suitable available datasources in the configured Grafana
instance and attempt to discover and register tools from them, by
calling the remote MCP server's 'list_tools' method then using dynamic
session-based tools to register the discovered tools.

Tools are named with the format: <datasource_type>_<original_tool_name>.
For example, a Tempo traceql-search tool would be named:
tempo_traceql-search. Each added tool also has a 'datasourceUid'
parameter added to its input schema, which is used to identify the
datasource to query.

The --disable-proxied flag can be used to disable this feature.

Fixes #53.
Fixes #222.
Supersedes #226.

This commit adds support for 'proxied' datasource tools. These are tools
that are hosted on a remote MCP server (e.g., a Tempo datasource).
Before the first MCP method is called, provided a session is available
(i.e. not during an 'initialize' request), the MCP server will iterate
over all suitable available datasources in the configured Grafana
instance and attempt to discover and register tools from them, by
calling the remote MCP server's 'list_tools' method then using dynamic
session-based tools to register the discovered tools.

Tools are named with the format: <datasource_type>_<original_tool_name>.
For example, a Tempo traceql-search tool would be named:
tempo_traceql-search. Each added tool also has a 'datasourceUid'
parameter added to its input schema, which is used to identify the
datasource to query.

The `--disable-proxied` flag can be used to disable this feature.

Fixes #222.
Supersedes #226.
@sd2k sd2k marked this pull request as ready for review October 10, 2025 12:14
@sd2k sd2k requested a review from a team as a code owner October 10, 2025 12:14
The stdio transport is single-session by default so 'per-session'
methods don't work. Instead, just register the tools on the server
at startup in this mode.
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.

feat: Support MCP servers defined by datasources Add tools for Tempo

1 participant