Skip to content

Call setServerInfo() on the server builder - #28

Open
agent-qv wants to merge 1 commit into
Combodo:masterfrom
agent-qv:pr/server-info
Open

agent-qv wants to merge 1 commit into
Combodo:masterfrom
agent-qv:pr/server-info

Conversation

@agent-qv

@agent-qv agent-qv commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #27.

Adds the missing setServerInfo() call to the mcp.server.builder definition in config/services.yaml, so initialize reports the name, version, description, icon and website URL configured in config/packages/mcp.yaml instead of the SDK's app/dev.

ServerInfoTest posts a real initialize to /_mcp and checks the reported name and version against the configuration. It fails without the fix.

config/services.yaml redefines mcp.server.builder as iTopBuilder with
its own list of calls. The bundle's definition of that service starts
with setServerInfo(mcp.app, mcp.version, mcp.description, mcp.icons,
mcp.website_url); the redefinition left that call out, so it was never
made. initialize then answered with the SDK defaults, "app" and "dev",
whatever config/packages/mcp.yaml says, and the configured description,
icon and website URL were never sent.

Clients name the server after serverInfo.name (VS Code prefixes every
tool with it), so two iTop MCP servers configured in the same client
could not be told apart.

iTopBuilder::setServerInfo() already exists and forwards to the SDK
builder: this only adds the missing call. ServerInfoTest posts a real
initialize to /_mcp and checks the reported name and version against
the configuration.
Copilot AI balanced review requested due to automatic review settings October 19, 2026 11:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Icon configuration needs normalization so responses expose the protocol’s mimeType field.

1 open issue
What changed in this PR

Connects configured server metadata to the MCP builder so initialize reports the application identity instead of SDK defaults.

Changes:

  • Adds the missing setServerInfo() service call.
  • Adds an HTTP regression test for the configured server name and version.
File Description
tests/​phpunit/​ServerInfoTest.php Tests server identity returned by initialize.
config/​services.yaml Passes configured server metadata to the builder.

Review effort: Balanced

Comment thread config/services.yaml
# you CAN still use autowiring: we just want to show what it looks like without
autowire: true
calls:
- setServerInfo: ['%mcp.app%', '%mcp.version%', '%mcp.description%', '%mcp.icons%', '%mcp.website_url%']
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.

The server reports app/dev on initialize: setServerInfo() is never called

2 participants