Skip to content

[Server] Questions and issues found during usage #65

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!

Activity

  1. changed the title [-][Question][/-] [+][Question] Questions and issues found during usage[/+] on Sep 12, 2025
  2. chr-hertel commented on Sep 14, 2025

    @chr-hertel
    Member

    Hi @ineersa, thanks for your test-drive and the detailed feedback - I created sub-issues here, to make it easier to act in separate PRs.

    I think your findings are totally valid, and you're also right that this thing is not stable at this point. And contributions are very much welcome. The tricky part is a bit aligning on working on things in parallel without blocking each other :D
    That's also why I try to slice things smaller and smaller.

  3. changed the title [-][Question] Questions and issues found during usage[/-] [+][Server] Questions and issues found during usage[/+] on Sep 14, 2025
  4. added
    ServerIssues & PRs related to the Server component
    on Sep 14, 2025
  5. ineersa commented on Sep 14, 2025

    @ineersa
    ContributorAuthor

    Hi @chr-hertel thanks!
    I will start working on small fixes then, with outputSchema and will try to change discovery to make it work with PHARs since can easily reproduce and test it.

  6. chr-hertel commented on Jan 23, 2026

    @chr-hertel
    Member

    Everything covered - thanks again for raising!

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

    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