biz.dfch.SpecMgr
An artifact manager for system specifications.
This project is an MCP server that you can use to manage different specification artifacts.
At this time, we have these artifact:
- Architecture Decision Records (ADR)
- Use Case (UC)
- Requirement (REQ)
- Task List (TSK)
See MCP Server and docs/MCP.md for details.
The MCP server (and the management CLI) are optional. You install them as "extras" (see Installation).
Table of Contents
Installation
As a library only (no CLI, no MCP server):
pip install biz-dfch-specmgr
With the CLI:
pip install "biz-dfch-specmgr[cli]"
With the MCP server:
pip install "biz-dfch-specmgr[mcp]"
Or with uv:
uv add "biz-dfch-specmgr[cli,mcp]"
CLI Usage
With the CLI you can generate schema and documentation. We use these commands
in pre-commit hooks and ci.yml.
No domain document-management commands (create/update/status/etc.) exist
in the CLI yet — those are currently MCP-only, see
MCP Server. The CLI covers version, mcp (below), and a
handful of cross-cutting/doc-generation commands (specmgr --help for the
full list).
specmgr version
MCP Server
Requires the mcp extra. The server exposes resources, tools, and prompts
for document management, plus cross-cutting utilities (e.g. markdown
formatting).
The full, up-to-date list of every resource, resource template, tool, and
prompt — with parameters, MIME types, and descriptions — lives in
docs/MCP.md. That document generated from the live server
registration by specmgr mcp-docs and kept in sync by a pre-commit hook and
a CI check.
Environment Variables
Every document type stores its .md files in a base directory on disk —
the file is always the source of truth, re-read and re-parsed on every
tool call, so hand-editing a file between calls is safe.
- ADRs: base directory defaults to
docs/adr, configurable via theSPECMGR_ADR_DIRenvironment variable. This is ADR-specific and not shared with other document types. - Requirements (REQ) and future document types: share one root directory,
configurable via the
SPECMGR_DOCS_DIRenvironment variable (defaultdocs), with each type's own subdirectory appended automatically (e.g.docs/reqfor requirements). - The
webfetchtool (bearer-authenticated, URL-filtered HTTP GET, intended primarily for Web Server instances using PAT authentication) requires two environment variables:SPECMGR_WEBFETCH_BASE_URL(the base URL requested URLs must case-insensitively start with) andSPECMGR_WEBFETCH_BEARER(the bearer token sent as theAuthorizationheader). Both must be set or the tool raises an error; there are no defaults.
Start the MCP Server
Start the server with the mcp command:
specmgr mcp
By default it runs over stdio, for MCP hosts that launch it as a
subprocess (see Add to OpenCode below). It can also
run over SSE/network:
specmgr mcp --transport sse --host localhost --port 8000
| Option | Env var | Default | Description |
|---|---|---|---|
--transport / -t |
SPECMGR_MCP_TRANSPORT |
stdio |
Transport mode: stdio or sse |
--host / -h |
SPECMGR_MCP_HOST |
localhost |
Bind address (SSE mode only) |
--port / -p |
SPECMGR_MCP_PORT |
8000 |
TCP port (SSE mode only) |
Add to OpenCode
To add the specmgr MCP server to your OpenCode configuration:
-
Open your OpenCode config file (typically
~/.config/opencode/opencode.jsonor~/.config/opencode/opencode.jsonc) -
Add the following configuration to the
mcpsection (and use it viastdio):
"specmgr": {
"type": "local",
"enabled": true,
"command": [
"uvx",
"--from",
"biz-dfch-specmgr[mcp]",
"specmgr",
"mcp"
]
}
- Save the file and restart OpenCode
Development
Install dev dependencies
uv sync --all-extras
Run linters
uv run --frozen ruff format --check
uv run --frozen ruff check
uv run --frozen pylint $(git ls-files '*.py')
Run tests
uv run --frozen python -m unittest discover -v -s tests -t . -p "test_*.py"
Make a Release
1. Make sure all tests pass
Before releasing, make sure the CI pipeline is green on the dev branch:
uv run --frozen ruff format --check
uv run --frozen ruff check
uv run --frozen pylint $(git ls-files '*.py')
uv run --frozen python -m unittest discover -v -s tests -t . -p "test_*.py"
2. Increase the version
Update the version in pyproject.toml:
version = "x.y.z"
Move the [Unreleased] section in CHANGELOG.md into a new dated
## [x.y.z] - YYYY-MM-DD section.
3. Commit and push to dev
git add pyproject.toml CHANGELOG.md
git commit -m "chore: bump version to vx.y.z"
git push origin dev
4. Merge dev into main
git checkout main
git merge dev
git push origin main
5. Create and push a version tag
export VERSION=x.y.z
git tag v${VERSION}
git push origin v${VERSION}
git checkout dev
Note: .github/workflows/publish.yml handles the rest of the release
automatically once the tag above is pushed — it builds and publishes the
sdist/wheel to TestPyPI then PyPI via Trusted Publishing (OIDC, no
stored token), creates the matching GitHub Release with the built
artifacts attached, and publishes server.json (repo root, the MCP
Registry publisher manifest — see the
server.json format spec)
to the MCP Registry
via mcp-publisher/GitHub OIDC. biz-dfch-specmgr is live on
PyPI and in the
MCP Registry
as of v0.1.0.
License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file biz_dfch_specmgr-0.7.0.tar.gz.
File metadata
- Download URL: biz_dfch_specmgr-0.7.0.tar.gz
- Upload date:
- Size: 257.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85255e9f84d629e753c25aaaa27d6f682e6d35b34d9bc02ccf6e9edb75d9aba0
|
|
| MD5 |
8efdf4209d61a9217a8f82147c8984a4
|
|
| BLAKE2b-256 |
d7efe200007ba87e121caa8576a10770f5c25f7016480197fedb054f407de254
|
Provenance
The following attestation bundles were made for biz_dfch_specmgr-0.7.0.tar.gz:
Publisher:
publish.yml on dfch/biz.dfch.SpecMgr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
biz_dfch_specmgr-0.7.0.tar.gz -
Subject digest:
85255e9f84d629e753c25aaaa27d6f682e6d35b34d9bc02ccf6e9edb75d9aba0 - Sigstore transparency entry: 2508135035
- Sigstore integration time:
-
Permalink:
dfch/biz.dfch.SpecMgr@ec047675c2c98df9a3b6988ffae64c468dc3d4aa -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/dfch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec047675c2c98df9a3b6988ffae64c468dc3d4aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file biz_dfch_specmgr-0.7.0-py3-none-any.whl.
File metadata
- Download URL: biz_dfch_specmgr-0.7.0-py3-none-any.whl
- Upload date:
- Size: 476.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77da7d9cb10188913d7d54f29262c832d24299f4019b0e187232282c2d50ba87
|
|
| MD5 |
38bd96770b7a20fb4327641d65bf656f
|
|
| BLAKE2b-256 |
d7b7c27228f91d0e8601dcf1b4476d74b91c19d50c6ca6a7e828f5394ba2c0f1
|
Provenance
The following attestation bundles were made for biz_dfch_specmgr-0.7.0-py3-none-any.whl:
Publisher:
publish.yml on dfch/biz.dfch.SpecMgr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
biz_dfch_specmgr-0.7.0-py3-none-any.whl -
Subject digest:
77da7d9cb10188913d7d54f29262c832d24299f4019b0e187232282c2d50ba87 - Sigstore transparency entry: 2508135062
- Sigstore integration time:
-
Permalink:
dfch/biz.dfch.SpecMgr@ec047675c2c98df9a3b6988ffae64c468dc3d4aa -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/dfch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec047675c2c98df9a3b6988ffae64c468dc3d4aa -
Trigger Event:
push
-
Statement type: