Skip to content

Add setools-no-mcp package - #152

Closed
rhelder wants to merge 1 commit into
archlinuxhardened:masterfrom
rhelder:setools-no-mcp
Closed

rhelder wants to merge 1 commit into
archlinuxhardened:masterfrom
rhelder:setools-no-mcp

Conversation

@rhelder

@rhelder rhelder commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

For me, the new python-fastmcp-slim dependency is a bummer.

  1. It requires an additional 12 AUR dependencies, which is a big increase in system maintenance workload (well, depending on how on top of re-building your AUR packages you are!) and also a big increase in attack surface, given that the AUR is not a trusted repository. Even if one reviews their PKGBUILDs carefully (and indeed they should), adding a dozen more unfamiliar PKGBUILDs to review increases the probability of making a mistake.
  2. The python-fastmcp-slim package itself is new, added to the AUR just this last June 9. The package was last updated on June 11, has since been flagged out-of-date, and has a pending request. So it is far from clear how well maintained this package will continue to be. I don't like this especially because I cannot find any solid documentation about what dependencies are actually required for FastMCP, so I can't verify that python-fastmcp-slim's PKGBUILD is even listing the correct dependencies. (I suppose if I tried to install FastMCP with uv I could verify this – but I didn't bother because all of the other concerns are sufficient for me).
  3. All of this trouble is just for an optional dependency that happens to be required to run the tests. So even if you will never hereafter use python-fastmcp-slim, you still have to be in charge of building it and a dozen other AUR dependencies forever and ever, just to run the tests.

This issue comes from how upstream chose to structure the tests, but I think it can be worked around pretty easily – for those who would prefer it – at the packaging level. All I did was modify the setools PKGBUILD to not include python-fastmcp-slim as a dependency, and to tell pytest to skip the two tests that require FastMCP. (I also think this falls squarely within the package-maintenance scope, since we're just making a decision about how to handle an optional dependency.) The question, to which I don't have a definitive answer, is how to make this sort of workaround available to people who want it, while also leaving open the option to build with the optional python-fastmcp-slim dependency.

What I tentatively propose in this PR is to make a separate setools-no-mcp package. It is the same as the setools package, except that python-fastmcp-slim isn't a dependency and the tests that require FastMCP are skipped. The package provides and conflicts with setools, so pacman -S --asdeps setools-no-mcp will replace setools with setools-no-mcp without complaint.

That's the cleanest proposal I can think of for now – it will at least be my set-up for the time being, but I propose it here as well because there might be other people in my position. Sorry again for the flurry of PRs, and thanks again for your work!

For users who want to skip the `python-fastmcp-slim` dependency, which
is optional for `setools` but required for some of the tests. Just skip
the tests that require `python-fastmcp-slim`.
@fishilico

Copy link
Copy Markdown
Member

Hello,

Thanks for your report and Pull Request. Actually python-fastmcp-slim appears to have changed a lot recently, and now there is even a compatibility issue because Arch Linux packages python-mcp 1.29.0 even though SETools' testsuite seems to require mcp.server.request_state.RequestStateSecurity, which was added in 2.0.0 (modelcontextprotocol/python-sdk#3032).

I modified the package setools to remove python-fastmcp-slim from the checkdepends. I also used pytest --ignore tests/library/mcp/test_server.py to ignore the relevant testsuite, instead of -k 'not test_encoder and not test_server' from this PR. With this, the GitHub CI seems happy, and I pushed these changes to https://aur.archlinux.org/cgit/aur.git/commit/?h=setools&id=1b716404106fb9606279c8759577641bd65b7006 .

I therefore consider this PR as fixed, and these is no need to introduce setools-no-mcp (python-fastmcp-slim is still listed as an optional dependency, for users willing to use the MCP feature). Please let me know if I missed anything in your report.

@fishilico fishilico closed this Sep 25, 2026
@rhelder

rhelder commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

This is great! Thanks a lot.

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.

2 participants