@mcp-layer/test-server 1.0.3 → 1.0.4
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 +8 -3
- package/types/bin.d.ts +1 -0
- package/types/config.d.ts +6 -0
- package/types/data/manual.d.ts +1 -0
- package/types/data/notes.d.ts +4 -0
- package/types/data/references.d.ts +6 -0
- package/types/http.d.ts +1 -0
- package/types/index.d.ts +35 -0
- package/types/prompts/index.d.ts +5 -0
- package/types/prompts/welcome.d.ts +5 -0
- package/types/resources/index.d.ts +9 -0
- package/types/resources/manual.d.ts +8 -0
- package/types/resources/notes.d.ts +8 -0
- package/types/resources/templates.d.ts +8 -0
- package/types/resources/ui.d.ts +5 -0
- package/types/shared/capabilities.d.ts +6 -0
- package/types/subscriptions/resources.d.ts +11 -0
- package/types/tools/add.d.ts +6 -0
- package/types/tools/annotated.d.ts +6 -0
- package/types/tools/batch.d.ts +6 -0
- package/types/tools/booking.d.ts +8 -0
- package/types/tools/dashboard.d.ts +6 -0
- package/types/tools/echo.d.ts +6 -0
- package/types/tools/files.d.ts +13 -0
- package/types/tools/index.d.ts +19 -0
- package/types/tools/logs.d.ts +5 -0
- package/types/tools/note-update.d.ts +11 -0
- package/types/tools/present.d.ts +6 -0
- package/types/tools/progress.d.ts +5 -0
- package/types/tools/rebalance.d.ts +9 -0
- package/types/tools/roots.d.ts +8 -0
- package/types/tools/summaries.d.ts +8 -0
- package/types/tools/testing.d.ts +35 -0
- package/types/transport/http.d.ts +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-layer/test-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Feature-rich MCP server for integration testing and local development.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,12 +19,15 @@
|
|
|
19
19
|
"mcp-test-server-http": "src/http.js"
|
|
20
20
|
},
|
|
21
21
|
"main": "src/index.js",
|
|
22
|
+
"types": "./types/index.d.ts",
|
|
22
23
|
"exports": {
|
|
23
24
|
".": {
|
|
25
|
+
"types": "./types/index.d.ts",
|
|
24
26
|
"import": "./src/index.js",
|
|
25
27
|
"default": "./src/index.js"
|
|
26
28
|
},
|
|
27
29
|
"./http": {
|
|
30
|
+
"types": "./types/transport/http.d.ts",
|
|
28
31
|
"import": "./src/transport/http.js",
|
|
29
32
|
"default": "./src/transport/http.js"
|
|
30
33
|
},
|
|
@@ -32,6 +35,7 @@
|
|
|
32
35
|
},
|
|
33
36
|
"files": [
|
|
34
37
|
"src",
|
|
38
|
+
"types",
|
|
35
39
|
"LICENSE"
|
|
36
40
|
],
|
|
37
41
|
"publishConfig": {
|
|
@@ -42,9 +46,10 @@
|
|
|
42
46
|
"argh": "^1.0.0",
|
|
43
47
|
"express": "^5.0.1",
|
|
44
48
|
"zod": "^3.25.76",
|
|
45
|
-
"@mcp-layer/error": "0.2.
|
|
49
|
+
"@mcp-layer/error": "0.2.1"
|
|
46
50
|
},
|
|
47
51
|
"scripts": {
|
|
48
|
-
"
|
|
52
|
+
"build:types": "tsc -p tsconfig.json",
|
|
53
|
+
"test": "node --test --experimental-test-coverage \"./test/**/*.js\""
|
|
49
54
|
}
|
|
50
55
|
}
|
package/types/bin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const manual: string;
|
package/types/http.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build an MCP server instance pre-configured with tools, resources, and prompts.
|
|
3
|
+
*
|
|
4
|
+
* targeted metadata overrides (name/version) without custom servers.
|
|
5
|
+
*
|
|
6
|
+
* @param {{ info?: { name?: string, version?: string } }} [opts] - Optional metadata overrides.
|
|
7
|
+
* @returns {McpServer}
|
|
8
|
+
*/
|
|
9
|
+
export function build(opts?: {
|
|
10
|
+
info?: {
|
|
11
|
+
name?: string;
|
|
12
|
+
version?: string;
|
|
13
|
+
};
|
|
14
|
+
}): McpServer;
|
|
15
|
+
/**
|
|
16
|
+
* Start the test server using stdio transport for integration scenarios.
|
|
17
|
+
*
|
|
18
|
+
* exercising the standard test-server surface.
|
|
19
|
+
*
|
|
20
|
+
* @param {{ server?: McpServer, transport?: StdioServerTransport, info?: { name?: string, version?: string } }} [opts] - Optional overrides for the server instance, transport, or metadata.
|
|
21
|
+
* @returns {Promise<{ server: McpServer, transport: StdioServerTransport }>}
|
|
22
|
+
*/
|
|
23
|
+
export function start(opts?: {
|
|
24
|
+
server?: McpServer;
|
|
25
|
+
transport?: StdioServerTransport;
|
|
26
|
+
info?: {
|
|
27
|
+
name?: string;
|
|
28
|
+
version?: string;
|
|
29
|
+
};
|
|
30
|
+
}): Promise<{
|
|
31
|
+
server: McpServer;
|
|
32
|
+
transport: StdioServerTransport;
|
|
33
|
+
}>;
|
|
34
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
35
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register all prompts exposed by the server.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register prompts on.
|
|
4
|
+
*/
|
|
5
|
+
export function registerPrompts(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the welcome prompt with completable arguments.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the prompt on.
|
|
4
|
+
*/
|
|
5
|
+
export function registerWelcomePrompt(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register all resources exposed by the server.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register resources on.
|
|
4
|
+
* @param {{ manual: string, notes: Map<string, Record<string, string>> }} context - Shared data backing the resources.
|
|
5
|
+
*/
|
|
6
|
+
export function registerResources(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer, context: {
|
|
7
|
+
manual: string;
|
|
8
|
+
notes: Map<string, Record<string, string>>;
|
|
9
|
+
}): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the markdown manual resource.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the resource on.
|
|
4
|
+
* @param {{ manual: string }} context - Manual content backing the resource.
|
|
5
|
+
*/
|
|
6
|
+
export function registerManualResource(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer, context: {
|
|
7
|
+
manual: string;
|
|
8
|
+
}): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the dynamic notes resource template with completions.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the resource on.
|
|
4
|
+
* @param {{ notes: Map<string, Record<string, string>> }} context - Notes data keyed by topic/detail.
|
|
5
|
+
*/
|
|
6
|
+
export function registerNotesResource(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer, context: {
|
|
7
|
+
notes: Map<string, Record<string, string>>;
|
|
8
|
+
}): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register a templated resource that expands a name into a note URI.
|
|
3
|
+
*
|
|
4
|
+
* surface to exercise dynamic routes.
|
|
5
|
+
*
|
|
6
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register resources on.
|
|
7
|
+
*/
|
|
8
|
+
export function registerTemplateResource(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the MCP App UI resource.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the resource on.
|
|
4
|
+
*/
|
|
5
|
+
export function registerUi(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build a capability checker bound to the current server connection.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server instance to read client capabilities from.
|
|
4
|
+
* @returns {(capability: 'sampling' | 'elicitation' | 'roots') => boolean}
|
|
5
|
+
*/
|
|
6
|
+
export function createCapabilityChecker(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): (capability: "sampling" | "elicitation" | "roots") => boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configure basic resource subscriptions on the underlying server transport.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register subscription handlers on.
|
|
4
|
+
* @param {{ isSubscribable: (uri: string) => boolean }} options - Subscription filters for allowed URIs.
|
|
5
|
+
* @returns {{ notifyResourceUpdated: (uri: string) => Promise<void> }}
|
|
6
|
+
*/
|
|
7
|
+
export function registerResourceSubscriptions(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer, options: {
|
|
8
|
+
isSubscribable: (uri: string) => boolean;
|
|
9
|
+
}): {
|
|
10
|
+
notifyResourceUpdated: (uri: string) => Promise<void>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the add tool returning structured totals.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
4
|
+
* @returns {ReturnType<import('@modelcontextprotocol/sdk/server/mcp.js').McpServer['registerTool']>}
|
|
5
|
+
*/
|
|
6
|
+
export function registerAdd(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): ReturnType<import("@modelcontextprotocol/sdk/server/mcp.js").McpServer["registerTool"]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register a tool that exercises annotations and _meta without output schema.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
4
|
+
* @returns {ReturnType<import('@modelcontextprotocol/sdk/server/mcp.js').McpServer['registerTool']>}
|
|
5
|
+
*/
|
|
6
|
+
export function registerAnnotated(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): ReturnType<import("@modelcontextprotocol/sdk/server/mcp.js").McpServer["registerTool"]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register a tool that accepts array/object inputs.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
4
|
+
* @returns {ReturnType<import('@modelcontextprotocol/sdk/server/mcp.js').McpServer['registerTool']>}
|
|
5
|
+
*/
|
|
6
|
+
export function registerBatch(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): ReturnType<import("@modelcontextprotocol/sdk/server/mcp.js").McpServer["registerTool"]>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the booking tool that triggers elicitation workflows.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
4
|
+
* @param {{ hasCapability: (capability: 'elicitation') => boolean }} capabilities - Capability checker for elicitation support.
|
|
5
|
+
*/
|
|
6
|
+
export function registerBooking(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer, capabilities: {
|
|
7
|
+
hasCapability: (capability: "elicitation") => boolean;
|
|
8
|
+
}): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register a tool that declares an MCP App UI resource.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
4
|
+
* @returns {ReturnType<import('@modelcontextprotocol/sdk/server/mcp.js').McpServer['registerTool']>}
|
|
5
|
+
*/
|
|
6
|
+
export function registerDashboard(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): ReturnType<import("@modelcontextprotocol/sdk/server/mcp.js").McpServer["registerTool"]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the echo tool that optionally uppercases responses.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
4
|
+
* @returns {ReturnType<import('@modelcontextprotocol/sdk/server/mcp.js').McpServer['registerTool']>}
|
|
5
|
+
*/
|
|
6
|
+
export function registerEcho(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): ReturnType<import("@modelcontextprotocol/sdk/server/mcp.js").McpServer["registerTool"]>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the files tool that emits ResourceLinks referencing shared assets.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
4
|
+
* @param {{ references: Array<{ uri: string, name: string, description: string, mimeType: string }> }} context - Reference data backing the responses.
|
|
5
|
+
*/
|
|
6
|
+
export function registerFiles(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer, context: {
|
|
7
|
+
references: Array<{
|
|
8
|
+
uri: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
mimeType: string;
|
|
12
|
+
}>;
|
|
13
|
+
}): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register all server tools.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register tools on.
|
|
4
|
+
* @param {{ references: Array<{ uri: string, name: string, description: string, mimeType: string }> }} context - Shared reference data for tools.
|
|
5
|
+
* @param {{ hasCapability: (capability: 'sampling' | 'elicitation' | 'roots') => boolean }} capabilities - Capability checker for tool behavior.
|
|
6
|
+
* @param {{ notifyResourceUpdated: (uri: string) => Promise<void> }} notifier - Notifier for resource update events.
|
|
7
|
+
*/
|
|
8
|
+
export function registerTools(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer, context: {
|
|
9
|
+
references: Array<{
|
|
10
|
+
uri: string;
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
mimeType: string;
|
|
14
|
+
}>;
|
|
15
|
+
}, capabilities: {
|
|
16
|
+
hasCapability: (capability: "sampling" | "elicitation" | "roots") => boolean;
|
|
17
|
+
}, notifier: {
|
|
18
|
+
notifyResourceUpdated: (uri: string) => Promise<void>;
|
|
19
|
+
}): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the logs tool that emits notifications/message entries.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
4
|
+
*/
|
|
5
|
+
export function registerLogs(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register a tool that mutates note resources and emits update notifications.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
4
|
+
* @param {{ notes: Map<string, Record<string, string>> }} context - Notes data store to mutate.
|
|
5
|
+
* @param {{ notifyResourceUpdated: (uri: string) => Promise<void> }} notifier - Resource update notifier.
|
|
6
|
+
*/
|
|
7
|
+
export function registerNoteUpdate(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer, context: {
|
|
8
|
+
notes: Map<string, Record<string, string>>;
|
|
9
|
+
}, notifier: {
|
|
10
|
+
notifyResourceUpdated: (uri: string) => Promise<void>;
|
|
11
|
+
}): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the present tool to emit mixed content types.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
4
|
+
* @returns {ReturnType<import('@modelcontextprotocol/sdk/server/mcp.js').McpServer['registerTool']>}
|
|
5
|
+
*/
|
|
6
|
+
export function registerPresent(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): ReturnType<import("@modelcontextprotocol/sdk/server/mcp.js").McpServer["registerTool"]>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the progress tool that emits notifications/progress updates.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
4
|
+
*/
|
|
5
|
+
export function registerProgress(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the rebalance tool that toggles core tool registrations to exercise debounced notifications.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
4
|
+
* @param {{ echo: ReturnType<import('@modelcontextprotocol/sdk/server/mcp.js').McpServer['registerTool']>, add: ReturnType<import('@modelcontextprotocol/sdk/server/mcp.js').McpServer['registerTool']> }} handles - Tool handles to enable/disable.
|
|
5
|
+
*/
|
|
6
|
+
export function registerRebalance(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer, handles: {
|
|
7
|
+
echo: ReturnType<import("@modelcontextprotocol/sdk/server/mcp.js").McpServer["registerTool"]>;
|
|
8
|
+
add: ReturnType<import("@modelcontextprotocol/sdk/server/mcp.js").McpServer["registerTool"]>;
|
|
9
|
+
}): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the roots tool that calls roots/list on capable clients.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
4
|
+
* @param {{ hasCapability: (capability: 'roots') => boolean }} capabilities - Capability checker for roots support.
|
|
5
|
+
*/
|
|
6
|
+
export function registerRoots(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer, capabilities: {
|
|
7
|
+
hasCapability: (capability: "roots") => boolean;
|
|
8
|
+
}): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the summaries tool that delegates to sampling/createMessage.
|
|
3
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
4
|
+
* @param {{ hasCapability: (capability: 'sampling') => boolean }} capabilities - Capability checker for sampling support.
|
|
5
|
+
*/
|
|
6
|
+
export function registerSummaries(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer, capabilities: {
|
|
7
|
+
hasCapability: (capability: "sampling") => boolean;
|
|
8
|
+
}): void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register a tool that always returns isError true.
|
|
3
|
+
*
|
|
4
|
+
* relying on custom servers.
|
|
5
|
+
*
|
|
6
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
7
|
+
* @returns {ReturnType<import('@modelcontextprotocol/sdk/server/mcp.js').McpServer['registerTool']>}
|
|
8
|
+
*/
|
|
9
|
+
export function registerFailGracefully(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): ReturnType<import("@modelcontextprotocol/sdk/server/mcp.js").McpServer["registerTool"]>;
|
|
10
|
+
/**
|
|
11
|
+
* Register a tool that throws.
|
|
12
|
+
*
|
|
13
|
+
* exercises JSON-RPC error mapping.
|
|
14
|
+
*
|
|
15
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
16
|
+
* @returns {ReturnType<import('@modelcontextprotocol/sdk/server/mcp.js').McpServer['registerTool']>}
|
|
17
|
+
*/
|
|
18
|
+
export function registerCrash(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): ReturnType<import("@modelcontextprotocol/sdk/server/mcp.js").McpServer["registerTool"]>;
|
|
19
|
+
/**
|
|
20
|
+
* Register a tool that intentionally exceeds short timeouts.
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
24
|
+
* @returns {ReturnType<import('@modelcontextprotocol/sdk/server/mcp.js').McpServer['registerTool']>}
|
|
25
|
+
*/
|
|
26
|
+
export function registerSlow(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): ReturnType<import("@modelcontextprotocol/sdk/server/mcp.js").McpServer["registerTool"]>;
|
|
27
|
+
/**
|
|
28
|
+
* Register a tool that fails once then succeeds.
|
|
29
|
+
*
|
|
30
|
+
* transition from failure to success.
|
|
31
|
+
*
|
|
32
|
+
* @param {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} server - MCP server to register the tool on.
|
|
33
|
+
* @returns {ReturnType<import('@modelcontextprotocol/sdk/server/mcp.js').McpServer['registerTool']>}
|
|
34
|
+
*/
|
|
35
|
+
export function registerFlap(server: import("@modelcontextprotocol/sdk/server/mcp.js").McpServer): ReturnType<import("@modelcontextprotocol/sdk/server/mcp.js").McpServer["registerTool"]>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Start an HTTP server that exposes Streamable HTTP and SSE transports.
|
|
3
|
+
* @param {{ port?: number }} [opts] - Optional port override for the HTTP server.
|
|
4
|
+
* @returns {Promise<{ port: number, close: () => Promise<void> }>}
|
|
5
|
+
*/
|
|
6
|
+
export function startHttpServer(opts?: {
|
|
7
|
+
port?: number;
|
|
8
|
+
}): Promise<{
|
|
9
|
+
port: number;
|
|
10
|
+
close: () => Promise<void>;
|
|
11
|
+
}>;
|