@aigentdocs/mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +23 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +11 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/server.d.ts +2 -0
- package/dist/src/server.js +188 -0
- package/dist/src/server.js.map +1 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rodrigo-amc and AIGenticDocs contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# @aigentdocs/mcp
|
|
2
|
+
|
|
3
|
+
MCP server for the [AIGentDocs](https://github.com/rodrigo-amc/AIGentDocs) docs-as-code standard: exposes the standard's operations as tools for **any MCP-capable AI agent** (Claude Code, Codex, Antigravity, Copilot, JetBrains, ...).
|
|
4
|
+
|
|
5
|
+
| Tool | What it does |
|
|
6
|
+
|---|---|
|
|
7
|
+
| `get_project_status` | Aggregate module states/coverage/debt (authoritative record) |
|
|
8
|
+
| `get_active_task` | The board's `[In Progress]` items (or the next one up) |
|
|
9
|
+
| `get_module` | Full content of one domain module |
|
|
10
|
+
| `start_session` | Loads a documentation session's context + write scope |
|
|
11
|
+
| `start_correction_session` | Loads a Correction Record; approved Impact Map = write scope |
|
|
12
|
+
| `update_module_state` | Syncs a module's state across the machine-owned places |
|
|
13
|
+
| `validate_docs` | Runs the deterministic lint |
|
|
14
|
+
|
|
15
|
+
## Setup
|
|
16
|
+
|
|
17
|
+
Run from the root of a repository documented with AIGentDocs. For example, with Claude Code:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
claude mcp add aigentdocs -- npx -y @aigentdocs/mcp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Other clients: configure a stdio server with command `npx`, args `-y @aigentdocs/mcp` and the project root as working directory (or pass `--root <path>` / set `AIGENTDOCS_ROOT`).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
+
import { buildServer } from "./server.js";
|
|
4
|
+
// The documented repository root: --root <path>, AIGENTDOCS_ROOT, or the cwd
|
|
5
|
+
// (MCP clients normally launch servers with cwd = the project root).
|
|
6
|
+
const rootFlag = process.argv.indexOf("--root");
|
|
7
|
+
const repoRoot = rootFlag !== -1 && process.argv[rootFlag + 1] !== undefined
|
|
8
|
+
? process.argv[rootFlag + 1]
|
|
9
|
+
: (process.env["AIGENTDOCS_ROOT"] ?? process.cwd());
|
|
10
|
+
await buildServer(repoRoot).connect(new StdioServerTransport());
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,6EAA6E;AAC7E,qEAAqE;AACrE,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAChD,MAAM,QAAQ,GACZ,QAAQ,KAAK,CAAC,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,KAAK,SAAS;IACzD,CAAC,CAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAY;IACxC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;AAExD,MAAM,WAAW,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { STATES, lintProject, loadProject, parseTaskBoard, updateModuleState, } from "@aigentdocs/core";
|
|
6
|
+
/**
|
|
7
|
+
* The AIGentDocs MCP server (Layer 3): exposes the standard's operations as
|
|
8
|
+
* tools for any MCP-capable agent. All domain logic lives in
|
|
9
|
+
* @aigentdocs/core; this layer only declares tools and serializes results.
|
|
10
|
+
*
|
|
11
|
+
* Reference spec: the routing table "question type -> document to read".
|
|
12
|
+
*/
|
|
13
|
+
const text = (value) => ({
|
|
14
|
+
content: [{ type: "text", text: typeof value === "string" ? value : JSON.stringify(value, null, 2) }],
|
|
15
|
+
});
|
|
16
|
+
const fail = (message) => ({
|
|
17
|
+
content: [{ type: "text", text: message }],
|
|
18
|
+
isError: true,
|
|
19
|
+
});
|
|
20
|
+
/** Session type -> the files that define its context, relative to docs/standard/. */
|
|
21
|
+
const SESSION_FILES = {
|
|
22
|
+
"01_product": {
|
|
23
|
+
files: ["agent_product.md", "guide_product.md"],
|
|
24
|
+
writeScope: "docs/project/01_product/ strategic documents only (vision.md, roadmap.md, quality_attributes.md)",
|
|
25
|
+
},
|
|
26
|
+
"01_product_domain_modules": {
|
|
27
|
+
files: ["agent_product.md", "guide_domain_modules.md"],
|
|
28
|
+
writeScope: "exactly one module file in docs/project/01_product/domain_modules/",
|
|
29
|
+
},
|
|
30
|
+
"02_architecture": {
|
|
31
|
+
files: ["agent_architecture.md", "guide_architecture.md"],
|
|
32
|
+
writeScope: "docs/project/02_architecture/ only",
|
|
33
|
+
},
|
|
34
|
+
"03_engineering": {
|
|
35
|
+
files: ["agent_engineering.md", "guide_engineering.md"],
|
|
36
|
+
writeScope: "docs/project/03_engineering/ only",
|
|
37
|
+
},
|
|
38
|
+
"04_adrs": {
|
|
39
|
+
files: ["agent_adrs.md", "guide_adrs.md"],
|
|
40
|
+
writeScope: "one new ADR in docs/project/04_adrs/, plus ADR Propagation into docs/project/03_engineering/ when it applies",
|
|
41
|
+
},
|
|
42
|
+
"05_corrections": {
|
|
43
|
+
files: ["agent_corrections.md", "guide_corrections.md"],
|
|
44
|
+
writeScope: "the Correction Record, then exactly the documents listed in its approved Impact Map",
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
export function buildServer(repoRoot) {
|
|
48
|
+
const server = new McpServer({ name: "aigentdocs", version: "0.1.0" });
|
|
49
|
+
server.registerTool("get_project_status", {
|
|
50
|
+
description: "Aggregate state of the documented project: module states, coverage, and known debt from project_status.yaml (the authoritative record), or a per-document overview for Lite projects.",
|
|
51
|
+
inputSchema: {},
|
|
52
|
+
}, async () => {
|
|
53
|
+
try {
|
|
54
|
+
const model = await loadProject(repoRoot);
|
|
55
|
+
if (model.projectStatus?.data !== undefined) {
|
|
56
|
+
return text(model.projectStatus.data);
|
|
57
|
+
}
|
|
58
|
+
const documents = model.documents.map((doc) => ({
|
|
59
|
+
path: doc.relPath,
|
|
60
|
+
type: doc.frontmatter?.["type"] ?? null,
|
|
61
|
+
state: doc.frontmatter?.["state"] ?? null,
|
|
62
|
+
}));
|
|
63
|
+
return text({ note: "no project_status.yaml (Lite profile?) — per-document overview instead", documents });
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
return fail(error instanceof Error ? error.message : String(error));
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
server.registerTool("get_active_task", {
|
|
70
|
+
description: "The task to work on right now: the [In Progress] items of the roadmap board, falling back to the top of [To Do / Next]. Includes the current phase.",
|
|
71
|
+
inputSchema: {},
|
|
72
|
+
}, async () => {
|
|
73
|
+
try {
|
|
74
|
+
const model = await loadProject(repoRoot);
|
|
75
|
+
const roadmap = model.documents.find((doc) => doc.frontmatter?.["type"] === "roadmap");
|
|
76
|
+
if (roadmap === undefined) {
|
|
77
|
+
return fail("no roadmap document found under docs/project/");
|
|
78
|
+
}
|
|
79
|
+
const sections = parseTaskBoard(roadmap.content);
|
|
80
|
+
const inProgress = sections.find((s) => /in progress/i.test(s.name))?.items ?? [];
|
|
81
|
+
const next = sections.find((s) => /to do|next/i.test(s.name))?.items ?? [];
|
|
82
|
+
return text({
|
|
83
|
+
phase: roadmap.frontmatter?.["current_phase"] ?? null,
|
|
84
|
+
active: inProgress,
|
|
85
|
+
next_up: inProgress.length === 0 ? next.slice(0, 1) : [],
|
|
86
|
+
note: "Per the standard: at most 1-2 items in [In Progress]; if empty, take the top of [To Do / Next].",
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
return fail(error instanceof Error ? error.message : String(error));
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
server.registerTool("get_module", {
|
|
94
|
+
description: "Full content (frontmatter + body) of one domain module, by module name or file basename.",
|
|
95
|
+
inputSchema: { name: z.string().describe("Module name, e.g. 'clients'") },
|
|
96
|
+
}, async ({ name }) => {
|
|
97
|
+
try {
|
|
98
|
+
const model = await loadProject(repoRoot);
|
|
99
|
+
const moduleDoc = model.documents.find((doc) => doc.frontmatter?.["type"] === "domain_module" &&
|
|
100
|
+
(doc.frontmatter?.["module_name"] === name || path.posix.basename(doc.relPath, ".md") === name));
|
|
101
|
+
if (moduleDoc === undefined) {
|
|
102
|
+
const available = model.documents
|
|
103
|
+
.filter((doc) => doc.frontmatter?.["type"] === "domain_module")
|
|
104
|
+
.map((doc) => path.posix.basename(doc.relPath, ".md"));
|
|
105
|
+
return fail(`no domain module '${name}'. Available: ${available.join(", ") || "(none)"}`);
|
|
106
|
+
}
|
|
107
|
+
return text(moduleDoc.content);
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
return fail(error instanceof Error ? error.message : String(error));
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
server.registerTool("start_session", {
|
|
114
|
+
description: "Load the operating context for a documentation session of the standard: the agent profile and guide that govern it, plus the session's write scope. Read docs/standard/AGENT.md first if you haven't.",
|
|
115
|
+
inputSchema: {
|
|
116
|
+
type: z.enum(Object.keys(SESSION_FILES)).describe("Session type"),
|
|
117
|
+
},
|
|
118
|
+
}, async ({ type }) => {
|
|
119
|
+
try {
|
|
120
|
+
const session = SESSION_FILES[type];
|
|
121
|
+
if (session === undefined) {
|
|
122
|
+
return fail(`unknown session type '${type}'`);
|
|
123
|
+
}
|
|
124
|
+
const parts = [
|
|
125
|
+
`# Session: ${type}`,
|
|
126
|
+
`WRITE SCOPE: ${session.writeScope}`,
|
|
127
|
+
"Global rules: docs/standard/AGENT.md (Session Guard, Anti-Drift Protocol, Operational Patterns).",
|
|
128
|
+
];
|
|
129
|
+
for (const file of session.files) {
|
|
130
|
+
const content = await readFile(path.join(repoRoot, "docs", "standard", file), "utf8");
|
|
131
|
+
parts.push(`\n---\n# docs/standard/${file}\n\n${content}`);
|
|
132
|
+
}
|
|
133
|
+
return text(parts.join("\n"));
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
return fail(error instanceof Error ? error.message : String(error));
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
server.registerTool("start_correction_session", {
|
|
140
|
+
description: "Load a Correction Record for a 05_corrections session. Only an approved record's Impact Map authorizes writes; a proposed record means impact analysis is still read-only.",
|
|
141
|
+
inputSchema: { id: z.number().int().describe("Correction Record id (frontmatter 'id')") },
|
|
142
|
+
}, async ({ id }) => {
|
|
143
|
+
try {
|
|
144
|
+
const model = await loadProject(repoRoot);
|
|
145
|
+
const record = model.documents.find((doc) => doc.frontmatter?.["type"] === "correction" && doc.frontmatter?.["id"] === id);
|
|
146
|
+
if (record === undefined) {
|
|
147
|
+
return fail(`no Correction Record with id ${id} under docs/project/05_corrections/`);
|
|
148
|
+
}
|
|
149
|
+
const status = String(record.frontmatter?.["status"]);
|
|
150
|
+
const scopeNote = status === "approved"
|
|
151
|
+
? "Status approved: the Impact Map below IS your write scope — nothing outside it."
|
|
152
|
+
: status === "applied"
|
|
153
|
+
? "Status applied: this correction is already done; do not modify it."
|
|
154
|
+
: `Status ${status}: read-only — analyze impact and/or wait for human approval before touching any document.`;
|
|
155
|
+
return text(`# Correction Record ${id} (${record.relPath})\n${scopeNote}\nProtocol: docs/standard/agent_corrections.md.\n\n---\n${record.content}`);
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
return fail(error instanceof Error ? error.message : String(error));
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
server.registerTool("update_module_state", {
|
|
162
|
+
description: "Update a domain module's state in the machine-owned places — project_status.yaml (authoritative) and the module's frontmatter — keeping them in sync per the Anti-Drift Protocol. Moving the board item remains your job.",
|
|
163
|
+
inputSchema: {
|
|
164
|
+
module: z.string().describe("Module name"),
|
|
165
|
+
state: z.enum(STATES).describe("New state"),
|
|
166
|
+
},
|
|
167
|
+
}, async ({ module, state }) => {
|
|
168
|
+
try {
|
|
169
|
+
return text(await updateModuleState(repoRoot, module, state));
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
return fail(error instanceof Error ? error.message : String(error));
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
server.registerTool("validate_docs", {
|
|
176
|
+
description: "Run the deterministic documentation lint (the Mechanical layer of AGENT_REVIEW.md). Returns findings with severities; an empty list means compliant.",
|
|
177
|
+
inputSchema: {},
|
|
178
|
+
}, async () => {
|
|
179
|
+
try {
|
|
180
|
+
return text(await lintProject(repoRoot));
|
|
181
|
+
}
|
|
182
|
+
catch (error) {
|
|
183
|
+
return fail(error instanceof Error ? error.message : String(error));
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
return server;
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,cAAc,EACd,iBAAiB,GAElB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;GAMG;AAEH,MAAM,IAAI,GAAG,CAAC,KAAc,EAAsD,EAAE,CAAC,CAAC;IACpF,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,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AC,WAAW,CAAC;SAC5C;KACF,EACD,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;QAC1B,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,MAAM,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAc,CAAC,CAAC,CAAC;QACzE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACtE,CAAC;IACH,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,eAAe,EACf;QACE,WAAW,EACT,sJAAsJ;QACxJ,WAAW,EAAE,EAAE;KAChB,EACD,KAAK,IAAI,EAAE;QACT,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,MAAM,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACtE,CAAC;IACH,CAAC,CACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aigentdocs/mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server for the AIGentDocs docs-as-code standard: exposes the standard's operations as tools for any MCP-capable AI agent.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/rodrigo-amc/AIGentDocs#readme",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/rodrigo-amc/AIGentDocs.git",
|
|
10
|
+
"directory": "packages/mcp"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"mcp",
|
|
14
|
+
"model-context-protocol",
|
|
15
|
+
"documentation",
|
|
16
|
+
"docs-as-code",
|
|
17
|
+
"ai-agents"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"bin": {
|
|
21
|
+
"aigentdocs-mcp": "dist/src/index.js"
|
|
22
|
+
},
|
|
23
|
+
"main": "dist/src/server.js",
|
|
24
|
+
"types": "dist/src/server.d.ts",
|
|
25
|
+
"files": [
|
|
26
|
+
"dist/src"
|
|
27
|
+
],
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=20"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@aigentdocs/core": "0.1.1",
|
|
36
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
37
|
+
"zod": "^3.25.0"
|
|
38
|
+
}
|
|
39
|
+
}
|