Skip to content

Server doesn't advertise tools capability when client sends empty capabilities in initialize #1185

Open

Description

@JobJobovich

Version

codebase-memory-mcp v0.9.0, Windows x64

Platform

Windows (x64)

Install channel

GitHub release archive / install.sh / install.ps1

Binary variant

ui

What happened, and what did you expect?

When a client sends an initialize request with capabilities: {} (empty object), the server responds with capabilities: {} and omits the tools field entirely. This means MCP clients (like Hermes Agent with MCP SDK 1.26.0) that check capabilities.tools in InitializeResult conclude the server has no tools and never call tools/list. The server's tools become invisible to the client.

Expected: Per the MCP specification, the server's capabilities in InitializeResult should describe what the server supports, regardless of what the client declares in its own capabilities. Since codebase-memory-mcp implements the tools/* request family, it should always include "tools": {"listChanged": false} (or equivalent) in its capabilities response. This is the standard behaviour of other MCP servers — they advertise their capabilities unconditionally.

Reproduction

The exact steps so we can reproduce it ourselves:

Step 1 — Start the server and send an initialize request with empty client capabilities:

Code
· bash
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | codebase-memory-mcp
Actual output:

Code
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2024-11-05",
"serverInfo": {"name": "codebase-memory-mcp", "version": "0.9.0"},
"capabilities": {}
}
}
(The server returns capabilities: {} — no tools field.)

Expected output:

Code
· json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2024-11-05",
"serverInfo": {"name": "codebase-memory-mcp", "version": "0.9.0"},
"capabilities": {
"tools": {"listChanged": false}
}
}
}
(The server should always advertise tools since it implements the tools/* request family.)

Step 2 — For comparison, send initialize with client capabilities: {"tools": {}}:

Code
· bash
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"clientInfo":{"name":"test","version":"1.0"}}}' | codebase-memory-mcp
Output:

Code
· json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2024-11-05",
"serverInfo": {"name": "codebase-memory-mcp", "version": "0.9.0"},
"capabilities": {
"tools": {"listChanged": false}
}
}
}
(This works correctly — server advertises tools because the client explicitly asked for them.)

No code indexing is needed to reproduce — this is a protocol-level bug in the MCP initialize handshake. Any MCP client that sends capabilities: {} (as MCP SDK v1.26.0 does) will fail to discover tools.

Logs


Diagnostics trajectory (memory / performance / leak issues)


Project scale (if relevant)

No response

Confirmations

  • I searched existing issues and this is not a duplicate.
  • My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.

Activity

  1. added this to the 0.9.1-rc milestone on Jul 22, 2026
  2. added
    priority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.
    on Jul 22, 2026
  3. DeusData commented on Jul 22, 2026

    @DeusData
    Owner

    Thanks for the minimal protocol reproduction. I verified the contract against the current MCP specification: a server that implements tools must advertise the tools server capability independently of whether the client advertises its own tools capability. This is a high-priority 0.9.1-rc integration bug under #395, with empty client capabilities as the RED handshake case.

  4. DeusData commented on Sep 26, 2026

    @DeusData
    Owner

    Thank you, @JobJobovich, for the minimal handshake repro! We couldn't reproduce it. With capabilities: {} from the client, the server returns "capabilities":{"tools":{"listChanged":false},…}, and v0.9.0 already advertised tools unconditionally. If Hermes still doesn't list the tools on v0.11.0, could you capture the raw initialize exchange from that session?

  5. added
    awaiting-reporterWaiting on the reporter for info/repro; stale bot will warn then close
    on Sep 26, 2026
  6. github-actions commented on Sep 27, 2026

    @github-actions

    Thanks for the report! To move this forward we need a bit more so we can reproduce it ourselves:

    • the codebase-memory-mcp --version you're on
    • the exact steps or command you ran
    • a public repo (or a small dummy snippet) that shows the problem — please don't paste proprietary code

    Once that's here we'll pick it straight back up. Heads-up: issues left awaiting-reporter are automatically closed after a few weeks of silence, but a comment reopens the door anytime.

  7. DeusData commented on Oct 19, 2026

    @DeusData
    Owner

    Thank you for the minimal handshake example. The later check did not reproduce the missing tools capability, so the useful outstanding evidence remains the raw initialize exchange from an affected Hermes session on v0.11.0 or newer. No source repository is needed for this protocol-only case.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-reporterWaiting on the reporter for info/repro; stale bot will warn then closebugSomething isn't workingeditor/integrationEditor compatibility and CLI integrationpriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.ux/behaviorDisplay bugs, docs, adoption UXwindowsWindows-specific issues

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions