Skip to content

Commit fd5800f

Browse files
docs(miner): add MCP client config example combining gittensory-mcp and gittensory-miner-mcp (#5416)
Adds a copy-pasteable mcpServers JSON snippet to the miner README's MCP server section showing how a dual-role operator running both ORB and AMS can register both stdio servers in one client config, plus a doc-lint test asserting the snippet stays valid JSON with the correct server shapes. Closes #5163
1 parent b7d3308 commit fd5800f

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

packages/gittensory-miner/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,27 @@ It exposes these read-only tools:
153153

154154
This completes the read-only AMS MCP tool surface (status, portfolio, claims, event-ledger, governor-ledger, run-state, plan-store).
155155

156+
### Client config
157+
158+
`gittensory-mcp` (ORB's hosted contributor-workflow tools) and `gittensory-miner-mcp` (AMS's own local state-visibility tools above) can run as two separate stdio servers in the same MCP client session — useful for a dual-role operator running both ORB and AMS on the same box. Generate ORB's half with `gittensory-mcp init-client --print claude` (see the [`@jsonbored/gittensory-mcp` README](../gittensory-mcp/README.md#client-config)); `gittensory-miner-mcp` takes no flags, so its entry is just the bin name. Combined, a Claude Desktop / Claude Code style config looks like:
159+
160+
```json
161+
{
162+
"mcpServers": {
163+
"gittensory": {
164+
"command": "gittensory-mcp",
165+
"args": ["--stdio"]
166+
},
167+
"gittensory-miner": {
168+
"command": "gittensory-miner-mcp",
169+
"args": []
170+
}
171+
}
172+
}
173+
```
174+
175+
`gittensory` exposes ORB's hosted contributor-workflow tools (issue ranking, PR packet prep, decision packs). `gittensory-miner` exposes AMS's own local state-visibility tools listed above (portfolio dashboard, claims, audit feed, run state, plans) — a fully separate, 100% local tool surface with no shared code or network calls between the two.
176+
156177
## Version check
157178

158179
On every invocation the CLI starts an async npm registry lookup (5s timeout). When the installed package is behind `@jsonbored/gittensory-miner@latest`, it prints a one-line upgrade command to stderr without blocking or failing the requested command. Set `GITTENSORY_NPM_REGISTRY_URL` to point at a mirror, same as `@jsonbored/gittensory-mcp`.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { readFileSync } from "node:fs";
2+
import { join } from "node:path";
3+
import { describe, expect, it } from "vitest";
4+
5+
const README_PATH = join(process.cwd(), "packages/gittensory-miner/README.md");
6+
const MCP_README_PATH = join(process.cwd(), "packages/gittensory-mcp/README.md");
7+
8+
/** Pulls the first ```json fenced block out of a markdown doc. Throws if none is found, so a doc edit that
9+
* accidentally drops the fence (rather than its content) fails loudly instead of silently skipping. */
10+
function extractFirstJsonBlock(markdown: string): string {
11+
const match = markdown.match(/```json\r?\n([\s\S]*?)\r?\n```/);
12+
if (!match || match[1] === undefined) throw new Error("No ```json fenced block found in the given markdown.");
13+
return match[1];
14+
}
15+
16+
describe("miner MCP client config example (#5163)", () => {
17+
it("documents running gittensory-mcp and gittensory-miner-mcp together", () => {
18+
const readme = readFileSync(README_PATH, "utf8");
19+
expect(readme).toContain("### Client config");
20+
expect(readme).toContain("gittensory-mcp init-client --print claude");
21+
// Explains what each server is for, not just how to wire it up.
22+
expect(readme).toContain("contributor-workflow tools");
23+
expect(readme).toContain("state-visibility tools");
24+
});
25+
26+
it("ships a copy-pasteable, valid mcpServers JSON snippet registering both servers", () => {
27+
const readme = readFileSync(README_PATH, "utf8");
28+
const config = JSON.parse(extractFirstJsonBlock(readme));
29+
30+
expect(config.mcpServers.gittensory).toEqual({
31+
command: "gittensory-mcp",
32+
args: ["--stdio"],
33+
});
34+
expect(config.mcpServers["gittensory-miner"]).toEqual({
35+
command: "gittensory-miner-mcp",
36+
args: [],
37+
});
38+
});
39+
40+
it("cross-references the ORB MCP README's own Client config section", () => {
41+
const readme = readFileSync(README_PATH, "utf8");
42+
expect(readme).toContain("../gittensory-mcp/README.md#client-config");
43+
44+
const mcpReadme = readFileSync(MCP_README_PATH, "utf8");
45+
expect(mcpReadme).toContain("### Client config");
46+
});
47+
});

0 commit comments

Comments
 (0)