fd-workspace-mcp
Collaborative dev workspace primitives: a shared fact tree on one authoritative disk plus POSIX-atomic claim/lease so multiple devices, agents, and sessions can work on one project without stepping on each other.
Stdlib-only core. CLI + optional MCP surface. See openspec/changes/collab-dev-workspace/ for the spec this implements.
Why
Storing a claim in a shared DB is heavy; syncing copies across devices loses updates. The reliable primitive is a local filesystem mkdir on one authoritative host: whoever's mkdir wins, period. The claim always executes on the host (locally, or via ssh <host> fd-workspace ...), so it stays correct even when participants are remote and network-FS locks can't be trusted.
CLI
fd-workspace --root /srv/workspace --owner me claim feature-x # exit 0 acquired / 1 denied
fd-workspace --root /srv/workspace --owner me renew feature-x # heartbeat
fd-workspace --root /srv/workspace --owner me release feature-x
fd-workspace --root /srv/workspace status feature-x # running | stalled | dead | released
fd-workspace --root /srv/workspace sweep # reclaim expired
fd-workspace --root /srv/workspace list
Defaults come from FD_WORKSPACE_ROOT / FD_WORKSPACE_OWNER. The same logic runs over ssh, so a remote agent claims on the host's own disk.
Lease model
- Claim = atomic
mkdir <root>/.claims/<unit>/; heartbeat = atouched file; TTL lets a dead holder be taken over. - Tunables (
FD_WORKSPACE_HEARTBEAT30s,FD_WORKSPACE_LEASE_TTL300s,FD_WORKSPACE_STALL_AFTER120s); TTL must exceed heartbeat. - States:
running/stalled(no renew, still leased) /dead(expired, takeable) /released.
MCP
pip install 'fd-workspace-mcp[mcp]' then fd-workspace-mcp (env: FD_WORKSPACE_ROOT, FD_WORKSPACE_OWNER). Tools: claim, renew, release, status, sweep. Without the SDK, use the CLI.
Test
python3 tests/test_claims.py # 6 self-checks, no pytest needed
Metadata
Release files for fd-workspace-mcp 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 |
|---|---|---|---|---|
| fd_workspace_mcp-0.1.0.tar.gz | 7.1 kB | Without provenance | Details for fd_workspace_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fd_workspace_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for fd_workspace_mcp-0.1.0-py3-none-any.whl |
Total release size: 14.7 kB
Release files / fd_workspace_mcp-0.1.0.tar.gz
| Download URL | fd_workspace_mcp-0.1.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8930a7fe626182b8ce6e2ae670fd675653d55aee43226ddaf9ec6291104e1585
|
|
BLAKE2b-256 checksum How to use checksums |
428c41558f04326a0fae01f937327dccebae1521a481ca9457beb02be06c5298
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / fd_workspace_mcp-0.1.0-py3-none-any.whl
| Download URL | fd_workspace_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea71099ec2f4b677f8f1ffaec0f0337865054d7908f2944265265568c790d995
|
|
BLAKE2b-256 checksum How to use checksums |
e1f31d4e573a404474582ff83fd5d01866734f6fc448dfea61391fa3bb1a3cae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Security for fd-workspace-mcp 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.