Skip to content

Conversation

ineersa
Copy link
Contributor

@ineersa ineersa commented Oct 5, 2025

Modified Discoverer to work with SplFileInfo instead of strings to have stream safe file operations.
Added tokenizer extension to requirements since it's important to know required extensions while building binaries and token_get_all() inside discovery uses it.

Motivation and Context

Resolves #69

It allows building PHAR files with tools discovery and build binaries for easy MCP tools hosting

How Has This Been Tested?

Tested in MCP server with PHAR via humbug/box - ineersa/python-mcp@f177ed5

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@chr-hertel chr-hertel added the Server Issues & PRs related to the Server component label Oct 6, 2025
@chr-hertel
Copy link
Member

Surprised that this is all what is needed - great :)

Needs a rebase as well.

@ineersa
Copy link
Contributor Author

ineersa commented Oct 8, 2025

Surprised that this is all what is needed - great :)

Needs a rebase as well.

Removed extension, rebased.

Yeah, pretty much realpath.

I do run llama.cpp/openwebui/MCPs on separate headless Linux machine, and for some reason I'm lazy to install PHP there, so I decided to wrap up MCP servers to a single file binaries which I can just wget and run.

Copy link
Member

@chr-hertel chr-hertel left a comment

Choose a reason for hiding this comment

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

Thank you @ineersa! 👍

@chr-hertel
Copy link
Member

Oh, please make sure your commit is signed

@ineersa
Copy link
Contributor Author

ineersa commented Oct 8, 2025

Oh, please make sure your commit is signed

Sorry signed

@chr-hertel chr-hertel merged commit 415f8dd into modelcontextprotocol:main Oct 8, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Server Issues & PRs related to the Server component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Server] Discovery won't work with PHAR
2 participants