Skip to main content

mcp-swarm-core

Shared, zero-dependency (Python stdlib only) infrastructure for building parallel MCP CLI swarm servers such as codex-mcp-swarm and antigravity-mcp-swarm.

What it provides

  • MCP Protocol Engine (mcp_swarm_core.protocol)
    • Stateless MCP 2026-07-28 (server/discover, per-request _meta["io.modelcontextprotocol/protocolVersion"] and _meta["io.modelcontextprotocol/clientCapabilities"], resultType discriminators, -32022 unsupported-version rejection)
    • Official MCP Tasks extension (io.modelcontextprotocol/tasks, SEP-2663: CreateTaskResult, tasks/get, tasks/cancel, tool-level isError: true under status: "completed")
    • Backward-compatible stateful MCP (2024-11-05 through 2025-11-25: initialize, instructions, ping, tool annotations, outputSchema + structuredContent, enriched notifications/progress, silent unknown notifications per JSON-RPC 2.0 §4.1)
    • Multi-threaded stdio dispatcher with bounded request cancellation tracking and off-thread sync child termination
  • Cross-Platform Process & Tree Management (mcp_swarm_core.platform)
    • POSIX process-group isolation (start_new_session=True), group signalling (os.killpg), grandchild sweep, and Linux /proc PID-reuse + zombie detection
    • Native Windows Win32 ctypes process liveness, creation-time PID-reuse protection, taskkill.exe /T /F /PID process-tree termination, and CREATE_NO_WINDOW | CREATE_NEW_PROCESS_GROUP
    • Safe stdin payload transport (prompt_stdin): unlinked TemporaryFile on POSIX and regular .stdin files (no O_TEMPORARY) on Windows
  • Disk-Backed Task Store & Lifecycle (mcp_swarm_core.task_store)
    • Strictly lock-free POSIX SIGCHLD async reaper (no logging or locks inside the signal handler; safe against PID pop/resurrection races)
    • Atomic metadata persistence (mkstemp + os.replace with Windows retry)
    • Per-task finalization locking, automatic expiry cleanup, batch wait with client auto-backgrounding floor, and sync child tracking
  • Git Worktree Isolation (mcp_swarm_core.worktree)
    • Isolated HEAD-based git worktrees (<prefix>/<id>) with safe cleanup and branch deletion
  • Incremental Single-Pass JSONL Cache (mcp_swarm_core.jsonl_cache)
    • Parses growing task .stdout files incrementally for files above 8 KiB
    • RFC 8259 Unicode line-separator safety (split("\n"), never splitlines())
    • st_dev + st_ino != 0 + strict > shrink-race guards and isolated partial-tail state cloning
  • Shared Diagnostics & Schema Helpers (mcp_swarm_core.diagnostics)
    • Terminal-event precedence, conservative failure classification, structured failure formatting, live activity briefs, and JSON outputSchema builders

Requirements

  • Python 3.8+
  • Zero third-party dependencies (stdlib only)

License

MIT

Metadata

Release files for mcp-swarm-core 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-swarm-core 0.1.0
File Size Uploaded Provenance Actions
mcp_swarm_core-0.1.0.tar.gz 54.5 kB Without provenance Details for mcp_swarm_core-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-swarm-core 0.1.0
File Interpreter ABI Platform Actions
mcp_swarm_core-0.1.0-py3-none-any.whl Python 3 none any Details for mcp_swarm_core-0.1.0-py3-none-any.whl

Total release size: 103.2 kB

Release files / mcp_swarm_core-0.1.0.tar.gz

Download URL mcp_swarm_core-0.1.0.tar.gz
Size 54.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a79f21fb5ff4c904972ff16d0257f1efefb543c9dca0c6f2a0306d9c3944f414
BLAKE2b-256 checksum
How to use checksums
c87b70b60d65a42a5fa17bdd8a1942699d12d24e20a30cfb11cf67cb976d6078
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Release files / mcp_swarm_core-0.1.0-py3-none-any.whl

Download URL mcp_swarm_core-0.1.0-py3-none-any.whl
Size 48.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e10f94ab1479010db7ad0be1d0b21bd3cb85bad6a36c72fb5f361f26d9c592db
BLAKE2b-256 checksum
How to use checksums
ab7d6f873f9582a577450e67a226fcf966d993cfee3437e2d2aeeaa18df3db2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Security for mcp-swarm-core 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page