Skip to content

[plan] Add Capabilities API configuration to MCP servers #6250

Description

@github-actions

Objective

Adopt the new Capabilities API from MCP Go SDK v1.1.0 to configure server behavior and disable unnecessary listChanged notifications.

Context

The MCP Go SDK v1.1.0 introduced a new Capabilities API that allows controlling server behavior. Since gh-aw's MCP tools are static (they don't change at runtime), we should disable listChanged notifications to reduce unnecessary overhead.

Approach

Update MCP server creation in two files to use ServerOptions:

File 1: pkg/cli/mcp_server.go (around line 105)

Current:

server := mcp.NewServer(&mcp.Implementation{
    Name:    "gh-aw",
    Version: GetVersion(),
}, nil)

Updated:

server := mcp.NewServer(&mcp.Implementation{
    Name:    "gh-aw",
    Version: GetVersion(),
}, &mcp.ServerOptions{
    Capabilities: &mcp.ServerCapabilities{
        ListChanged: false,  // Tools are static, no notifications needed
    },
})

File 2: pkg/gateway/gateway.go (around line 85)

Apply the same pattern to the gateway's MCP server creation.

Files to Modify

  • pkg/cli/mcp_server.go - Add ServerOptions with Capabilities
  • pkg/gateway/gateway.go - Add ServerOptions with Capabilities

Acceptance Criteria

  • Both MCP servers use ServerOptions with ListChanged: false
  • MCP server starts successfully with new configuration
  • Existing tool invocations continue to work
  • No listChanged notifications are sent unnecessarily
  • Tests pass: make test
    Related to [plan] Adopt MCP Go SDK v1.1.0 improvements #6249

AI generated by Plan Command for discussion #6222

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions