project-mcp 1.4.2 → 3.0.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/README.md +9 -9
- package/package.json +77 -77
- package/src/prompts/definitions.js +45 -9
- package/src/prompts/index.js +28 -10
package/README.md
CHANGED
|
@@ -218,25 +218,25 @@ Implement OAuth 2.0 authentication flow...
|
|
|
218
218
|
│ 1. promote_task(task_id: "AUTH-001") │
|
|
219
219
|
│ → Creates todos/AUTH-001.md from BACKLOG.md │
|
|
220
220
|
└─────────────────────┬───────────────────────────────────────┘
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
│
|
|
222
|
+
▼
|
|
223
223
|
┌─────────────────────────────────────────────────────────────┐
|
|
224
224
|
│ 2. get_next_task() │
|
|
225
225
|
│ → Returns AUTH-001 (dependencies met, highest priority) │
|
|
226
226
|
└─────────────────────┬───────────────────────────────────────┘
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
│
|
|
228
|
+
▼
|
|
229
229
|
┌─────────────────────────────────────────────────────────────┐
|
|
230
230
|
│ 3. update_task(id: "AUTH-001", status: "in_progress") │
|
|
231
231
|
│ → Agent works on the task │
|
|
232
232
|
└─────────────────────┬───────────────────────────────────────┘
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
│
|
|
234
|
+
▼
|
|
235
235
|
┌─────────────────────────────────────────────────────────────┐
|
|
236
236
|
│ 4. update_task(id: "AUTH-001", status: "done") │
|
|
237
237
|
└─────────────────────┬───────────────────────────────────────┘
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
│
|
|
239
|
+
▼
|
|
240
240
|
┌─────────────────────────────────────────────────────────────┐
|
|
241
241
|
│ 5. archive_task(task_id: "AUTH-001") │
|
|
242
242
|
│ → Moves to archive/, keeps todos/ small │
|
|
@@ -404,7 +404,7 @@ Returns tasks sorted by priority where all dependencies are complete.
|
|
|
404
404
|
"arguments": {
|
|
405
405
|
"project_name": "My App",
|
|
406
406
|
"project_description": "A web application for task management"
|
|
407
|
-
|
|
407
|
+
}
|
|
408
408
|
}
|
|
409
409
|
```
|
|
410
410
|
|
package/package.json
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
"version": "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
2
|
+
"name": "project-mcp",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Intent-based MCP server for project documentation search. Maps natural language queries to the right sources automatically—no configuration needed. The standard for AI agent documentation search.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"project-mcp": "src/index.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"start": "node src/index.js",
|
|
12
|
+
"test": "node --test test/*.test.js",
|
|
13
|
+
"lint": "node --check src/index.js",
|
|
14
|
+
"format": "prettier --write \"**/*.{js,md,json}\"",
|
|
15
|
+
"format:check": "prettier --check \"**/*.{js,md,json}\"",
|
|
16
|
+
"prepublishOnly": "npm run lint && npm test"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"mcp",
|
|
20
|
+
"model-context-protocol",
|
|
21
|
+
"mcp-server",
|
|
22
|
+
"documentation",
|
|
23
|
+
"documentation-search",
|
|
24
|
+
"docs-search",
|
|
25
|
+
"search",
|
|
26
|
+
"fuzzy-search",
|
|
27
|
+
"semantic-search",
|
|
28
|
+
"markdown",
|
|
29
|
+
"markdown-search",
|
|
30
|
+
"project-documentation",
|
|
31
|
+
"project-management",
|
|
32
|
+
"intent-based-search",
|
|
33
|
+
"intent-mapping",
|
|
34
|
+
"ai-agent",
|
|
35
|
+
"ai-assistant",
|
|
36
|
+
"claude",
|
|
37
|
+
"cursor",
|
|
38
|
+
"anthropic",
|
|
39
|
+
"ai-tools",
|
|
40
|
+
"developer-tools",
|
|
41
|
+
"documentation-tools",
|
|
42
|
+
"knowledge-base",
|
|
43
|
+
"project-knowledge",
|
|
44
|
+
"operational-truth",
|
|
45
|
+
"reference-documentation",
|
|
46
|
+
"fuse.js",
|
|
47
|
+
"natural-language",
|
|
48
|
+
"nlp",
|
|
49
|
+
"zero-config",
|
|
50
|
+
"automatic-indexing"
|
|
51
|
+
],
|
|
52
|
+
"author": "",
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "git+https://github.com/pouyanafisi/project-mcp.git"
|
|
57
|
+
},
|
|
58
|
+
"bugs": {
|
|
59
|
+
"url": "https://github.com/pouyanafisi/project-mcp/issues"
|
|
60
|
+
},
|
|
61
|
+
"homepage": "https://github.com/pouyanafisi/project-mcp#readme",
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">=18.0.0"
|
|
64
|
+
},
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
67
|
+
"fuse.js": "^7.0.0",
|
|
68
|
+
"gray-matter": "^4.0.3",
|
|
69
|
+
"mime-types": "^2.1.35"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"prettier": "^3.7.4"
|
|
73
|
+
},
|
|
74
|
+
"files": [
|
|
75
|
+
"src/",
|
|
76
|
+
"README.md",
|
|
77
|
+
"LICENSE"
|
|
78
|
+
]
|
|
79
79
|
}
|
|
@@ -1,21 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Prompt definitions for the MCP server.
|
|
3
3
|
* These prompts help agents discover and use tools appropriately.
|
|
4
|
+
*
|
|
5
|
+
* NAMING CONVENTION: Use snake_case matching tool names where there's a 1:1 mapping.
|
|
6
|
+
* For multi-tool prompts, use descriptive snake_case names.
|
|
4
7
|
*/
|
|
5
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Mapping of prompts to the tools they invoke.
|
|
11
|
+
* Used for validation and documentation.
|
|
12
|
+
* @type {Record<string, string[]>}
|
|
13
|
+
*/
|
|
14
|
+
export const promptToolMapping = {
|
|
15
|
+
project_overview: ['check_project_state', 'search_project', 'list_tasks'],
|
|
16
|
+
get_next_task: ['get_next_task'],
|
|
17
|
+
init_project: ['init_project'],
|
|
18
|
+
import_tasks: ['import_tasks'],
|
|
19
|
+
promote_task: ['promote_task', 'update_task'],
|
|
20
|
+
lint_project: ['lint_project_docs'],
|
|
21
|
+
list_tasks: ['list_tasks'],
|
|
22
|
+
update_task: ['update_task'],
|
|
23
|
+
};
|
|
24
|
+
|
|
6
25
|
/**
|
|
7
26
|
* All available prompts
|
|
8
27
|
* @type {Array<{name: string, description: string, arguments: Array}>}
|
|
9
28
|
*/
|
|
10
29
|
export const prompts = [
|
|
11
30
|
{
|
|
12
|
-
name: '
|
|
31
|
+
name: 'project_overview',
|
|
13
32
|
description:
|
|
14
33
|
'Get an overview of the project, its status, and what work is in progress. Use when user asks "tell me about this project", "what is this project", "project status", or "what\'s going on".',
|
|
15
34
|
arguments: [],
|
|
16
35
|
},
|
|
17
36
|
{
|
|
18
|
-
name: '
|
|
37
|
+
name: 'get_next_task',
|
|
19
38
|
description:
|
|
20
39
|
'Find the next task to work on based on priorities and dependencies. Use when user asks "what should I do", "what\'s next", "what to work on", or "next task".',
|
|
21
40
|
arguments: [
|
|
@@ -27,7 +46,7 @@ export const prompts = [
|
|
|
27
46
|
],
|
|
28
47
|
},
|
|
29
48
|
{
|
|
30
|
-
name: '
|
|
49
|
+
name: 'init_project',
|
|
31
50
|
description:
|
|
32
51
|
'Initialize a new project with standard documentation structure. Use when user says "start a project", "new project", "initialize project", or "set up project docs".',
|
|
33
52
|
arguments: [
|
|
@@ -44,9 +63,9 @@ export const prompts = [
|
|
|
44
63
|
],
|
|
45
64
|
},
|
|
46
65
|
{
|
|
47
|
-
name: '
|
|
66
|
+
name: 'import_tasks',
|
|
48
67
|
description:
|
|
49
|
-
'Import tasks from a roadmap or plan document into
|
|
68
|
+
'Import tasks from a roadmap or plan document into BACKLOG.md. Use when user says "import tasks", "add tasks from roadmap", "populate backlog", or "convert plan to tasks".',
|
|
50
69
|
arguments: [
|
|
51
70
|
{
|
|
52
71
|
name: 'source_file',
|
|
@@ -61,7 +80,7 @@ export const prompts = [
|
|
|
61
80
|
],
|
|
62
81
|
},
|
|
63
82
|
{
|
|
64
|
-
name: '
|
|
83
|
+
name: 'promote_task',
|
|
65
84
|
description:
|
|
66
85
|
'Promote a task from backlog to active work. Use when user says "start task", "work on X", "begin task", or "activate task".',
|
|
67
86
|
arguments: [
|
|
@@ -73,7 +92,7 @@ export const prompts = [
|
|
|
73
92
|
],
|
|
74
93
|
},
|
|
75
94
|
{
|
|
76
|
-
name: '
|
|
95
|
+
name: 'lint_project',
|
|
77
96
|
description:
|
|
78
97
|
'Validate project documentation and check for issues. Use when user says "lint project", "check project files", "validate docs", or "project health check".',
|
|
79
98
|
arguments: [
|
|
@@ -85,7 +104,7 @@ export const prompts = [
|
|
|
85
104
|
],
|
|
86
105
|
},
|
|
87
106
|
{
|
|
88
|
-
name: '
|
|
107
|
+
name: 'list_tasks',
|
|
89
108
|
description:
|
|
90
109
|
'Show all tasks with their status. Use when user asks "show tasks", "list todos", "what tasks exist", or "task list".',
|
|
91
110
|
arguments: [
|
|
@@ -97,7 +116,7 @@ export const prompts = [
|
|
|
97
116
|
],
|
|
98
117
|
},
|
|
99
118
|
{
|
|
100
|
-
name: '
|
|
119
|
+
name: 'update_task',
|
|
101
120
|
description:
|
|
102
121
|
'Update the status of a task. Use when user says "mark task done", "complete task", "task is blocked", or "start task".',
|
|
103
122
|
arguments: [
|
|
@@ -114,3 +133,20 @@ export const prompts = [
|
|
|
114
133
|
],
|
|
115
134
|
},
|
|
116
135
|
];
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Get all prompt names
|
|
139
|
+
* @returns {string[]}
|
|
140
|
+
*/
|
|
141
|
+
export function getPromptNames() {
|
|
142
|
+
return prompts.map((p) => p.name);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Get tools used by a prompt
|
|
147
|
+
* @param {string} promptName
|
|
148
|
+
* @returns {string[]}
|
|
149
|
+
*/
|
|
150
|
+
export function getToolsForPrompt(promptName) {
|
|
151
|
+
return promptToolMapping[promptName] || [];
|
|
152
|
+
}
|
package/src/prompts/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
ListPromptsRequestSchema,
|
|
7
7
|
GetPromptRequestSchema,
|
|
8
8
|
} from '@modelcontextprotocol/sdk/types.js';
|
|
9
|
-
import { prompts } from './definitions.js';
|
|
9
|
+
import { prompts, promptToolMapping } from './definitions.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Generate messages for a prompt that guide the agent to use the right tools
|
|
@@ -16,7 +16,7 @@ import { prompts } from './definitions.js';
|
|
|
16
16
|
*/
|
|
17
17
|
function generatePromptMessages(promptName, args) {
|
|
18
18
|
const messages = {
|
|
19
|
-
|
|
19
|
+
project_overview: [
|
|
20
20
|
{
|
|
21
21
|
role: 'user',
|
|
22
22
|
content: {
|
|
@@ -29,7 +29,7 @@ function generatePromptMessages(promptName, args) {
|
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
31
|
],
|
|
32
|
-
|
|
32
|
+
get_next_task: [
|
|
33
33
|
{
|
|
34
34
|
role: 'user',
|
|
35
35
|
content: {
|
|
@@ -45,7 +45,7 @@ Then explain what the task involves and any context from the project.`,
|
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
47
|
],
|
|
48
|
-
|
|
48
|
+
init_project: [
|
|
49
49
|
{
|
|
50
50
|
role: 'user',
|
|
51
51
|
content: {
|
|
@@ -65,7 +65,7 @@ This will create the standard .project/ structure with:
|
|
|
65
65
|
},
|
|
66
66
|
},
|
|
67
67
|
],
|
|
68
|
-
|
|
68
|
+
import_tasks: [
|
|
69
69
|
{
|
|
70
70
|
role: 'user',
|
|
71
71
|
content: {
|
|
@@ -82,7 +82,7 @@ Tasks will be added to BACKLOG.md, not as individual files.`,
|
|
|
82
82
|
},
|
|
83
83
|
},
|
|
84
84
|
],
|
|
85
|
-
|
|
85
|
+
promote_task: [
|
|
86
86
|
{
|
|
87
87
|
role: 'user',
|
|
88
88
|
content: {
|
|
@@ -97,7 +97,7 @@ Then use \`update_task\` to set status to "in_progress".`,
|
|
|
97
97
|
},
|
|
98
98
|
},
|
|
99
99
|
],
|
|
100
|
-
|
|
100
|
+
lint_project: [
|
|
101
101
|
{
|
|
102
102
|
role: 'user',
|
|
103
103
|
content: {
|
|
@@ -117,7 +117,7 @@ This validates:
|
|
|
117
117
|
},
|
|
118
118
|
},
|
|
119
119
|
],
|
|
120
|
-
|
|
120
|
+
list_tasks: [
|
|
121
121
|
{
|
|
122
122
|
role: 'user',
|
|
123
123
|
content: {
|
|
@@ -130,7 +130,7 @@ This shows tasks organized by status with counts and a summary dashboard.`,
|
|
|
130
130
|
},
|
|
131
131
|
},
|
|
132
132
|
],
|
|
133
|
-
|
|
133
|
+
update_task: [
|
|
134
134
|
{
|
|
135
135
|
role: 'user',
|
|
136
136
|
content: {
|
|
@@ -160,6 +160,24 @@ Valid statuses: todo, in_progress, blocked, review, done`,
|
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Get all message handler keys (for testing)
|
|
165
|
+
* @returns {string[]}
|
|
166
|
+
*/
|
|
167
|
+
export function getMessageHandlerKeys() {
|
|
168
|
+
const messages = {
|
|
169
|
+
project_overview: true,
|
|
170
|
+
get_next_task: true,
|
|
171
|
+
init_project: true,
|
|
172
|
+
import_tasks: true,
|
|
173
|
+
promote_task: true,
|
|
174
|
+
lint_project: true,
|
|
175
|
+
list_tasks: true,
|
|
176
|
+
update_task: true,
|
|
177
|
+
};
|
|
178
|
+
return Object.keys(messages);
|
|
179
|
+
}
|
|
180
|
+
|
|
163
181
|
/**
|
|
164
182
|
* Setup prompt handlers on the server
|
|
165
183
|
* @param {Server} server - MCP server instance
|
|
@@ -189,4 +207,4 @@ export function setupPrompts(server) {
|
|
|
189
207
|
});
|
|
190
208
|
}
|
|
191
209
|
|
|
192
|
-
export { prompts };
|
|
210
|
+
export { prompts, promptToolMapping };
|