@nooriel/mcp-bridge 1.0.0 → 1.0.1
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/package.json +3 -2
- package/server.mjs +15 -39
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nooriel/mcp-bridge",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "MCP bridge for Nooriel — connects coding agents (Codex, Claude Code, Cursor, Windsurf, Kiro) to Nooriel's Build Instruction Pack via MCP protocol.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"nooriel-mcp": "./server.mjs"
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"directory": "mcp-bridge"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@modelcontextprotocol/sdk": "^1.12.0"
|
|
32
|
+
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
33
|
+
"zod": "^3.23.0"
|
|
33
34
|
},
|
|
34
35
|
"engines": {
|
|
35
36
|
"node": ">=18"
|
package/server.mjs
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Nooriel MCP Bridge
|
|
4
|
+
* Nooriel MCP Bridge v1.0.1
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* bridge via stdio, and it fetches data from Nooriel's backend.
|
|
6
|
+
* Connects coding agents (Windsurf, Claude Code, Codex, Cursor, Kiro)
|
|
7
|
+
* to Nooriel's Build Instruction Pack via MCP protocol.
|
|
9
8
|
*
|
|
10
9
|
* Usage:
|
|
11
|
-
* NOORIEL_API_BASE=https://... NOORIEL_TOKEN=xxx
|
|
12
|
-
*
|
|
13
|
-
* Or via npx (once published):
|
|
14
|
-
* npx @nooriel/mcp-bridge
|
|
10
|
+
* NOORIEL_API_BASE="https://..." NOORIEL_TOKEN="xxx" npx @nooriel/mcp-bridge
|
|
15
11
|
*/
|
|
16
12
|
|
|
17
13
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
18
14
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
15
|
+
import { z } from "zod";
|
|
19
16
|
|
|
20
17
|
const API_BASE = process.env.NOORIEL_API_BASE || "";
|
|
21
18
|
const TOKEN = process.env.NOORIEL_TOKEN || "";
|
|
@@ -24,9 +21,7 @@ if (!API_BASE || !TOKEN) {
|
|
|
24
21
|
console.error(
|
|
25
22
|
"Missing env vars. Set NOORIEL_API_BASE and NOORIEL_TOKEN.\n" +
|
|
26
23
|
"Example:\n" +
|
|
27
|
-
' NOORIEL_API_BASE="https
|
|
28
|
-
' NOORIEL_TOKEN="your_mcp_token" \\\n' +
|
|
29
|
-
" node server.mjs"
|
|
24
|
+
' NOORIEL_API_BASE="https://..." NOORIEL_TOKEN="xxx" npx @nooriel/mcp-bridge'
|
|
30
25
|
);
|
|
31
26
|
process.exit(1);
|
|
32
27
|
}
|
|
@@ -43,17 +38,16 @@ async function apiFetch(path) {
|
|
|
43
38
|
return res.json();
|
|
44
39
|
}
|
|
45
40
|
|
|
46
|
-
// Create MCP server
|
|
47
41
|
const server = new McpServer({
|
|
48
42
|
name: "nooriel",
|
|
49
|
-
version: "1.0.
|
|
43
|
+
version: "1.0.1",
|
|
50
44
|
});
|
|
51
45
|
|
|
52
46
|
// ── Tools ──────────────────────────────────────────────
|
|
53
47
|
|
|
54
48
|
server.tool(
|
|
55
49
|
"get_build_pack",
|
|
56
|
-
"Get the Build Instruction Pack — list of all 13 instruction files
|
|
50
|
+
"Get the Build Instruction Pack — list of all 13 instruction files. Call this first.",
|
|
57
51
|
{},
|
|
58
52
|
async () => {
|
|
59
53
|
const data = await apiFetch("/build-pack");
|
|
@@ -64,9 +58,7 @@ server.tool(
|
|
|
64
58
|
server.tool(
|
|
65
59
|
"get_build_pack_file",
|
|
66
60
|
"Get a single instruction file by filename (e.g., '00-MASTER-PROMPT.md')",
|
|
67
|
-
{
|
|
68
|
-
filename: { type: "string", description: "Filename from the pack (e.g., '00-MASTER-PROMPT.md')" },
|
|
69
|
-
},
|
|
61
|
+
{ filename: z.string().describe("Filename from the pack (e.g., '00-MASTER-PROMPT.md')") },
|
|
70
62
|
async ({ filename }) => {
|
|
71
63
|
const data = await apiFetch(`/build-pack/files/${encodeURIComponent(filename)}`);
|
|
72
64
|
return { content: [{ type: "text", text: data.content || JSON.stringify(data) }] };
|
|
@@ -79,7 +71,6 @@ server.tool(
|
|
|
79
71
|
{},
|
|
80
72
|
async () => {
|
|
81
73
|
const data = await apiFetch("/build-pack/all");
|
|
82
|
-
// Format as readable text with file separators
|
|
83
74
|
let text = `# Build Instruction Pack: ${data.project_name}\n\n`;
|
|
84
75
|
for (const [name, content] of Object.entries(data.files || {})) {
|
|
85
76
|
text += `\n---\n## ${name}\n\n${content}\n`;
|
|
@@ -100,10 +91,10 @@ server.tool(
|
|
|
100
91
|
|
|
101
92
|
server.tool(
|
|
102
93
|
"report_progress",
|
|
103
|
-
"Report build progress to the founder. Call
|
|
94
|
+
"Report build progress to the founder. Call periodically.",
|
|
104
95
|
{
|
|
105
|
-
current_task:
|
|
106
|
-
files_created:
|
|
96
|
+
current_task: z.string().describe("What you're currently working on"),
|
|
97
|
+
files_created: z.string().optional().describe("Comma-separated list of files created"),
|
|
107
98
|
},
|
|
108
99
|
async ({ current_task, files_created }) => {
|
|
109
100
|
const res = await fetch(`${API_BASE}/build-pack/progress`, {
|
|
@@ -118,10 +109,10 @@ server.tool(
|
|
|
118
109
|
|
|
119
110
|
server.tool(
|
|
120
111
|
"report_complete",
|
|
121
|
-
"Signal that the build is complete.
|
|
112
|
+
"Signal that the build is complete.",
|
|
122
113
|
{
|
|
123
|
-
summary:
|
|
124
|
-
commit_sha:
|
|
114
|
+
summary: z.string().optional().describe("Brief summary of what was built"),
|
|
115
|
+
commit_sha: z.string().optional().describe("Git commit SHA if pushed"),
|
|
125
116
|
},
|
|
126
117
|
async ({ summary, commit_sha }) => {
|
|
127
118
|
const res = await fetch(`${API_BASE}/build-pack/complete`, {
|
|
@@ -134,21 +125,6 @@ server.tool(
|
|
|
134
125
|
}
|
|
135
126
|
);
|
|
136
127
|
|
|
137
|
-
// ── Resources ──────────────────────────────────────────
|
|
138
|
-
|
|
139
|
-
server.resource(
|
|
140
|
-
"nooriel://build-pack",
|
|
141
|
-
"nooriel://build-pack",
|
|
142
|
-
async (uri) => {
|
|
143
|
-
const data = await apiFetch("/build-pack/all");
|
|
144
|
-
let text = `# Build Instruction Pack: ${data.project_name}\n\n`;
|
|
145
|
-
for (const [name, content] of Object.entries(data.files || {})) {
|
|
146
|
-
text += `\n---\n## ${name}\n\n${content}\n`;
|
|
147
|
-
}
|
|
148
|
-
return { contents: [{ uri: uri.href, text, mimeType: "text/markdown" }] };
|
|
149
|
-
}
|
|
150
|
-
);
|
|
151
|
-
|
|
152
128
|
// ── Start ──────────────────────────────────────────────
|
|
153
129
|
|
|
154
130
|
const transport = new StdioServerTransport();
|