@0xmonaco/mcp-server 0.1.5 → 0.3.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/CHANGELOG.md +2 -0
- package/package.json +2 -2
- package/src/search.d.ts +1 -3
- package/src/tools/helpers.d.ts +19 -30
- package/src/tools/index.d.ts +1 -4
- package/src/tools/zod.d.ts +2 -9
- package/src/utils.d.ts +7 -16
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MCP server for the Monaco documentation",
|
|
6
6
|
"engines": {
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"start": "tsx src/index.js",
|
|
22
|
-
"test": "jest"
|
|
22
|
+
"test": "jest --pass-with-no-tests"
|
|
23
23
|
}
|
|
24
24
|
}
|
package/src/search.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { InitializationConfiguration } from "./types.js";
|
|
3
|
-
export declare function fetchSearchConfigurationAndTools(
|
|
4
|
-
subdomain: string,
|
|
5
|
-
): Promise<InitializationConfiguration>;
|
|
3
|
+
export declare function fetchSearchConfigurationAndTools(subdomain: string): Promise<InitializationConfiguration>;
|
|
6
4
|
export declare function createSearchTool(server: McpServer): Promise<void>;
|
package/src/tools/helpers.d.ts
CHANGED
|
@@ -6,40 +6,29 @@ import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
|
6
6
|
import { ServerParams, ToolWithEndpoint } from "../types.js";
|
|
7
7
|
import { NestedRecord, SimpleRecord } from "../utils.js";
|
|
8
8
|
export declare function convertStrToTitle(str: string): string;
|
|
9
|
-
export declare function findNextIteration(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
):
|
|
13
|
-
export declare function
|
|
14
|
-
spec: OpenAPI.Document,
|
|
15
|
-
): Endpoint<DataSchemaArray>[];
|
|
16
|
-
export declare function convertEndpointToTool(
|
|
17
|
-
endpoint: Endpoint<DataSchemaArray>,
|
|
18
|
-
): Omit<Tool, "inputSchema">;
|
|
19
|
-
export declare function getMcpToolsAndEndpointsFromOpenApiSpec(
|
|
20
|
-
spec: OpenAPI.Document,
|
|
21
|
-
): ToolWithEndpoint[];
|
|
22
|
-
export declare function getEndpointsFromOpenApi(
|
|
23
|
-
specification: OpenAPI.Document,
|
|
24
|
-
): Endpoint<DataSchemaArray>[];
|
|
9
|
+
export declare function findNextIteration(set: Set<string>, str: string): number;
|
|
10
|
+
export declare function getMcpEnabledEndpointsFromOpenApiSpec(spec: OpenAPI.Document): Endpoint<DataSchemaArray>[];
|
|
11
|
+
export declare function convertEndpointToTool(endpoint: Endpoint<DataSchemaArray>): Omit<Tool, "inputSchema">;
|
|
12
|
+
export declare function getMcpToolsAndEndpointsFromOpenApiSpec(spec: OpenAPI.Document): ToolWithEndpoint[];
|
|
13
|
+
export declare function getEndpointsFromOpenApi(specification: OpenAPI.Document): Endpoint<DataSchemaArray>[];
|
|
25
14
|
export declare function loadEnv(key: string): SimpleRecord;
|
|
26
15
|
export declare function convertSecurityParameterSection(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
securityParameters: SecurityParameterGroup,
|
|
17
|
+
envVariables: SimpleRecord,
|
|
18
|
+
location: string,
|
|
30
19
|
): {
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
key: string;
|
|
21
|
+
value: NestedRecord | undefined;
|
|
33
22
|
}[];
|
|
34
23
|
export declare function convertEndpointToCategorizedZod(
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
envKey: string,
|
|
25
|
+
endpoint: Endpoint,
|
|
37
26
|
): {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
27
|
+
url: string;
|
|
28
|
+
method: HttpMethod;
|
|
29
|
+
paths: ServerParams;
|
|
30
|
+
queries: ServerParams;
|
|
31
|
+
body: ServerParams | undefined;
|
|
32
|
+
headers: ServerParams;
|
|
33
|
+
cookies: ServerParams;
|
|
45
34
|
};
|
package/src/tools/index.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
export declare function createTools(
|
|
3
|
-
server: McpServer,
|
|
4
|
-
existingTools: Set<string>,
|
|
5
|
-
): Promise<void>;
|
|
2
|
+
export declare function createTools(server: McpServer, existingTools: Set<string>): Promise<void>;
|
package/src/tools/zod.d.ts
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DataSchema,
|
|
3
|
-
DataSchemaArray,
|
|
4
|
-
IncrementalDataSchema,
|
|
5
|
-
IncrementalDataSchemaArray,
|
|
6
|
-
} from "@mintlify/validation";
|
|
1
|
+
import { DataSchema, DataSchemaArray, IncrementalDataSchema, IncrementalDataSchemaArray } from "@mintlify/validation";
|
|
7
2
|
import { z } from "zod";
|
|
8
3
|
type SchemaInput = DataSchema | IncrementalDataSchema;
|
|
9
|
-
export declare function dataSchemaArrayToZod(
|
|
10
|
-
schemas: DataSchemaArray | IncrementalDataSchemaArray,
|
|
11
|
-
): z.ZodTypeAny;
|
|
4
|
+
export declare function dataSchemaArrayToZod(schemas: DataSchemaArray | IncrementalDataSchemaArray): z.ZodTypeAny;
|
|
12
5
|
export declare function dataSchemaToZod(schema: SchemaInput): z.ZodTypeAny;
|
|
13
6
|
export {};
|
package/src/utils.d.ts
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import { OpenAPI } from "@mintlify/openapi-types";
|
|
2
2
|
import { AxiosResponse } from "axios";
|
|
3
3
|
export type NestedRecord =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
| string
|
|
5
|
+
| {
|
|
6
|
+
[key: string]: NestedRecord;
|
|
7
|
+
};
|
|
8
8
|
export type SimpleRecord = Record<string, NestedRecord>;
|
|
9
|
-
export declare function initializeObject(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
): SimpleRecord;
|
|
13
|
-
export declare function getFileId(
|
|
14
|
-
spec: OpenAPI.Document,
|
|
15
|
-
index: number,
|
|
16
|
-
): string | number;
|
|
17
|
-
export declare function throwOnAxiosError(
|
|
18
|
-
response: AxiosResponse<any, any>,
|
|
19
|
-
errMsg: string,
|
|
20
|
-
): void;
|
|
9
|
+
export declare function initializeObject(obj: SimpleRecord, path: string[]): SimpleRecord;
|
|
10
|
+
export declare function getFileId(spec: OpenAPI.Document, index: number): string | number;
|
|
11
|
+
export declare function throwOnAxiosError(response: AxiosResponse<any, any>, errMsg: string): void;
|
|
21
12
|
export declare function formatErr(err: unknown): any;
|