@interopio/mcp-core 0.1.0-beta.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/mcp-core.d.ts ADDED
@@ -0,0 +1,148 @@
1
+ import { IOConnectBrowser } from "@interopio/browser";
2
+ import { IOConnectDesktop } from "@interopio/desktop";
3
+ import { IoIntelWorkingContext, IoIntelWorkingContextFactoryFunction } from "@interopio/intel-working-context";
4
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
+
6
+ export namespace IoIntelMCPCore {
7
+
8
+ export interface ClientCapabilities {
9
+ [x: string]: unknown;
10
+ experimental?: {
11
+ [x: string]: unknown;
12
+ };
13
+ sampling?: {
14
+ [x: string]: unknown;
15
+ };
16
+ elicitation?: {
17
+ [x: string]: unknown;
18
+ };
19
+ roots?: {
20
+ [x: string]: unknown;
21
+ listChanged?: boolean;
22
+ };
23
+ }
24
+
25
+ export interface StaticToolConfig {
26
+ description: string;
27
+ inputSchema: Record<string, any>;
28
+ outputSchema: Record<string, any>;
29
+ title?: string;
30
+ annotations?: {
31
+ title?: string;
32
+ readOnlyHint?: boolean;
33
+ destructiveHint?: boolean;
34
+ idempotentHint?: boolean;
35
+ openWorldHint?: boolean;
36
+ }
37
+ _meta?: Record<string, unknown>;
38
+ }
39
+
40
+ export interface StaticToolDefinition {
41
+ availability: "variable" | "constant";
42
+ name: string;
43
+ config: StaticToolConfig;
44
+ }
45
+
46
+ export interface StaticMethodToolConfig extends StaticToolDefinition {
47
+ interop: {
48
+ methodName: string;
49
+ responseTimeoutMs?: number;
50
+ allowedApplications?: string[]; // default: all applications allowed
51
+ }
52
+ }
53
+
54
+ // recommended input schema to have type: string, as this is passed as context.type
55
+ export interface StaticIntentToolConfig extends StaticToolDefinition {
56
+ interop: {
57
+ intentName: string;
58
+ responseTimeoutMs?: number;
59
+ resolutionStrategy?: "mcp" | "io_connect"; // default: mcp
60
+ allowedApplications?: string[]; // default: all applications allowed
61
+ }
62
+ }
63
+
64
+ export interface DynamicToolsConfig {
65
+ methods?: {
66
+ enabled?: boolean; // default: true
67
+ guard?(method: IOConnectBrowser.Interop.Method, server: IOConnectBrowser.Interop.Instance): boolean;
68
+ }
69
+ }
70
+
71
+ export interface StaticToolsConfig {
72
+ methods?: StaticMethodToolConfig[];
73
+ intents?: StaticIntentToolConfig[];
74
+ }
75
+
76
+ export interface SystemToolConfig {
77
+ searchApps?: {
78
+ enabled?: boolean; // default: true
79
+ overrides?: {
80
+ name?: string;
81
+ description?: string;
82
+ };
83
+ guard?(app: { name: string }): boolean;
84
+ };
85
+ searchWorkspaces?: {
86
+ enabled?: boolean; // default: true
87
+ overrides?: {
88
+ name?: string;
89
+ description?: string;
90
+ };
91
+ guard?(workspace: { name: string }): boolean;
92
+ };
93
+ startApps?: {
94
+ enabled?: boolean; // default: true
95
+ overrides?: {
96
+ name?: string;
97
+ description?: string;
98
+ }
99
+ };
100
+ startWorkspaces?: {
101
+ enabled?: boolean; // default: true
102
+ overrides?: {
103
+ name?: string;
104
+ description?: string;
105
+ }
106
+ };
107
+ }
108
+
109
+ export interface McpServerConfig {
110
+ name: string;
111
+ title?: string | undefined;
112
+ tools?: {
113
+ dynamic?: DynamicToolsConfig;
114
+ static?: StaticToolsConfig;
115
+ system?: SystemToolConfig;
116
+ }
117
+ }
118
+
119
+ export interface McpTransportConfig {
120
+ type: "stdio" | "http" | "web";
121
+ }
122
+
123
+ export interface WorkingContextConfig {
124
+ factory: IoIntelWorkingContextFactoryFunction;
125
+ config?: IoIntelWorkingContext.Config;
126
+ }
127
+
128
+ export interface MCPCore {
129
+ id: string;
130
+ instance: McpServer;
131
+ }
132
+
133
+ export interface Config {
134
+ server: McpServerConfig;
135
+ licenseKey: string;
136
+ transport: McpTransportConfig;
137
+ context?: WorkingContextConfig;
138
+ }
139
+
140
+ export interface API {
141
+ createMCPInstance(clientCapabilities: ClientCapabilities): MCPCore;
142
+ removeMCPInstance(id: string): void;
143
+ }
144
+ }
145
+
146
+ export type IoIntelMCPCoreFactoryFunction = (io: IOConnectBrowser.API | IOConnectDesktop.API, config: IoIntelMCPCore.Config) => Promise<IoIntelMCPCore.API>;
147
+
148
+ export declare const IoIntelMCPCoreFactory: IoIntelMCPCoreFactoryFunction;
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@interopio/mcp-core",
3
+ "version": "0.1.0-beta.0",
4
+ "type": "module",
5
+ "description": "io.Intelligence MCP Core Library",
6
+ "main": "./dist/mcp-core.umd.js",
7
+ "module": "./dist/mcp-core.es.js",
8
+ "types": "./mcp-core.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./mcp-core.d.ts",
12
+ "import": "./dist/mcp-core.es.js",
13
+ "require": "./dist/mcp-core.umd.js"
14
+ }
15
+ },
16
+ "scripts": {
17
+ "build": "rollup -c",
18
+ "build:docker": "rollup -c",
19
+ "version": "npm run build"
20
+ },
21
+ "dependencies": {
22
+ "@interopio/browser": "^4.0.0",
23
+ "@interopio/desktop": "^6.0.0",
24
+ "@interopio/intel-working-context": "^0.1.0-beta.0",
25
+ "@modelcontextprotocol/sdk": "^1.19.1"
26
+ },
27
+ "keywords": [
28
+ "ai",
29
+ "llm",
30
+ "agentic",
31
+ "copilot",
32
+ "assistant",
33
+ "io.Intelligence",
34
+ "io.connect",
35
+ "interop.io",
36
+ "io.connect browser",
37
+ "io.connect desktop",
38
+ "io.connect browser platform"
39
+ ],
40
+ "homepage": "https://interop.io/",
41
+ "author": {
42
+ "name": "Interop.IO",
43
+ "url": "https://interop.io/"
44
+ },
45
+ "publishConfig": {
46
+ "@interopio:registry": "https://registry.npmjs.org",
47
+ "access": "public"
48
+ },
49
+ "license": "MIT",
50
+ "gitHead": "c854d0327acdf587d4222a0c71f7a8869bbe4d22"
51
+ }