@noya-ai/mcp 0.1.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/LICENSE +21 -0
- package/README.md +40 -0
- package/dist/index.cjs +1353 -0
- package/dist/index.d.cts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +1316 -0
- package/dist/stdio.cjs +1374 -0
- package/dist/stdio.d.cts +2 -0
- package/dist/stdio.d.ts +2 -0
- package/dist/stdio.js +1351 -0
- package/package.json +58 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
export { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
import { NoyaSDK } from '@noya-ai/sdk';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Per-request SDK provider. Hosted MCP transports (apps/mcp-server) build
|
|
7
|
+
* a fresh SDK instance per incoming request, scoped to the caller's
|
|
8
|
+
* credential. Stdio (this package's `noya-mcp` bin) returns a single
|
|
9
|
+
* process-lifetime SDK constructed from `NOYA_API_KEY`.
|
|
10
|
+
*/
|
|
11
|
+
type GetClient = () => NoyaSDK;
|
|
12
|
+
/**
|
|
13
|
+
* Wire every SDK method as an MCP tool on `server`. Idempotent — call
|
|
14
|
+
* once per server instance after construction. The transport (stdio,
|
|
15
|
+
* Streamable HTTP) is the caller's responsibility.
|
|
16
|
+
*/
|
|
17
|
+
declare function registerTools(server: McpServer, getClient: GetClient): void;
|
|
18
|
+
|
|
19
|
+
export { type GetClient, registerTools };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
export { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
import { NoyaSDK } from '@noya-ai/sdk';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Per-request SDK provider. Hosted MCP transports (apps/mcp-server) build
|
|
7
|
+
* a fresh SDK instance per incoming request, scoped to the caller's
|
|
8
|
+
* credential. Stdio (this package's `noya-mcp` bin) returns a single
|
|
9
|
+
* process-lifetime SDK constructed from `NOYA_API_KEY`.
|
|
10
|
+
*/
|
|
11
|
+
type GetClient = () => NoyaSDK;
|
|
12
|
+
/**
|
|
13
|
+
* Wire every SDK method as an MCP tool on `server`. Idempotent — call
|
|
14
|
+
* once per server instance after construction. The transport (stdio,
|
|
15
|
+
* Streamable HTTP) is the caller's responsibility.
|
|
16
|
+
*/
|
|
17
|
+
declare function registerTools(server: McpServer, getClient: GetClient): void;
|
|
18
|
+
|
|
19
|
+
export { type GetClient, registerTools };
|