Package Details: python-mcp 1.13.1-3

Git Clone URL: https://aur.archlinux.org/python-mcp.git (read-only, click to copy)
Package Base: python-mcp
Description: Model Context Protocol SDK.
Upstream URL: https://github.com/modelcontextprotocol/python-sdk
Licenses: MIT
Submitter: medaminezghal
Maintainer: medaminezghal
Last Packager: medaminezghal
Votes: 2
Popularity: 0.23
First Submitted: 2025-02-04 16:43 (UTC)
Last Updated: 2025-08-24 09:01 (UTC)

Latest Comments

1 2 3 4 5 Next › Last »

medaminezghal commented on 2025-08-24 09:11 (UTC)

@rubin55 @gwuensch I reverted the changes about the tests because it seems that mcp need to be installed to pass the tests.

rubin55 commented on 2025-08-23 19:31 (UTC)

@medaminezghal no, not completely actually. I re-ran and now two tests keep failing with the same error message. I only discovered because I didn't have python-mcp installed; To "trick" it, I installed python-mcp and then these two tests succeeded. But of course that's no good, because when the tests use a system-installed mcp module, it's not testing the package but whatever (presumably older) version the system had installed.

gwuensch commented on 2025-08-23 12:51 (UTC) (edited on 2025-08-23 12:52 (UTC) by gwuensch)

I'm experiencing the same error (even after the "fix", commit 7cc38aa).

medaminezghal commented on 2025-08-23 07:53 (UTC)

@rubin55 does it work now?

rubin55 commented on 2025-08-22 18:09 (UTC) (edited on 2025-08-22 18:14 (UTC) by rubin55)

The check stage fails with this: ModuleNotFoundError: No module named 'mcp'

The output is too long to share, but here's a snippet:

Successfully built mcp-1.13.1-py3-none-any.whl
==> Starting check()...
============================= test session starts ==============================
platform linux -- Python 3.13.7, pytest-8.4.1, pluggy-1.6.0 -- /usr/bin/python
cachedir: .pytest_cache
hypothesis profile 'default'
rootdir: /tmp/makepkg.builddir/python-mcp/src/mcp-1.13.1
configfile: pyproject.toml
plugins: anyio-4.10.0, hypothesis-6.136.2, flakefinder-1.1.0, timeout-2.4.0, typeguard-4.4.4, xdist-3.6.1, examples-0.0.18, inline-snapshot-0.24.0, asyncio-0.26.0
asyncio: mode=Mode.STRICT, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
24 workers [0 items]    errors
scheduling tests via LoadScheduling


═══════════════════════════════ inline-snapshot ════════════════════════════════
INFO: inline-snapshot was disabled because you used xdist. This means that tests
with snapshots will continue to run, but snapshot(x) will only return x and
inline-snapshot will not be able to fix snapshots or generate reports.


==================================== ERRORS ====================================
___________________ ERROR collecting tests/cli/test_utils.py ___________________
ImportError while importing test module '/tmp/makepkg.builddir/python-mcp/src/mcp-1.13.1/tests/cli/test_utils.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/site-packages/_pytest/python.py:498: in importtestmodule
    mod = import_path(
/usr/lib/python3.13/site-packages/_pytest/pathlib.py:587: in import_path
    importlib.import_module(module_name)
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
/usr/lib/python3.13/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
tests/cli/test_utils.py:8: in <module>
    from mcp.cli.cli import _build_uv_command, _get_npx_command, _parse_file_path  # type: ignore[reportPrivateUsage]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   ModuleNotFoundError: No module named 'mcp'

When I revert your changes to check(), tests work.

medaminezghal commented on 2025-07-23 12:10 (UTC)

@mcr try to delete yay cache then update it again.

mcr commented on 2025-07-23 12:07 (UTC)

I'm getting a different error, also in check():

>               pytest.fail(f"Server process exited with code {process.returncode}")
E               Failed: Server process exited with code 1

tests/issues/test_1027_win_unreachable_cleanup.py:211: Failed
------------------------------------------------------- Captured stderr call -------------------------------------------------------Traceback (most recent call last):
  File "/tmp/tmpb3_5o30d.py", line 6, in <module>
    from mcp.server.fastmcp import FastMCP
  File "/home/mario/.cache/yay/python-mcp/src/mcp-1.12.1/test-env/lib/python3.13/site-packages/mcp/__init__.py", line 1, in <module>  File "/home/mario/.cache/yay/python-mcp/src/mcp-1.12.1/test-env/lib/python3.13/site-packages/mcp/client/session.py", line 10, in <module>
ModuleNotFoundError: No module named 'mcp.types'
===================================================== short test summary info ======================================================FAILED tests/issues/test_1027_win_unreachable_cleanup.py::test_stdin_close_triggers_cleanup - Failed: Server process exited with code 1
======================================= 1 failed, 516 passed, 2 skipped, 1 xfailed in 19.65s =========================================> ERROR: A failure occurred in check().
    Aborting...
 -> error making: python-mcp-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
python-mcp - exit status 4

gwuensch commented on 2025-07-18 01:09 (UTC)

@techmanwalker to quote @envolution:

uninstall python-pytest-benchmark or makepkg with --nocheck

techmanwalker commented on 2025-07-17 21:05 (UTC)

==> Iniciando check()...
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python3.13/site-packages/_pytest/main.py", line 285, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>     ~~~~~~~~~~~~~~~~~~~~^^
INTERNALERROR>   File "/usr/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1119, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/usr/lib/python3.13/site-packages/pluggy/_hooks.py", line 534, in call_historic
INTERNALERROR>     res = self._hookexec(self.name, self._hookimpls.copy(), kwargs, False)
INTERNALERROR>   File "/usr/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>            ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/usr/lib/python3.13/site-packages/pluggy/_callers.py", line 167, in _multicall
INTERNALERROR>     raise exception
INTERNALERROR>   File "/usr/lib/python3.13/site-packages/pluggy/_callers.py", line 121, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/lib/python3.13/site-packages/pytest_benchmark/plugin.py", line 448, in pytest_configure
INTERNALERROR>     bs = config._benchmarksession = BenchmarkSession(config)
INTERNALERROR>                                     ~~~~~~~~~~~~~~~~^^^^^^^^
INTERNALERROR>   File "/usr/lib/python3.13/site-packages/pytest_benchmark/session.py", line 65, in __init__
INTERNALERROR>     self.logger.warn(
INTERNALERROR>     ~~~~~~~~~~~~~~~~^
INTERNALERROR>         "Benchmarks are automatically disabled because xdist plugin is active."
INTERNALERROR>         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>         "Benchmarks cannot be performed reliably in a parallelized environment.",
INTERNALERROR>         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>     )
INTERNALERROR>     ^
INTERNALERROR>   File "/usr/lib/python3.13/site-packages/pytest_benchmark/logger.py", line 46, in warn
INTERNALERROR>     warner(PytestBenchmarkWarning(text))
INTERNALERROR>     ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> pytest_benchmark.logger.PytestBenchmarkWarning: Benchmarks are automatically disabled because xdist plugin is active.Benchmarks cannot be performed reliably in a parallelized environment.
==> ERROR: Se produjo un fallo en check().
    Cancelando...
-> error compilando: python-mcp-exit status 4
-> Ha fallado al instalar los siguientes paquetes. Una intervención manual es requerida:
python-mcp - exit status 4