biz.dfch.SpecMgr

biz.dfch.SpecMgr

An artifact manager MCP server for system specifications, providing tools and resources to create, read, update, list, validate, and manage MADR 4.0.0-derived Architecture Decision Records (ADRs) stored as markdown files.

Category
访问服务器

README

biz.dfch.SpecMgr

<!-- mcp-name: io.github.dfch/biz-dfch-specmgr -->

License: AGPL v3 Python Lint and Test TestPyPI version PyPI version PyPI downloads MCP Registry

An artifact manager for system specifications.

This project is a library, a CLI, and an MCP server, all in one repository. The CLI and MCP server are optional — install only what you need via extras (see Installation).

Status: first domain feature shipped. Architecture Decision Record (ADR) management — creating, reading, and editing MADR 4.0.0-derived ADRs — is implemented end-to-end as MCP tools/resources (see MCP Server below and doc/adr-tool-plan.md for the full design). It is MCP-only so far: there is no specmgr adr ... CLI command yet, and no second document type beyond ADRs.

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

No ADR (or other domain) commands exist yet — only version and mcp (below). ADR management is currently MCP-only, see MCP Server.

specmgr version

MCP Server

Requires the mcp extra. In addition to the specmgr://version resource, the server exposes a full set of Architecture Decision Record (ADR) tools and resources, implementing the MADR 4.0.0-derived schema described in doc/adr-tool-plan.md:

Kind Name(s) Description
Resource specmgr://version Installed biz-dfch-specmgr package version
Resource specmgr://adr/list Id/title/status/filename of every ADR
Resource specmgr://adr/{id} Full ADR document (frontmatter + body) by id
Tool get_adr, create_adr, update_frontmatter, update_section, set_status, option_list, option_create, option_read, option_update, option_delete, validate_adr Structured create/read/update operations over one ADR, by id

ADRs live as .md files in a base directory (default docs/adr, configurable via the SPECMGR_ADR_DIR environment variable) — the file on disk is always the source of truth, re-read and re-parsed on every tool call, so hand-editing a file between calls is safe.

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:

  1. Open your OpenCode config file (typically ~/.config/opencode/opencode.json or ~/.config/opencode/opencode.jsonc)

  2. Add the following configuration to the mcp section (and use it via stdio):

"specmgr": {
  "type": "local",
  "enabled": true,
  "command": ["uvx", "--from", "biz-dfch-specmgr[mcp]", "python", "-m", "biz.dfch.specmgr", "mcp"]
}
  1. 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.

Also update both version fields in server.json (the top-level one and the one under packages[0]) to match — the MCP Registry manifest must stay in lockstep with pyproject.toml.

3. Commit and push to dev

git add pyproject.toml CHANGELOG.md server.json
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}

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.

Then switch back to dev to continue work:

git checkout dev

License

AGPL-3.0-or-later

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选