Skip to content

[Server] Questions and issues found during usage #65

@ineersa

Description

@ineersa

Hello! 👋

I'm working on moving MCP servers from python to PHP and tried to use this SDK.

This MCP is first one - Python MCP

While developing it I found some issues.

Server capabilities are hard coded inside registry, no ability to change.

\Mcp\Capability\Registry::getCapabilities everything created via new, no ability to pass Server capabilities

Container and Symfony

Passing container and using ->get() won't work with Symfony by default since services are private.

The \"App\\Tools\\PythonTool\" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.

only way to make it work is to set service public.

No ability to set outputSchema

https://modelcontextprotocol.io/specification/2025-06-18/server/tools#data-types
Tools are missing output schema support, which would be a very useful feature.

Discovery won't work with PHAR

\Mcp\Capability\Discovery\Discoverer::processFile is using realpath which will return false inside PHAR.
It would be great to fix this since bundling MCPs into single binaries is a very useful.

Logging and notifications

I saw that some work is going on at https://github.com/modelcontextprotocol/php-sdk/pull/42/files but it's still missing logging.

https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/logging

Ideally, there would be an internal logger that tracks sessions and respects client-requested log levels, and makes this available inside tools/resources (perhaps via the container).

It could also be useful if this were interchangeable with an external logger passed via ->withLogger($this->logger) to the server.

In practice, you often don’t want logs stored on each server, but instead centralized on the client side. For example, when developing a client with 10–15 MCP servers, debugging across all of their logs can be very difficult.

Code organization

At the moment, the repository looks like two projects merged together. Would it make sense to start contributing features/fixes now, or is it better to wait until things stabilize a bit?
It would also really help to have some architecture overview or documentation to better understand the internals.

Thank you for your hard work on this project. 🙏
I’d be happy to contribute where possible!

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRFC = Request For Comments (proposals about features that you want to be discussed)ServerIssues & PRs related to the Server component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions