@context-forge/mcp 0.6.1 → 0.6.4
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/dist/index.js +14 -8
- package/dist/index.js.map +1 -1
- package/dist/tools/agentGuideTool.d.ts +3 -0
- package/dist/tools/agentGuideTool.d.ts.map +1 -0
- package/dist/tools/agentGuideTool.js +83 -0
- package/dist/tools/agentGuideTool.js.map +1 -0
- package/dist/tools/agentOnboardTool.d.ts +3 -0
- package/dist/tools/agentOnboardTool.d.ts.map +1 -0
- package/dist/tools/agentOnboardTool.js +89 -0
- package/dist/tools/agentOnboardTool.js.map +1 -0
- package/dist/tools/configTools.d.ts.map +1 -1
- package/dist/tools/configTools.js +15 -34
- package/dist/tools/configTools.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -13,6 +13,8 @@ import { registerWorkflowTools } from './tools/workflowTools.js';
|
|
|
13
13
|
import { registerWorktreeTools } from './tools/worktreeTools.js';
|
|
14
14
|
import { registerVersionTool } from './tools/versionTool.js';
|
|
15
15
|
import { registerGuideTools } from './tools/guideTools.js';
|
|
16
|
+
import { registerAgentGuideTool } from './tools/agentGuideTool.js';
|
|
17
|
+
import { registerAgentOnboardTool } from './tools/agentOnboardTool.js';
|
|
16
18
|
const require = createRequire(import.meta.url);
|
|
17
19
|
const { version: SERVER_VERSION } = require('../package.json');
|
|
18
20
|
const SERVER_NAME = 'context-forge-mcp';
|
|
@@ -24,14 +26,18 @@ async function main() {
|
|
|
24
26
|
name: SERVER_NAME,
|
|
25
27
|
version: SERVER_VERSION,
|
|
26
28
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
registerWorkflowTools(server);
|
|
33
|
-
|
|
34
|
-
registerGuideTools(server);
|
|
29
|
+
// Registration order matters — some MCP clients truncate tool lists.
|
|
30
|
+
// High-priority tools first to maximize usability on limited clients.
|
|
31
|
+
registerAgentGuideTool(server); // orientation for agents
|
|
32
|
+
registerAgentOnboardTool(server); // onboarding recipe for new projects
|
|
33
|
+
registerProjectTools(server); // core: list, get, create, update
|
|
34
|
+
registerWorkflowTools(server); // what to do next
|
|
35
|
+
registerContextTools(server); // build prompts
|
|
36
|
+
registerGuideTools(server); // install/check guides
|
|
37
|
+
registerIntrospectionTools(server); // read project artifacts
|
|
38
|
+
registerWorktreeTools(server); // parallel work
|
|
39
|
+
registerConfigTools(server); // rarely needed
|
|
40
|
+
registerStateTools(server); // backup
|
|
35
41
|
registerVersionTool(server, SERVER_NAME, SERVER_VERSION);
|
|
36
42
|
const transport = new StdioServerTransport();
|
|
37
43
|
await server.connect(transport);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,qEAAqE;AACrE,2CAA2C;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index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ources":["../../src/tools/agentGuideTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA2EpE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAc9D"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
const AGENT_GUIDE = `# Context Forge — Agent Guide
|
|
2
|
+
|
|
3
|
+
Context Forge manages AI-assisted development projects through structured phases:
|
|
4
|
+
Concept → Architecture → Slice Planning → Slice Design → Task Breakdown → Implementation
|
|
5
|
+
|
|
6
|
+
Call this tool first to understand what's available and how to use it.
|
|
7
|
+
|
|
8
|
+
## Quick Start
|
|
9
|
+
|
|
10
|
+
- **New user / no project yet?** Call **agent_onboard** — it returns step-by-step instructions to create a project and start working.
|
|
11
|
+
- **Existing project?** Follow this sequence:
|
|
12
|
+
|
|
13
|
+
1. **project_list** — See all registered projects. Find the one matching the user's current directory.
|
|
14
|
+
2. **project_get** — Get full details for a project (phase, active slice, task file, etc.).
|
|
15
|
+
3. **workflow_next** — Get the recommended next action with rationale and suggested command.
|
|
16
|
+
4. **context_build** — Generate a structured context prompt for the current project state.
|
|
17
|
+
|
|
18
|
+
## Tool Categories
|
|
19
|
+
|
|
20
|
+
### Project (start here)
|
|
21
|
+
- **project_list** — List all projects (use to find project by path)
|
|
22
|
+
- **project_get** — Full project details with introspection
|
|
23
|
+
- **project_create** — Create a new project (name + path required)
|
|
24
|
+
- **project_update** — Update project fields
|
|
25
|
+
- **project_schema** — Show all available project fields and valid values
|
|
26
|
+
- **project_structure** — Show project directory structure
|
|
27
|
+
|
|
28
|
+
### Workflow (what to do next)
|
|
29
|
+
- **workflow_next** — Recommended next action based on project state
|
|
30
|
+
- **workflow_status** — Current phase, slice, and task progress
|
|
31
|
+
- **workflow_check** — Run consistency checks on project artifacts
|
|
32
|
+
- **workflow_future** — Consolidated future work across slice plans
|
|
33
|
+
|
|
34
|
+
### Context (build prompts)
|
|
35
|
+
- **context_build** — Assemble a full context prompt for an AI session
|
|
36
|
+
- **context_summarize** — Summarize project context
|
|
37
|
+
- **template_preview** — Preview a prompt template with variables
|
|
38
|
+
- **prompt_list** — List available prompt templates
|
|
39
|
+
- **prompt_get** — Get a specific prompt template
|
|
40
|
+
|
|
41
|
+
### Introspection (read project artifacts)
|
|
42
|
+
- **introspection_documents** — Detect documents for a slice index
|
|
43
|
+
- **introspection_frontmatter** — Parse YAML frontmatter from a document
|
|
44
|
+
- **introspection_slice_plan** — Parse a slice plan file
|
|
45
|
+
- **introspection_tasks** — Parse task files with completion state
|
|
46
|
+
- **introspection_future_work** — Future work items across plans
|
|
47
|
+
|
|
48
|
+
### Guides
|
|
49
|
+
- **guide_status** — Check if the AI project guide is installed
|
|
50
|
+
- **guide_install** — Install the methodology guide
|
|
51
|
+
- **guide_update** — Update to latest guide version
|
|
52
|
+
|
|
53
|
+
### Worktrees (parallel work in git worktrees)
|
|
54
|
+
- **worktree_list**, **worktree_get**, **worktree_init**, **worktree_update**, **worktree_rm**
|
|
55
|
+
|
|
56
|
+
### Configuration
|
|
57
|
+
- **config_get** — Get a single config key, or omit key to list all settings (rarely needed)
|
|
58
|
+
- **config_set** — Set a config value at user or project scope
|
|
59
|
+
|
|
60
|
+
### Meta
|
|
61
|
+
- **agent_onboard** — Step-by-step onboarding recipe for new projects
|
|
62
|
+
- **server_version** — Server name and version
|
|
63
|
+
- **storage_backup** — Create a versioned backup of project data
|
|
64
|
+
|
|
65
|
+
## Common Mistakes
|
|
66
|
+
|
|
67
|
+
- Do NOT start with config_get — configuration is rarely relevant to the user's task.
|
|
68
|
+
- Do NOT call project_update without the user asking to change something.
|
|
69
|
+
- Do NOT guess project IDs — call project_list first to find the right one.
|
|
70
|
+
- If the user says "what's next" or "what should I do", call workflow_next.
|
|
71
|
+
- If the user wants to start a session, call context_build for a full context prompt.
|
|
72
|
+
`;
|
|
73
|
+
export function registerAgentGuideTool(server) {
|
|
74
|
+
server.registerTool('agent_guide', {
|
|
75
|
+
title: 'Agent Guide',
|
|
76
|
+
description: 'How to use Context Forge tools. Call this first to understand available tools, common workflows, and what to avoid.',
|
|
77
|
+
inputSchema: {},
|
|
78
|
+
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
79
|
+
}, async () => ({
|
|
80
|
+
content: [{ type: 'text', text: AGENT_GUIDE }],
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=agentGuideTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentGuideTool.js","sourceRoot":"","sources":["../../src/tools/agentGuideTool.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuEnB,CAAC;AAEF,MAAM,UAAU,sBAAsB,CAAC,MAAiB;IACtD,MAAM,CAAC,YAAY,CACjB,aAAa,EACb;QACE,KAAK,EAAE,aAAa;QACpB,WAAW,EACT,qHAAqH;QACvH,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;KAC1D,EACD,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;KACxD,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentOnboardTool.d.ts","sourceRoot":"","sources":["../../src/tools/agentOnboardTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAqEpE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA0BhE"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const ONBOARD_GUIDE = `# Context Forge Onboarding
|
|
3
|
+
|
|
4
|
+
Follow these steps in order to set up a new Context Forge project and guide the
|
|
5
|
+
user into their first phase of work. Skip any step whose precondition is already met.
|
|
6
|
+
|
|
7
|
+
## Step 1 — Detect existing project
|
|
8
|
+
|
|
9
|
+
Check whether a Context Forge project is already registered at the current
|
|
10
|
+
working directory.
|
|
11
|
+
|
|
12
|
+
Call \`project_list\`. Scan results for a project whose \`projectPath\` matches
|
|
13
|
+
the current directory.
|
|
14
|
+
|
|
15
|
+
- If a project exists at this path → skip to Step 3.
|
|
16
|
+
- If no project exists → continue to Step 2.
|
|
17
|
+
|
|
18
|
+
## Step 2 — Create project
|
|
19
|
+
|
|
20
|
+
Before creating the project, ensure git is initialized in the current directory.
|
|
21
|
+
If there is no \`.git\` directory, let the user know they need to run \`git init\` first.
|
|
22
|
+
|
|
23
|
+
Call \`project_create\` with:
|
|
24
|
+
- \`name\`: Use the project name argument if provided, or the current directory
|
|
25
|
+
name, or ask the user what they'd like to call their project.
|
|
26
|
+
- \`projectPath\`: The current working directory (absolute path).
|
|
27
|
+
- \`developmentPhase\`: "Phase 1: Concept" (default — no need to specify).
|
|
28
|
+
|
|
29
|
+
Confirm to the user: "Project created: {name}."
|
|
30
|
+
|
|
31
|
+
## Step 3 — Check and install guides
|
|
32
|
+
|
|
33
|
+
Verify the AI Project Guide is installed, and install it if missing.
|
|
34
|
+
|
|
35
|
+
Call \`guide_status\`.
|
|
36
|
+
- If \`installed: true\` → skip installation.
|
|
37
|
+
- If \`installed: false\` → call \`guide_install\`.
|
|
38
|
+
|
|
39
|
+
Do not draw attention to this step unless installation fails. It's infrastructure
|
|
40
|
+
the user doesn't need to think about.
|
|
41
|
+
|
|
42
|
+
## Step 4 — Transition to concept discussion
|
|
43
|
+
|
|
44
|
+
The project is set up. Now begin the Phase 1 (Concept) conversation.
|
|
45
|
+
|
|
46
|
+
Call \`context_build\` to generate the concept-phase context prompt. Use the
|
|
47
|
+
returned prompt as your working context to guide the conversation.
|
|
48
|
+
|
|
49
|
+
Begin by asking the user to describe what they want to build. Guide them through
|
|
50
|
+
the concept exploration naturally — the context prompt provides the structure.
|
|
51
|
+
The goal is a concept document at the end of this conversation.
|
|
52
|
+
|
|
53
|
+
## Step 5 — Mention ongoing guidance
|
|
54
|
+
|
|
55
|
+
After the concept conversation concludes (or if the user wants to pause),
|
|
56
|
+
mention that \`workflow_next\` (or \`cf next\` on the CLI) provides ongoing
|
|
57
|
+
guidance that adapts as the project progresses.
|
|
58
|
+
|
|
59
|
+
## Notes
|
|
60
|
+
|
|
61
|
+
- If the user already has a project but is in a later phase (not Phase 1),
|
|
62
|
+
acknowledge this and call \`workflow_next\` instead of starting a concept
|
|
63
|
+
discussion.
|
|
64
|
+
- Keep the conversation natural. This is onboarding, not a checklist.
|
|
65
|
+
Adapt to what the user is telling you.
|
|
66
|
+
`;
|
|
67
|
+
export function registerAgentOnboardTool(server) {
|
|
68
|
+
server.registerTool('agent_onboard', {
|
|
69
|
+
title: 'Onboard New Project',
|
|
70
|
+
description: 'Step-by-step instructions for setting up a new Context Forge project and guiding the user into their first phase of work. ' +
|
|
71
|
+
'Returns an onboarding recipe the agent should follow. Optionally accepts a project name.',
|
|
72
|
+
inputSchema: {
|
|
73
|
+
projectName: z
|
|
74
|
+
.string()
|
|
75
|
+
.optional()
|
|
76
|
+
.describe('Optional project name. If omitted, the agent should use the directory name or ask the user.'),
|
|
77
|
+
},
|
|
78
|
+
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
79
|
+
}, async ({ projectName }) => {
|
|
80
|
+
let text = ONBOARD_GUIDE;
|
|
81
|
+
if (projectName) {
|
|
82
|
+
text += `\n**Project name provided:** ${projectName}\n`;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
content: [{ type: 'text', text }],
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=agentOnboardTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentOnboardTool.js","sourceRoot":"","sources":["../../src/tools/agentOnboardTool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgErB,CAAC;AAEF,MAAM,UAAU,wBAAwB,CAAC,MAAiB;IACxD,MAAM,CAAC,YAAY,CACjB,eAAe,EACf;QACE,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EACT,4HAA4H;YAC5H,0FAA0F;QAC5F,WAAW,EAAE;YACX,WAAW,EAAE,CAAC;iBACX,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,6FAA6F,CAAC;SAC3G;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;KAC1D,EACD,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;QACxB,IAAI,IAAI,GAAG,aAAa,CAAC;QACzB,IAAI,WAAW,EAAE,CAAC;YAChB,IAAI,IAAI,gCAAgC,WAAW,IAAI,CAAC;QAC1D,CAAC;QACD,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,CAAC;SAC3C,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configTools.d.ts","sourceRoot":"","sources":["../../src/tools/configTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKpE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"configTools.d.ts","sourceRoot":"","sources":["../../src/tools/configTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKpE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA6E3D"}
|
|
@@ -5,11 +5,11 @@ export function registerConfigTools(server) {
|
|
|
5
5
|
// --- config_get ---
|
|
6
6
|
server.registerTool('config_get', {
|
|
7
7
|
title: 'Get Config Value',
|
|
8
|
-
description: 'Get
|
|
9
|
-
'
|
|
8
|
+
description: 'Get configuration. With a key, returns that key\'s value, source, and description. ' +
|
|
9
|
+
'Without a key, returns all keys with current values, sources, and defaults. ' +
|
|
10
10
|
'Resolution order: project config → user config → built-in default.',
|
|
11
11
|
inputSchema: {
|
|
12
|
-
key: z.string().describe('Config key to retrieve (e.g. "default_project", "guide.source")'),
|
|
12
|
+
key: z.string().optional().describe('Config key to retrieve (e.g. "default_project", "guide.source"). Omit to list all keys.'),
|
|
13
13
|
projectPath: z
|
|
14
14
|
.string()
|
|
15
15
|
.optional()
|
|
@@ -19,8 +19,18 @@ export function registerConfigTools(server) {
|
|
|
19
19
|
}, async ({ key, projectPath }) => {
|
|
20
20
|
try {
|
|
21
21
|
const cm = new ConfigManager(projectPath);
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
if (key) {
|
|
23
|
+
const result = await cm.get(key);
|
|
24
|
+
return jsonResult(result);
|
|
25
|
+
}
|
|
26
|
+
const entries = await cm.list();
|
|
27
|
+
return jsonResult({
|
|
28
|
+
entries,
|
|
29
|
+
configPaths: {
|
|
30
|
+
user: getUserConfigPath(),
|
|
31
|
+
project: projectPath ? getProjectConfigPath(projectPath) : null,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
24
34
|
}
|
|
25
35
|
catch (error) {
|
|
26
36
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -58,34 +68,5 @@ export function registerConfigTools(server) {
|
|
|
58
68
|
return errorResult(message);
|
|
59
69
|
}
|
|
60
70
|
});
|
|
61
|
-
// --- config_list ---
|
|
62
|
-
server.registerTool('config_list', {
|
|
63
|
-
title: 'List Config Values',
|
|
64
|
-
description: 'List all known configuration keys with their current values, sources, types, and defaults. ' +
|
|
65
|
-
'Useful for inspecting the current configuration state.',
|
|
66
|
-
inputSchema: {
|
|
67
|
-
projectPath: z
|
|
68
|
-
.string()
|
|
69
|
-
.optional()
|
|
70
|
-
.describe('Absolute path to project root, to include project-level config in resolution'),
|
|
71
|
-
},
|
|
72
|
-
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
73
|
-
}, async ({ projectPath }) => {
|
|
74
|
-
try {
|
|
75
|
-
const cm = new ConfigManager(projectPath);
|
|
76
|
-
const entries = await cm.list();
|
|
77
|
-
return jsonResult({
|
|
78
|
-
entries,
|
|
79
|
-
configPaths: {
|
|
80
|
-
user: getUserConfigPath(),
|
|
81
|
-
project: projectPath ? getProjectConfigPath(projectPath) : null,
|
|
82
|
-
},
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
catch (error) {
|
|
86
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
87
|
-
return errorResult(message);
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
71
|
}
|
|
91
72
|
//# sourceMappingURL=configTools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configTools.js","sourceRoot":"","sources":["../../src/tools/configTools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,UAAU,mBAAmB,CAAC,MAAiB;IACnD,qBAAqB;IACrB,MAAM,CAAC,YAAY,CACjB,YAAY,EACZ;QACE,KAAK,EAAE,kBAAkB;QACzB,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"configTools.js","sourceRoot":"","sources":["../../src/tools/configTools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;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AC,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;QAClD,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC,CACF,CAAC;AAEJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@context-forge/mcp",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"description": "MCP server for Context Forge — generates structured AI context prompts from project configuration and templates",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
36
36
|
"zod": "^4.1.5",
|
|
37
|
-
"@context-forge/core": "0.6.
|
|
37
|
+
"@context-forge/core": "0.6.4"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^25.3.0",
|