返回 last30days-skill
README.md
根目录 / mcp / README.md
1 # last30days-pp-mcp
2
3 Go MCP server that wraps the last30days Python engine for Claude Desktop. Packaged as a `.mcpb` bundle (drag-drop install into Claude Desktop).
4
5 The MCP server exposes a single `research` tool that mirrors the `/last30days <topic>` slash command available in Claude Code. At runtime the binary extracts the vendored Python engine into a per-user cache and shells out to `python3` to produce the synthesis input Claude renders.
6
7 ## Architecture
8
9 - `cmd/last30days-pp-mcp/` - server entry point
10 - `internal/engine/` - `embed.FS` of the Python engine + cache extractor + subprocess wrapper
11 - `internal/tools/` - MCP tool handlers (currently `research`)
12 - `internal/engine/vendored/` - mirror of `skills/last30days/scripts/`, generated by `scripts/sync-engine.sh` (gitignored). Lives inside the engine package because `//go:embed` cannot reach files outside its own package directory.
13 - `manifest.json` - MCPB v0.3 manifest consumed by Claude Desktop and `printing-press bundle`
14
15 ## Local build
16
17 ```bash
18 # Mirror the Python engine into vendored/.
19 bash scripts/sync-engine.sh
20
21 # Build for the current host.
22 go build -ldflags "-X main.Version=dev" -o build/last30days-pp-mcp ./cmd/last30days-pp-mcp
23
24 # Package as a .mcpb (requires the printing-press binary on PATH).
25 printing-press bundle . --skip-build --binary build/last30days-pp-mcp
26 ```
27
28 The output `.mcpb` lands at `build/last30days-pp-mcp-<os>-<arch>.mcpb`. Drag it into Claude Desktop's Extensions panel to install.
29
30 ## Runtime requirements
31
32 End users need Python 3.12+ on PATH. The bundle ships the engine source but relies on the host interpreter.
33
34 ## Versioning
35
36 The MCPB `manifest.json` version is hand-bumped in the same PR that ships engine changes worth releasing. Release CI stamps the Go binary's `main.Version` from the tag.
37
37 lines MARKDOWN