@santi020k/lumen-mcp 1.5.0 → 1.7.0-rc.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 +22 -3
- package/bin/lumen-mcp-http.mjs +30 -1
- package/data/lumen-data.json +3309 -360
- package/dist/cloudflare-worker.d.ts +16 -0
- package/dist/cloudflare-worker.d.ts.map +1 -0
- package/dist/cloudflare-worker.js +69 -0
- package/dist/data.d.ts +3 -0
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +5 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +114 -28
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +1 -0
- package/dist/tools.d.ts.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -133,9 +133,28 @@ npx -y --package @santi020k/lumen-mcp lumen-mcp-http
|
|
|
133
133
|
It binds to `127.0.0.1:3000` by default and exposes MCP at
|
|
134
134
|
`http://127.0.0.1:3000/mcp` plus a health check at `/health`. Configure it with
|
|
135
135
|
`LUMEN_MCP_HOST`, `LUMEN_MCP_PORT`, and a comma-separated
|
|
136
|
-
`LUMEN_MCP_ALLOWED_HOSTS`.
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
`LUMEN_MCP_ALLOWED_HOSTS`. The transport applies safe response headers and a
|
|
137
|
+
fixed-window request limit of 120 requests per minute by default.
|
|
138
|
+
|
|
139
|
+
Public deployments can also set:
|
|
140
|
+
|
|
141
|
+
- `LUMEN_MCP_OPENAI_CHALLENGE` to serve the exact single-line verification token at
|
|
142
|
+
`/.well-known/openai-apps-challenge`.
|
|
143
|
+
- `LUMEN_MCP_RATE_LIMIT_MAX` and `LUMEN_MCP_RATE_LIMIT_WINDOW_MS` to tune positive integer rate
|
|
144
|
+
limits.
|
|
145
|
+
- `LUMEN_MCP_TRUST_PROXY=true` only behind a controlled proxy that sanitizes forwarded headers.
|
|
146
|
+
|
|
147
|
+
The process listens over HTTP. Public hosting must terminate TLS, configure the exact allowed host,
|
|
148
|
+
and add authentication when the deployed data or operating model requires it. The public Lumen
|
|
149
|
+
catalog does not require user authentication.
|
|
150
|
+
|
|
151
|
+
## OpenAI plugin package
|
|
152
|
+
|
|
153
|
+
The repository includes a submission-ready plugin package in [`plugins/lumen-ui`](../../plugins/lumen-ui).
|
|
154
|
+
It combines the portable `lumen-ui` skill with this MCP server for local Codex and ChatGPT testing.
|
|
155
|
+
The public Plugins Directory submission uses a hosted Streamable HTTP endpoint; see the
|
|
156
|
+
[submission checklist](../../docs/openai-plugin-submission.md) for deployment requirements, listing
|
|
157
|
+
copy, annotation justifications, and reviewer test cases.
|
|
139
158
|
|
|
140
159
|
## Recommended agent workflow
|
|
141
160
|
|
package/bin/lumen-mcp-http.mjs
CHANGED
|
@@ -4,13 +4,42 @@ import { startLumenMcpHttp } from '../dist/index.js'
|
|
|
4
4
|
const port = Number.parseInt(process.env.LUMEN_MCP_PORT ?? '3000', 10)
|
|
5
5
|
const host = process.env.LUMEN_MCP_HOST ?? '127.0.0.1'
|
|
6
6
|
|
|
7
|
+
const parsePositiveInteger = (value, fallback, name) => {
|
|
8
|
+
const parsed = Number.parseInt(value ?? String(fallback), 10)
|
|
9
|
+
|
|
10
|
+
if (!Number.isSafeInteger(parsed) || parsed <= 0) {
|
|
11
|
+
throw new Error(`${name} must be a positive integer.`)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return parsed
|
|
15
|
+
}
|
|
16
|
+
|
|
7
17
|
const allowedHosts = process.env.LUMEN_MCP_ALLOWED_HOSTS
|
|
8
18
|
?.split(',')
|
|
9
19
|
.map(value => value.trim())
|
|
10
20
|
.filter(Boolean)
|
|
11
21
|
|
|
12
22
|
try {
|
|
13
|
-
const
|
|
23
|
+
const maxRequests = parsePositiveInteger(
|
|
24
|
+
process.env.LUMEN_MCP_RATE_LIMIT_MAX,
|
|
25
|
+
120,
|
|
26
|
+
'LUMEN_MCP_RATE_LIMIT_MAX'
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
const windowMs = parsePositiveInteger(
|
|
30
|
+
process.env.LUMEN_MCP_RATE_LIMIT_WINDOW_MS,
|
|
31
|
+
60_000,
|
|
32
|
+
'LUMEN_MCP_RATE_LIMIT_WINDOW_MS'
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
const { url } = await startLumenMcpHttp({
|
|
36
|
+
allowedHosts,
|
|
37
|
+
host,
|
|
38
|
+
openAiChallenge: process.env.LUMEN_MCP_OPENAI_CHALLENGE,
|
|
39
|
+
port,
|
|
40
|
+
rateLimit: { maxRequests, windowMs },
|
|
41
|
+
trustProxy: process.env.LUMEN_MCP_TRUST_PROXY === 'true'
|
|
42
|
+
})
|
|
14
43
|
|
|
15
44
|
process.stderr.write(`lumen-mcp listening at ${url.href}\n`)
|
|
16
45
|
} catch (error) {
|