@opennous/mcp 0.53.0 → 0.55.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/package.json +1 -1
- package/src/http.js +1 -0
- package/src/index.js +4 -1
- package/src/server.js +92 -1212
package/package.json
CHANGED
package/src/http.js
CHANGED
|
@@ -100,6 +100,7 @@ const httpServer = http.createServer(async (req, res) => {
|
|
|
100
100
|
// Fresh server + transport per request (stateless), with the key bound for
|
|
101
101
|
// the whole async handling so every tool call uses this tenant's key.
|
|
102
102
|
await runWithApiKey(apiKey, async () => {
|
|
103
|
+
// One surface: the 6-primitive revenue plugin. createServer() exposes only those.
|
|
103
104
|
const server = createServer();
|
|
104
105
|
const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: undefined });
|
|
105
106
|
res.on("close", () => {
|
package/src/index.js
CHANGED
|
@@ -27,6 +27,9 @@ try {
|
|
|
27
27
|
console.error(`[nous] ${err.message}`);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
// NOUS_SURFACE=plugin trims the stdio server to the 6-primitive plugin allowlist
|
|
31
|
+
// (+ whoami) — the same trim the hosted HTTP variant applies via ?surface=plugin.
|
|
32
|
+
// Unset (or any other value) serves the full toolset. See server.js createServer({surface}).
|
|
33
|
+
const server = createServer({ surface: process.env.NOUS_SURFACE });
|
|
31
34
|
const transport = new StdioServerTransport();
|
|
32
35
|
await server.connect(transport);
|