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"],resultTypediscriminators,-32022unsupported-version rejection) - Official MCP Tasks extension (
io.modelcontextprotocol/tasks, SEP-2663:CreateTaskResult,tasks/get,tasks/cancel, tool-levelisError: trueunderstatus: "completed") - Backward-compatible stateful MCP (
2024-11-05through2025-11-25:initialize,instructions,ping, toolannotations,outputSchema+structuredContent, enrichednotifications/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
- Stateless MCP
- 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/procPID-reuse + zombie detection - Native Windows Win32
ctypesprocess liveness, creation-time PID-reuse protection,taskkill.exe /T /F /PIDprocess-tree termination, andCREATE_NO_WINDOW | CREATE_NEW_PROCESS_GROUP - Safe stdin payload transport (
prompt_stdin): unlinkedTemporaryFileon POSIX and regular.stdinfiles (noO_TEMPORARY) on Windows
- POSIX process-group isolation (
- Disk-Backed Task Store & Lifecycle (
mcp_swarm_core.task_store)- Strictly lock-free POSIX
SIGCHLDasync reaper (no logging or locks inside the signal handler; safe against PID pop/resurrection races) - Atomic metadata persistence (
mkstemp+os.replacewith Windows retry) - Per-task finalization locking, automatic expiry cleanup, batch wait with client auto-backgrounding floor, and sync child tracking
- Strictly lock-free POSIX
- Git Worktree Isolation (
mcp_swarm_core.worktree)- Isolated
HEAD-based git worktrees (<prefix>/<id>) with safe cleanup and branch deletion
- Isolated
- Incremental Single-Pass JSONL Cache (
mcp_swarm_core.jsonl_cache)- Parses growing task
.stdoutfiles incrementally for files above 8 KiB - RFC 8259 Unicode line-separator safety (
split("\n"), neversplitlines()) st_dev+st_ino != 0+ strict>shrink-race guards and isolated partial-tail state cloning
- Parses growing task
- Shared Diagnostics & Schema Helpers (
mcp_swarm_core.diagnostics)- Terminal-event precedence, conservative failure classification, structured failure formatting, live activity briefs, and JSON
outputSchemabuilders
- Terminal-event precedence, conservative failure classification, structured failure formatting, live activity briefs, and JSON
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)
| 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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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.