@0xmonaco/mcp-server 0.4.1 → 0.4.2
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 +6 -0
- package/package.json +1 -1
- package/src/connect.d.ts +1 -1
- package/src/connect.js +1 -1
- package/src/index.js +4 -4
- package/src/initialize.d.ts +1 -1
- package/src/initialize.js +2 -2
- package/src/search.d.ts +2 -2
- package/src/search.js +3 -3
- package/src/tools/helpers.d.ts +5 -7
- package/src/tools/helpers.js +2 -2
- package/src/tools/index.d.ts +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/connect.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp
|
|
1
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
|
|
2
2
|
export declare function connectServer(server: McpServer): Promise<void>;
|
package/src/connect.js
CHANGED
|
@@ -31,7 +31,7 @@ var __awaiter =
|
|
|
31
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio
|
|
34
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio";
|
|
35
35
|
export function connectServer(server) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
const transport = new StdioServerTransport();
|
package/src/index.js
CHANGED
|
@@ -31,10 +31,10 @@ var __awaiter =
|
|
|
31
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
|
-
import { connectServer } from "./connect
|
|
35
|
-
import { initialize } from "./initialize
|
|
36
|
-
import { createSearchTool } from "./search
|
|
37
|
-
import { createTools } from "./tools
|
|
34
|
+
import { connectServer } from "./connect";
|
|
35
|
+
import { initialize } from "./initialize";
|
|
36
|
+
import { createSearchTool } from "./search";
|
|
37
|
+
import { createTools } from "./tools";
|
|
38
38
|
function main() {
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
40
|
const server = initialize();
|
package/src/initialize.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp
|
|
1
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
|
|
2
2
|
export declare function initialize(): McpServer;
|
package/src/initialize.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp
|
|
2
|
-
import { SERVER_NAME, SERVER_VERSION } from "../settings
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
|
|
2
|
+
import { SERVER_NAME, SERVER_VERSION } from "../settings";
|
|
3
3
|
export function initialize() {
|
|
4
4
|
console.error("Initializing MCP Server...");
|
|
5
5
|
const server = new McpServer({
|
package/src/search.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp
|
|
2
|
-
import { InitializationConfiguration } from "./types
|
|
1
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
|
|
2
|
+
import type { InitializationConfiguration } from "./types";
|
|
3
3
|
export declare function fetchSearchConfigurationAndTools(subdomain: string): Promise<InitializationConfiguration>;
|
|
4
4
|
export declare function createSearchTool(server: McpServer): Promise<void>;
|
package/src/search.js
CHANGED
|
@@ -34,9 +34,9 @@ var __awaiter =
|
|
|
34
34
|
import axios from "axios";
|
|
35
35
|
import { TrieveSDK } from "trieve-ts-sdk";
|
|
36
36
|
import { z } from "zod";
|
|
37
|
-
import { SUBDOMAIN } from "./config.readonly
|
|
38
|
-
import { SERVER_URL } from "./config.readonly
|
|
39
|
-
import { formatErr, throwOnAxiosError } from "./utils
|
|
37
|
+
import { SUBDOMAIN } from "./config.readonly";
|
|
38
|
+
import { SERVER_URL } from "./config.readonly";
|
|
39
|
+
import { formatErr, throwOnAxiosError } from "./utils";
|
|
40
40
|
const DEFAULT_BASE_URL = "https://api.mintlifytrieve.com";
|
|
41
41
|
export function fetchSearchConfigurationAndTools(subdomain) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
package/src/tools/helpers.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { OpenAPI } from "@mintlify/openapi-types";
|
|
2
|
-
import { HttpMethod, SecurityParameterGroup } from "@mintlify/validation";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { ServerParams, ToolWithEndpoint } from "../types.js";
|
|
7
|
-
import { NestedRecord, SimpleRecord } from "../utils.js";
|
|
1
|
+
import type { OpenAPI } from "@mintlify/openapi-types";
|
|
2
|
+
import type { DataSchemaArray, Endpoint, HttpMethod, SecurityParameterGroup } from "@mintlify/validation";
|
|
3
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types";
|
|
4
|
+
import type { ServerParams, ToolWithEndpoint } from "../types";
|
|
5
|
+
import type { NestedRecord, SimpleRecord } from "../utils";
|
|
8
6
|
export declare function convertStrToTitle(str: string): string;
|
|
9
7
|
export declare function findNextIteration(set: Set<string>, str: string): number;
|
|
10
8
|
export declare function getMcpEnabledEndpointsFromOpenApiSpec(spec: OpenAPI.Document): Endpoint<DataSchemaArray>[];
|
package/src/tools/helpers.js
CHANGED
|
@@ -5,8 +5,8 @@ import path from "node:path";
|
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { OpenAPIV3 } from "openapi-types";
|
|
7
7
|
import { z } from "zod";
|
|
8
|
-
import { initializeObject } from "../utils
|
|
9
|
-
import { dataSchemaArrayToZod, dataSchemaToZod } from "./zod
|
|
8
|
+
import { initializeObject } from "../utils";
|
|
9
|
+
import { dataSchemaArrayToZod, dataSchemaToZod } from "./zod";
|
|
10
10
|
export function convertStrToTitle(str) {
|
|
11
11
|
const spacedString = str.replace(/[-_]/g, " ");
|
|
12
12
|
const words = spacedString.split(/(?=[A-Z])|\s+/);
|
package/src/tools/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp
|
|
1
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
|
|
2
2
|
export declare function createTools(server: McpServer, existingTools: Set<string>): Promise<void>;
|