Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:1mcp app Agent Python Protocol Fixture

From Leeroopedia
Knowledge Sources
Domains Testing, Protocol_Conformance
Last Updated 2026-10-29 00:00 GMT

Overview

Python 3.12+ runtime with uv and mcp==2.2.0 — required for the Python peer fixture in the MCP protocol regression suite.

Description

The protocol regression suite tests cross-SDK interoperability between the 1MCP gateway and independent peer MCP server implementations. The Python peer fixture lives in `test/conformance/fixtures/python/` and is managed by `uv` with a frozen lockfile. It depends on `mcp==2.2.0` (the official Python MCP SDK) and `pytest==9.0.3` for its own tests. The `pyproject.toml` requires Python >= 3.12. The fixture driver (`driver.py`) implements the MCP server protocol for conformance testing scenarios.

Usage

Use this environment when running protocol regression tests that exercise the Python peer fixture. The suite is invoked via `pnpm test:protocol`, which calls `uv run --frozen pytest -q` in the fixture directory. This environment is not needed for ordinary `pnpm check` — it is a separate CI job (`test-protocol`).

System Requirements

Category Requirement Notes
OS Linux, macOS, or Windows CI runs on Ubuntu 24.04
Python >= 3.12 `pyproject.toml` `requires-python`; CI uses Python 3.13
uv any recent version sh`
Disk 100MB Python install + mcp package

Dependencies

System Packages

  • `uv` (Python package manager and runner)

Python Packages

  • `mcp` = 2.2.0 (MCP SDK peer)
  • `pytest` = 9.0.3 (dev dependency, for fixture self-tests)

Credentials

No credentials required. The Python fixture runs locally with isolated temporary configurations and subprocesses.

Quick Install

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Sync the Python fixture dependencies (frozen)
uv sync --frozen --project test/conformance/fixtures/python

# Run the Python fixture tests
uv run --frozen pytest -q --project test/conformance/fixtures/python

# Run the full protocol regression suite
pnpm test:protocol

Code Evidence

Python version requirement from `test/conformance/fixtures/python/pyproject.toml:4`:

requires-python = ">=3.12"
dependencies = ["mcp==2.2.0"]

Protocol suite invocation from `scripts/run-protocol.mjs:12`:

['uv', ['run', '--frozen', 'pytest', '-q'], path.join(fixtureRoot, 'python')],

Setup instructions from `docs/development/protocol-regressions.md:8`:

uv sync --frozen --project test/conformance/fixtures/python
pnpm test:protocol

Common Errors

Error Message Cause Solution
`uv: command not found` uv not installed sh`
`No solution found for mcp==2.2.0` Python version < 3.12 Ensure Python >= 3.12 is available; `uv python install 3.13`
`uv sync: lockfile out of date` === Lockfile mismatch === Run `uv sync` without `--frozen` to regenerate, or ensure correct branch

Compatibility Notes

  • Python 3.13: The CI workflow uses Python 3.13. The `pyproject.toml` allows >= 3.12 but the protocol regression docs recommend Python 3.13 with uv.
  • CI runner: The `static` CI job runs on `ubuntu-24.04` because Python 3.13.0 has no `setup-python` build for Ubuntu 26.04.
  • Independent lockfile: The Python fixture has its own frozen lockfile, independent from the main pnpm lockfile. Changes to one do not affect the other.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment