[go: up one dir, main page]

Skip to content

Introduce MCP tool versioning

What does this MR do and why?

This MR introduces versioning for the MCP server so that we can safely release and deprecate both one-to-one and custom tools.

References

#570762 (comment 2769593604)

How to set up and validate locally

  1. Make sure the following feature flags are enabled.

    Feature.enable(:oauth_dynamic_client_registration)
    Feature.enable(:mcp_server)
  2. Query list of tools via tools/list

    Request
    {
      "jsonrpc": 2.0,
      "method": "tools/list",
      "id": 1
    }
    Response
    {
      "jsonrpc": "2.0",
      "result": {
        "tools": [
          {
            "description": "Get the current version of MCP server.",
            "inputSchema": {
              "properties": {},
              "required": [],
              "type": "object"
            },
            "name": "get_mcp_server_version",
            "version": "0.1.0"
          },
          ...
        ]
      },
      "id": 1
    }
  3. Invoke a tools/call with and without a version.

    Request
    {
      "jsonrpc": 2.0,
      "method": "tools/call",
      "id": 1,
      "params": {
        "name":"get_mcp_server_version",
        "version": "0.1.0"
      }
    }
    Response
    {
      "id": 1,
      "jsonrpc": "2.0",
      "result": {
        "content": [
          {
            "text": "18.5.0-pre",
            "type": "text"
          }
        ],
        "isError": false,
        "structuredContent": {
          "revision": "ab23218efa6",
          "version": "18.5.0-pre"
        }
      }
    }

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Tan Le

Merge request reports

Loading