@cogitator-ai/mcp 17.0.6 → 17.0.10
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/dist/adapter/tool-adapter.d.ts +2 -2
- package/dist/client/mcp-client.d.ts +1 -1
- package/dist/client/mcp-client.js +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +4 -4
- package/dist/server/mcp-server.d.ts +1 -1
- package/dist/server/mcp-server.js +1 -1
- package/package.json +14 -14
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Cogitator Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { type ZodTypeAny, type ZodObject } from 'zod';
|
|
8
8
|
import type { Tool, ToolSchema } from '@cogitator-ai/types';
|
|
9
|
-
import type { MCPToolDefinition, MCPToolContent, ToolAdapterOptions } from '../types';
|
|
10
|
-
import type { MCPClient } from '../client/mcp-client';
|
|
9
|
+
import type { MCPToolDefinition, MCPToolContent, ToolAdapterOptions } from '../types.js';
|
|
10
|
+
import type { MCPClient } from '../client/mcp-client.js';
|
|
11
11
|
/**
|
|
12
12
|
* Convert a Zod schema to JSON Schema
|
|
13
13
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* resources, and prompts.
|
|
6
6
|
*/
|
|
7
7
|
import type { Tool } from '@cogitator-ai/types';
|
|
8
|
-
import type { MCPClientConfig, MCPResource, MCPResourceContent, MCPPrompt, MCPPromptMessage, MCPToolDefinition } from '../types';
|
|
8
|
+
import type { MCPClientConfig, MCPResource, MCPResourceContent, MCPPrompt, MCPPromptMessage, MCPToolDefinition } from '../types.js';
|
|
9
9
|
/**
|
|
10
10
|
* MCP Client for connecting to external MCP servers
|
|
11
11
|
*
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* resources, and prompts.
|
|
6
6
|
*/
|
|
7
7
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
8
|
-
import { createStdioTransport, createHttpTransport } from './transports';
|
|
9
|
-
import { mcpToCogitator } from '../adapter/tool-adapter';
|
|
8
|
+
import { createStdioTransport, createHttpTransport } from './transports.js';
|
|
9
|
+
import { mcpToCogitator } from '../adapter/tool-adapter.js';
|
|
10
10
|
const DEFAULT_RETRY_CONFIG = {
|
|
11
11
|
maxRetries: 3,
|
|
12
12
|
initialDelay: 1000,
|
package/dist/index.d.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* - MCPServer: Expose Cogitator tools as an MCP server
|
|
7
7
|
* - Tool Adapter: Convert between Cogitator and MCP tool formats
|
|
8
8
|
*/
|
|
9
|
-
export { MCPClient, connectMCPServer } from './client/mcp-client';
|
|
10
|
-
export { createStdioTransport, createHttpTransport } from './client/transports';
|
|
11
|
-
export type { StdioTransportConfig, HttpTransportConfig } from './client/transports';
|
|
12
|
-
export { MCPServer, serveMCPTools } from './server/mcp-server';
|
|
13
|
-
export { cogitatorToMCP, toolSchemaToMCP, mcpToCogitator, wrapMCPTools, zodToJsonSchema, jsonSchemaToZod, resultToMCPContent, mcpContentToResult, } from './adapter/tool-adapter';
|
|
14
|
-
export type { MCPClientConfig, MCPRetryConfig, MCPServerConfig, MCPTransportType, MCPResource, MCPResourceContent, MCPResourceConfig, MCPPrompt, MCPPromptArgument, MCPPromptArgumentConfig, MCPPromptMessage, MCPPromptConfig, MCPPromptResult, MCPToolDefinition, MCPToolCallResult, MCPToolContent, ToolAdapterOptions, ConvertedTools, } from './types';
|
|
9
|
+
export { MCPClient, connectMCPServer } from './client/mcp-client.js';
|
|
10
|
+
export { createStdioTransport, createHttpTransport } from './client/transports.js';
|
|
11
|
+
export type { StdioTransportConfig, HttpTransportConfig } from './client/transports.js';
|
|
12
|
+
export { MCPServer, serveMCPTools } from './server/mcp-server.js';
|
|
13
|
+
export { cogitatorToMCP, toolSchemaToMCP, mcpToCogitator, wrapMCPTools, zodToJsonSchema, jsonSchemaToZod, resultToMCPContent, mcpContentToResult, } from './adapter/tool-adapter.js';
|
|
14
|
+
export type { MCPClientConfig, MCPRetryConfig, MCPServerConfig, MCPTransportType, MCPResource, MCPResourceContent, MCPResourceConfig, MCPPrompt, MCPPromptArgument, MCPPromptArgumentConfig, MCPPromptMessage, MCPPromptConfig, MCPPromptResult, MCPToolDefinition, MCPToolCallResult, MCPToolContent, ToolAdapterOptions, ConvertedTools, } from './types.js';
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* - MCPServer: Expose Cogitator tools as an MCP server
|
|
7
7
|
* - Tool Adapter: Convert between Cogitator and MCP tool formats
|
|
8
8
|
*/
|
|
9
|
-
export { MCPClient, connectMCPServer } from './client/mcp-client';
|
|
10
|
-
export { createStdioTransport, createHttpTransport } from './client/transports';
|
|
11
|
-
export { MCPServer, serveMCPTools } from './server/mcp-server';
|
|
12
|
-
export { cogitatorToMCP, toolSchemaToMCP, mcpToCogitator, wrapMCPTools, zodToJsonSchema, jsonSchemaToZod, resultToMCPContent, mcpContentToResult, } from './adapter/tool-adapter';
|
|
9
|
+
export { MCPClient, connectMCPServer } from './client/mcp-client.js';
|
|
10
|
+
export { createStdioTransport, createHttpTransport } from './client/transports.js';
|
|
11
|
+
export { MCPServer, serveMCPTools } from './server/mcp-server.js';
|
|
12
|
+
export { cogitatorToMCP, toolSchemaToMCP, mcpToCogitator, wrapMCPTools, zodToJsonSchema, jsonSchemaToZod, resultToMCPContent, mcpContentToResult, } from './adapter/tool-adapter.js';
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* other MCP clients (e.g., Claude Desktop, other AI assistants).
|
|
6
6
|
*/
|
|
7
7
|
import type { Tool } from '@cogitator-ai/types';
|
|
8
|
-
import type { MCPServerConfig, MCPResourceConfig, MCPPromptConfig } from '../types';
|
|
8
|
+
import type { MCPServerConfig, MCPResourceConfig, MCPPromptConfig } from '../types.js';
|
|
9
9
|
/**
|
|
10
10
|
* MCP Server for exposing Cogitator tools
|
|
11
11
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { McpServer, ResourceTemplate } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
8
8
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
9
|
-
import { resultToMCPContent, zodToJsonSchema } from '../adapter/tool-adapter';
|
|
9
|
+
import { resultToMCPContent, zodToJsonSchema } from '../adapter/tool-adapter.js';
|
|
10
10
|
import { z } from 'zod';
|
|
11
11
|
/**
|
|
12
12
|
* MCP Server for exposing Cogitator tools
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cogitator-ai/mcp",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.10",
|
|
4
4
|
"description": "MCP (Model Context Protocol) integration for Cogitator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -14,18 +14,10 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "tsc",
|
|
19
|
-
"dev": "tsc --watch",
|
|
20
|
-
"test": "vitest run",
|
|
21
|
-
"test:watch": "vitest",
|
|
22
|
-
"lint": "eslint src",
|
|
23
|
-
"clean": "rm -rf dist"
|
|
24
|
-
},
|
|
25
17
|
"dependencies": {
|
|
26
|
-
"@cogitator-ai/types": "workspace:*",
|
|
27
18
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
28
|
-
"zod": "^4.3.6"
|
|
19
|
+
"zod": "^4.3.6",
|
|
20
|
+
"@cogitator-ai/types": "0.22.2"
|
|
29
21
|
},
|
|
30
22
|
"devDependencies": {
|
|
31
23
|
"@types/node": "^25.0.10",
|
|
@@ -33,7 +25,7 @@
|
|
|
33
25
|
"vitest": "^4.0.18"
|
|
34
26
|
},
|
|
35
27
|
"peerDependencies": {
|
|
36
|
-
"@cogitator-ai/types": "
|
|
28
|
+
"@cogitator-ai/types": "0.22.2"
|
|
37
29
|
},
|
|
38
30
|
"engines": {
|
|
39
31
|
"node": ">=20.0.0"
|
|
@@ -47,5 +39,13 @@
|
|
|
47
39
|
"access": "public",
|
|
48
40
|
"registry": "https://npm.pkg.github.com"
|
|
49
41
|
},
|
|
50
|
-
"license": "MIT"
|
|
51
|
-
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsc",
|
|
45
|
+
"dev": "tsc --watch",
|
|
46
|
+
"test": "vitest run",
|
|
47
|
+
"test:watch": "vitest",
|
|
48
|
+
"lint": "eslint src",
|
|
49
|
+
"clean": "rm -rf dist"
|
|
50
|
+
}
|
|
51
|
+
}
|