@theia/ai-mcp-server 1.67.0-next.13 → 1.67.0-next.56

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.
Files changed (62) hide show
  1. package/README.md +37 -9
  2. package/package.json +4 -4
  3. package/lib/browser/index.d.ts +0 -3
  4. package/lib/browser/index.d.ts.map +0 -1
  5. package/lib/browser/index.js +0 -21
  6. package/lib/browser/index.js.map +0 -1
  7. package/lib/browser/mcp-frontend-bootstrap.d.ts +0 -17
  8. package/lib/browser/mcp-frontend-bootstrap.d.ts.map +0 -1
  9. package/lib/browser/mcp-frontend-bootstrap.js +0 -47
  10. package/lib/browser/mcp-frontend-bootstrap.js.map +0 -1
  11. package/lib/browser/mcp-frontend-contribution.d.ts +0 -44
  12. package/lib/browser/mcp-frontend-contribution.d.ts.map +0 -1
  13. package/lib/browser/mcp-frontend-contribution.js +0 -21
  14. package/lib/browser/mcp-frontend-contribution.js.map +0 -1
  15. package/lib/browser/mcp-frontend-module.d.ts +0 -4
  16. package/lib/browser/mcp-frontend-module.d.ts.map +0 -1
  17. package/lib/browser/mcp-frontend-module.js +0 -37
  18. package/lib/browser/mcp-frontend-module.js.map +0 -1
  19. package/lib/browser/mcp-tool-delegate-client.d.ts +0 -27
  20. package/lib/browser/mcp-tool-delegate-client.d.ts.map +0 -1
  21. package/lib/browser/mcp-tool-delegate-client.js +0 -128
  22. package/lib/browser/mcp-tool-delegate-client.js.map +0 -1
  23. package/lib/common/index.d.ts +0 -2
  24. package/lib/common/index.d.ts.map +0 -1
  25. package/lib/common/index.js +0 -20
  26. package/lib/common/index.js.map +0 -1
  27. package/lib/common/mcp-tool-delegate.d.ts +0 -25
  28. package/lib/common/mcp-tool-delegate.d.ts.map +0 -1
  29. package/lib/common/mcp-tool-delegate.js +0 -22
  30. package/lib/common/mcp-tool-delegate.js.map +0 -1
  31. package/lib/node/index.d.ts +0 -5
  32. package/lib/node/index.d.ts.map +0 -1
  33. package/lib/node/index.js +0 -23
  34. package/lib/node/index.js.map +0 -1
  35. package/lib/node/mcp-backend-contribution-manager.d.ts +0 -16
  36. package/lib/node/mcp-backend-contribution-manager.d.ts.map +0 -1
  37. package/lib/node/mcp-backend-contribution-manager.js +0 -61
  38. package/lib/node/mcp-backend-contribution-manager.js.map +0 -1
  39. package/lib/node/mcp-backend-module.d.ts +0 -4
  40. package/lib/node/mcp-backend-module.d.ts.map +0 -1
  41. package/lib/node/mcp-backend-module.js +0 -56
  42. package/lib/node/mcp-backend-module.js.map +0 -1
  43. package/lib/node/mcp-frontend-contribution-manager.d.ts +0 -55
  44. package/lib/node/mcp-frontend-contribution-manager.d.ts.map +0 -1
  45. package/lib/node/mcp-frontend-contribution-manager.js +0 -242
  46. package/lib/node/mcp-frontend-contribution-manager.js.map +0 -1
  47. package/lib/node/mcp-theia-server-impl.d.ts +0 -32
  48. package/lib/node/mcp-theia-server-impl.d.ts.map +0 -1
  49. package/lib/node/mcp-theia-server-impl.js +0 -220
  50. package/lib/node/mcp-theia-server-impl.js.map +0 -1
  51. package/lib/node/mcp-theia-server.d.ts +0 -43
  52. package/lib/node/mcp-theia-server.d.ts.map +0 -1
  53. package/lib/node/mcp-theia-server.js +0 -22
  54. package/lib/node/mcp-theia-server.js.map +0 -1
  55. package/lib/node/mcp-tool-frontend-delegate.d.ts +0 -13
  56. package/lib/node/mcp-tool-frontend-delegate.d.ts.map +0 -1
  57. package/lib/node/mcp-tool-frontend-delegate.js +0 -66
  58. package/lib/node/mcp-tool-frontend-delegate.js.map +0 -1
  59. package/lib/package.spec.d.ts +0 -1
  60. package/lib/package.spec.d.ts.map +0 -1
  61. package/lib/package.spec.js +0 -26
  62. package/lib/package.spec.js.map +0 -1
package/README.md CHANGED
@@ -1,26 +1,38 @@
1
- # Theia AI MCP Server
1
+ <div align='center'>
2
+
3
+ <br />
4
+
5
+ <img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
6
+
7
+ <h2>ECLIPSE THEIA - AI MCP SERVER EXTENSION</h2>
8
+
9
+ <hr />
10
+
11
+ </div>
12
+
13
+ ## Description
2
14
 
3
15
  This package provides Model Context Protocol (MCP) server functionality for Theia, enabling AI tools to access Theia services and workspace information.
4
16
 
5
- ## Features
17
+ ### Features
6
18
 
7
19
  - **HTTP Transport**: RESTful HTTP API for MCP communication using the StreamableHTTPServerTransport
8
20
  - **Backend MCP Contributions**: Register backend-only tools, resources, and prompts
9
21
  - **Frontend MCP Contributions**: Register frontend-only tools, resources, and prompts that can access frontend services
10
22
  - **Frontend-Backend Delegation**: Allows frontend contributions to be exposed through the backend MCP server
11
23
 
12
- ## Development Setup
24
+ ### Development Setup
13
25
 
14
- ### Starting the MCP Server
26
+ #### Starting the MCP Server
15
27
 
16
28
  1. Start Theia application
17
29
  2. The MCP server will automatically start and be available at `/mcp` e.g. `http://localhost:3000/mcp`
18
30
 
19
- ## API Endpoints
31
+ ### API Endpoints
20
32
 
21
33
  - `POST /mcp` - MCP protocol endpoint (for all MCP protocol operations)
22
34
 
23
- ## Architecture
35
+ ### Architecture
24
36
 
25
37
  The MCP server architecture consists of:
26
38
 
@@ -30,7 +42,7 @@ The MCP server architecture consists of:
30
42
  4. **Frontend Contributions**: Extensions that run in the browser frontend
31
43
  5. **Frontend-Backend Bridge**: RPC mechanism to connect frontend and backend
32
44
 
33
- ## Creating Backend Contributions
45
+ ### Creating Backend Contributions
34
46
 
35
47
  Backend contributions run in the Node.js backend and have access to backend services:
36
48
 
@@ -90,7 +102,7 @@ bind(MyBackendContribution).toSelf().inSingletonScope();
90
102
  bind(MCPBackendContribution).toService(MyBackendContribution);
91
103
  ```
92
104
 
93
- ## Creating Frontend Contributions
105
+ ### Creating Frontend Contributions
94
106
 
95
107
  Frontend contributions run in the browser and have access to frontend services:
96
108
 
@@ -167,9 +179,25 @@ bind(MyFrontendContribution).toSelf().inSingletonScope();
167
179
  bind(MCPFrontendContribution).toService(MyFrontendContribution);
168
180
  ```
169
181
 
170
- ## Security Considerations
182
+ ### Security Considerations
171
183
 
172
184
  - The MCP server exposes Theia functionality over HTTP
173
185
  - Only enable the server in trusted environments
174
186
  - Consider adding authentication and authorization for production use
175
187
  - Restrict access to sensitive operations in your contributions
188
+
189
+ ## Additional Information
190
+
191
+ - [API documentation for `@theia/ai-mcp-server`](https://eclipse-theia.github.io/theia/docs/next/modules/_theia_ai-mcp-server.html)
192
+ - [Theia - GitHub](https://github.com/eclipse-theia/theia)
193
+ - [Theia - Website](https://theia-ide.org/)
194
+
195
+ ## License
196
+
197
+ - [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
198
+ - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
199
+
200
+ ## Trademark
201
+
202
+ "Theia" is a trademark of the Eclipse Foundation
203
+ <https://www.eclipse.org/theia>
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@theia/ai-mcp-server",
3
- "version": "1.67.0-next.13+c409d5d18",
3
+ "version": "1.67.0-next.56+d8f18cc386c",
4
4
  "description": "Theia - MCP Server",
5
5
  "dependencies": {
6
6
  "@modelcontextprotocol/sdk": "^1.15.1",
7
- "@theia/core": "1.67.0-next.13+c409d5d18",
8
- "@theia/workspace": "1.67.0-next.13+c409d5d18",
7
+ "@theia/core": "1.67.0-next.56+d8f18cc386c",
8
+ "@theia/workspace": "1.67.0-next.56+d8f18cc386c",
9
9
  "zod": "^3.23.8"
10
10
  },
11
11
  "publishConfig": {
@@ -48,5 +48,5 @@
48
48
  "nyc": {
49
49
  "extends": "../../configs/nyc.json"
50
50
  },
51
- "gitHead": "c409d5d18d8c4f5a722f87b37ea9d6fd5af47ea8"
51
+ "gitHead": "d8f18cc386c45a736cd193d42eab02c8f64c6b10"
52
52
  }
@@ -1,3 +0,0 @@
1
- export * from './mcp-frontend-bootstrap';
2
- export * from './mcp-frontend-contribution';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAgBA,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC"}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 EclipseSource.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const tslib_1 = require("tslib");
19
- tslib_1.__exportStar(require("./mcp-frontend-bootstrap"), exports);
20
- tslib_1.__exportStar(require("./mcp-frontend-contribution"), exports);
21
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oCAAoC;AACpC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,mEAAyC;AACzC,sEAA4C"}
@@ -1,17 +0,0 @@
1
- import { MaybePromise } from '@theia/core';
2
- import { FrontendApplication, FrontendApplicationContribution } from '@theia/core/lib/browser';
3
- import { ILogger } from '@theia/core/lib/common/logger';
4
- import { MCPToolFrontendDelegate } from '../common/mcp-tool-delegate';
5
- /**
6
- * Bootstraps MCP frontend components during application startup.
7
- *
8
- * This contribution ensures that the MCPToolFrontendDelegate is properly instantiated
9
- * and available in the dependency injection container when the frontend application starts.
10
- * It acts as a lightweight initializer to activate MCP functionality in the browser.
11
- */
12
- export declare class MCPFrontendBootstrap implements FrontendApplicationContribution {
13
- protected readonly frontendDelegate: MCPToolFrontendDelegate;
14
- protected readonly logger: ILogger;
15
- onStart(_app: FrontendApplication): MaybePromise<void>;
16
- }
17
- //# sourceMappingURL=mcp-frontend-bootstrap.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-frontend-bootstrap.d.ts","sourceRoot":"","sources":["../../src/browser/mcp-frontend-bootstrap.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAC/F,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE;;;;;;GAMG;AACH,qBACa,oBAAqB,YAAW,+BAA+B;IAGxE,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,uBAAuB,CAAC;IAG7D,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEnC,OAAO,CAAC,IAAI,EAAE,mBAAmB,GAAG,YAAY,CAAC,IAAI,CAAC;CAIzD"}
@@ -1,47 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 EclipseSource.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.MCPFrontendBootstrap = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const logger_1 = require("@theia/core/lib/common/logger");
22
- const mcp_tool_delegate_1 = require("../common/mcp-tool-delegate");
23
- /**
24
- * Bootstraps MCP frontend components during application startup.
25
- *
26
- * This contribution ensures that the MCPToolFrontendDelegate is properly instantiated
27
- * and available in the dependency injection container when the frontend application starts.
28
- * It acts as a lightweight initializer to activate MCP functionality in the browser.
29
- */
30
- let MCPFrontendBootstrap = class MCPFrontendBootstrap {
31
- onStart(_app) {
32
- this.logger.debug('MCPFrontendBootstrap initialized');
33
- }
34
- };
35
- exports.MCPFrontendBootstrap = MCPFrontendBootstrap;
36
- tslib_1.__decorate([
37
- (0, inversify_1.inject)(mcp_tool_delegate_1.MCPToolFrontendDelegate),
38
- tslib_1.__metadata("design:type", Object)
39
- ], MCPFrontendBootstrap.prototype, "frontendDelegate", void 0);
40
- tslib_1.__decorate([
41
- (0, inversify_1.inject)(logger_1.ILogger),
42
- tslib_1.__metadata("design:type", Object)
43
- ], MCPFrontendBootstrap.prototype, "logger", void 0);
44
- exports.MCPFrontendBootstrap = MCPFrontendBootstrap = tslib_1.__decorate([
45
- (0, inversify_1.injectable)()
46
- ], MCPFrontendBootstrap);
47
- //# sourceMappingURL=mcp-frontend-bootstrap.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-frontend-bootstrap.js","sourceRoot":"","sources":["../../src/browser/mcp-frontend-bootstrap.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oCAAoC;AACpC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAkE;AAGlE,0DAAwD;AACxD,mEAAsE;AAEtE;;;;;;GAMG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAQ7B,OAAO,CAAC,IAAyB;QAC7B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;IAC1D,CAAC;CAEJ,CAAA;AAZY,oDAAoB;AAGV;IADlB,IAAA,kBAAM,EAAC,2CAAuB,CAAC;;8DAC6B;AAG1C;IADlB,IAAA,kBAAM,EAAC,gBAAO,CAAC;;oDACmB;+BAN1B,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAYhC"}
@@ -1,44 +0,0 @@
1
- import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
2
- import { Tool, Resource, Prompt, PromptMessage } from '@modelcontextprotocol/sdk/types';
3
- import { z } from 'zod';
4
- export declare const MCPFrontendContribution: unique symbol;
5
- /**
6
- * Tool provider interface for frontend contributions
7
- */
8
- export interface ToolProvider {
9
- handler: (args: unknown) => Promise<unknown>;
10
- inputSchema: z.ZodSchema;
11
- }
12
- /**
13
- * Contribution interface for extending the MCP server with frontend-only tools, resources, and prompts
14
- */
15
- export interface MCPFrontendContribution {
16
- /**
17
- * Get tools provided by this contribution
18
- */
19
- getTools?(): Promise<Tool[]> | Tool[];
20
- /**
21
- * Get specific tool by name
22
- */
23
- getTool?(name: string): Promise<ToolProvider | undefined> | ToolProvider | undefined;
24
- /**
25
- * Get resources provided by this contribution
26
- */
27
- getResources?(): Promise<Resource[]> | Resource[];
28
- /**
29
- * Read specific resource by URI
30
- */
31
- readResource?(uri: string): Promise<unknown> | unknown;
32
- /**
33
- * Get prompts provided by this contribution
34
- */
35
- getPrompts?(): Promise<Prompt[]> | Prompt[];
36
- /**
37
- * Get specific prompt by name with arguments
38
- */
39
- getPrompt?(name: string, args: unknown): Promise<PromptMessage[]> | PromptMessage[];
40
- }
41
- export declare const MCPFrontendContributionProvider: unique symbol;
42
- export interface MCPFrontendContributionProvider extends ContributionProvider<MCPFrontendContribution> {
43
- }
44
- //# sourceMappingURL=mcp-frontend-contribution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-frontend-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/mcp-frontend-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB,eAAoC,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC;;OAEG;IACH,QAAQ,CAAC,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC;IAEtC;;OAEG;IACH,OAAO,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,GAAG,YAAY,GAAG,SAAS,CAAC;IAErF;;OAEG;IACH,YAAY,CAAC,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC;IAElD;;OAEG;IACH,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAEvD;;OAEG;IACH,UAAU,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC;IAE5C;;OAEG;IACH,SAAS,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,GAAG,aAAa,EAAE,CAAC;CACvF;AAED,eAAO,MAAM,+BAA+B,eAA4C,CAAC;AACzF,MAAM,WAAW,+BAAgC,SAAQ,oBAAoB,CAAC,uBAAuB,CAAC;CAAI"}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 EclipseSource.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.MCPFrontendContributionProvider = exports.MCPFrontendContribution = void 0;
19
- exports.MCPFrontendContribution = Symbol('MCPFrontendContribution');
20
- exports.MCPFrontendContributionProvider = Symbol('MCPFrontendContributionProvider');
21
- //# sourceMappingURL=mcp-frontend-contribution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-frontend-contribution.js","sourceRoot":"","sources":["../../src/browser/mcp-frontend-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oCAAoC;AACpC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAMnE,QAAA,uBAAuB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;AA6C5D,QAAA,+BAA+B,GAAG,MAAM,CAAC,iCAAiC,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- import { ContainerModule } from '@theia/core/shared/inversify';
2
- declare const _default: ContainerModule;
3
- export default _default;
4
- //# sourceMappingURL=mcp-frontend-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/mcp-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AAY/D,wBAaG"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 EclipseSource.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const inversify_1 = require("@theia/core/shared/inversify");
19
- const core_1 = require("@theia/core");
20
- const browser_1 = require("@theia/core/lib/browser");
21
- const service_connection_provider_1 = require("@theia/core/lib/browser/messaging/service-connection-provider");
22
- const mcp_tool_delegate_1 = require("../common/mcp-tool-delegate");
23
- const mcp_frontend_bootstrap_1 = require("./mcp-frontend-bootstrap");
24
- const mcp_frontend_contribution_1 = require("./mcp-frontend-contribution");
25
- const mcp_tool_delegate_client_1 = require("./mcp-tool-delegate-client");
26
- exports.default = new inversify_1.ContainerModule(bind => {
27
- bind(mcp_frontend_bootstrap_1.MCPFrontendBootstrap).toSelf().inSingletonScope();
28
- bind(browser_1.FrontendApplicationContribution).toService(mcp_frontend_bootstrap_1.MCPFrontendBootstrap);
29
- bind(mcp_tool_delegate_1.MCPToolDelegateClient).to(mcp_tool_delegate_client_1.MCPToolDelegateClientImpl).inSingletonScope();
30
- bind(mcp_tool_delegate_1.MCPToolFrontendDelegate).toDynamicValue(ctx => {
31
- const connection = ctx.container.get(service_connection_provider_1.RemoteConnectionProvider);
32
- const client = ctx.container.get(mcp_tool_delegate_1.MCPToolDelegateClient);
33
- return connection.createProxy(mcp_tool_delegate_1.mcpToolDelegatePath, client);
34
- }).inSingletonScope();
35
- (0, core_1.bindContributionProvider)(bind, mcp_frontend_contribution_1.MCPFrontendContribution);
36
- });
37
- //# sourceMappingURL=mcp-frontend-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-frontend-module.js","sourceRoot":"","sources":["../../src/browser/mcp-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oCAAoC;AACpC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,4DAA+D;AAC/D,sCAAuD;AACvD,qDAA0E;AAC1E,+GAGuE;AACvE,mEAAkH;AAClH,qEAAgE;AAChE,2EAAsE;AACtE,yEAAuE;AAEvE,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAI,CAAC,6CAAoB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACvD,IAAI,CAAC,yCAA+B,CAAC,CAAC,SAAS,CAAC,6CAAoB,CAAC,CAAC;IAEtE,IAAI,CAAC,yCAAqB,CAAC,CAAC,EAAE,CAAC,oDAAyB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAE7E,IAAI,CAAC,2CAAuB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;QAC/C,MAAM,UAAU,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAA4B,sDAAwB,CAAC,CAAC;QAC1F,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAwB,yCAAqB,CAAC,CAAC;QAC/E,OAAO,UAAU,CAAC,WAAW,CAA0B,uCAAmB,EAAE,MAAM,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAEtB,IAAA,+BAAwB,EAAC,IAAI,EAAE,mDAAuB,CAAC,CAAC;AAC5D,CAAC,CAAC,CAAC"}
@@ -1,27 +0,0 @@
1
- import { ContributionProvider } from '@theia/core';
2
- import { ILogger } from '@theia/core/lib/common/logger';
3
- import { Tool, Resource, ResourceContents, Prompt, PromptMessage } from '@modelcontextprotocol/sdk/types';
4
- import { MCPToolDelegateClient } from '../common/mcp-tool-delegate';
5
- import { MCPFrontendContribution } from './mcp-frontend-contribution';
6
- /**
7
- * Frontend client implementation that handles MCP tool delegation requests from the backend.
8
- *
9
- * This class acts as a bridge between the backend MCP server and frontend contributions,
10
- * forwarding backend requests (tool calls, resource access, prompts) to registered
11
- * MCPFrontendContribution instances and aggregating their responses.
12
- *
13
- * Called by the backend via the MCPToolDelegateClient interface to access frontend-provided
14
- * MCP tools, resources, and prompts.
15
- */
16
- export declare class MCPToolDelegateClientImpl implements MCPToolDelegateClient {
17
- protected readonly contributions: ContributionProvider<MCPFrontendContribution>;
18
- protected readonly logger: ILogger;
19
- private getFrontendContributions;
20
- callTool(serverId: string, toolName: string, args: unknown): Promise<unknown>;
21
- listTools(serverId: string): Promise<Tool[]>;
22
- listResources(serverId: string): Promise<Resource[]>;
23
- readResource(serverId: string, uri: string): Promise<ResourceContents>;
24
- listPrompts(serverId: string): Promise<Prompt[]>;
25
- getPrompt(serverId: string, name: string, args: unknown): Promise<PromptMessage[]>;
26
- }
27
- //# sourceMappingURL=mcp-tool-delegate-client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-tool-delegate-client.d.ts","sourceRoot":"","sources":["../../src/browser/mcp-tool-delegate-client.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE;;;;;;;;;GASG;AACH,qBACa,yBAA0B,YAAW,qBAAqB;IAInE,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,oBAAoB,CAAC,uBAAuB,CAAC,CAAC;IAGhF,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEnC,OAAO,CAAC,wBAAwB;IAI1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAc7E,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAa5C,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAapD,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAiBtE,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAahD,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;CAe3F"}
@@ -1,128 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 EclipseSource.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.MCPToolDelegateClientImpl = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const core_1 = require("@theia/core");
22
- const logger_1 = require("@theia/core/lib/common/logger");
23
- const mcp_frontend_contribution_1 = require("./mcp-frontend-contribution");
24
- /**
25
- * Frontend client implementation that handles MCP tool delegation requests from the backend.
26
- *
27
- * This class acts as a bridge between the backend MCP server and frontend contributions,
28
- * forwarding backend requests (tool calls, resource access, prompts) to registered
29
- * MCPFrontendContribution instances and aggregating their responses.
30
- *
31
- * Called by the backend via the MCPToolDelegateClient interface to access frontend-provided
32
- * MCP tools, resources, and prompts.
33
- */
34
- let MCPToolDelegateClientImpl = class MCPToolDelegateClientImpl {
35
- getFrontendContributions() {
36
- return this.contributions.getContributions();
37
- }
38
- async callTool(serverId, toolName, args) {
39
- const contributions = this.getFrontendContributions();
40
- for (const contribution of contributions) {
41
- if (contribution.getTool) {
42
- const tool = await contribution.getTool(toolName);
43
- if (tool) {
44
- return await tool.handler(JSON.stringify(args));
45
- }
46
- }
47
- }
48
- throw new Error(`Tool ${toolName} not found in server ${serverId}`);
49
- }
50
- async listTools(serverId) {
51
- const contributions = this.getFrontendContributions();
52
- const allTools = [];
53
- for (const contribution of contributions) {
54
- if (contribution.getTools) {
55
- const tools = await contribution.getTools();
56
- allTools.push(...tools);
57
- }
58
- }
59
- return allTools;
60
- }
61
- async listResources(serverId) {
62
- const contributions = this.getFrontendContributions();
63
- const allResources = [];
64
- for (const contribution of contributions) {
65
- if (contribution.getResources) {
66
- const resources = await contribution.getResources();
67
- allResources.push(...resources);
68
- }
69
- }
70
- return allResources;
71
- }
72
- async readResource(serverId, uri) {
73
- const contributions = this.getFrontendContributions();
74
- for (const contribution of contributions) {
75
- if (contribution.readResource) {
76
- try {
77
- const result = await contribution.readResource(uri);
78
- return result;
79
- }
80
- catch (error) {
81
- // Continue to next contribution
82
- this.logger.debug(`Error getting resource ${uri}:`, error);
83
- }
84
- }
85
- }
86
- throw new Error(`Resource ${uri} not found in server ${serverId}`);
87
- }
88
- async listPrompts(serverId) {
89
- const contributions = this.getFrontendContributions();
90
- const allPrompts = [];
91
- for (const contribution of contributions) {
92
- if (contribution.getPrompts) {
93
- const prompts = await contribution.getPrompts();
94
- allPrompts.push(...prompts);
95
- }
96
- }
97
- return allPrompts;
98
- }
99
- async getPrompt(serverId, name, args) {
100
- const contributions = this.getFrontendContributions();
101
- for (const contribution of contributions) {
102
- if (contribution.getPrompt) {
103
- try {
104
- return await contribution.getPrompt(name, args);
105
- }
106
- catch (error) {
107
- // Continue to next contribution
108
- this.logger.debug(`Error getting prompt ${name}:`, error);
109
- }
110
- }
111
- }
112
- throw new Error(`Prompt ${name} not found in server ${serverId}`);
113
- }
114
- };
115
- exports.MCPToolDelegateClientImpl = MCPToolDelegateClientImpl;
116
- tslib_1.__decorate([
117
- (0, inversify_1.inject)(core_1.ContributionProvider),
118
- (0, inversify_1.named)(mcp_frontend_contribution_1.MCPFrontendContribution),
119
- tslib_1.__metadata("design:type", Object)
120
- ], MCPToolDelegateClientImpl.prototype, "contributions", void 0);
121
- tslib_1.__decorate([
122
- (0, inversify_1.inject)(logger_1.ILogger),
123
- tslib_1.__metadata("design:type", Object)
124
- ], MCPToolDelegateClientImpl.prototype, "logger", void 0);
125
- exports.MCPToolDelegateClientImpl = MCPToolDelegateClientImpl = tslib_1.__decorate([
126
- (0, inversify_1.injectable)()
127
- ], MCPToolDelegateClientImpl);
128
- //# sourceMappingURL=mcp-tool-delegate-client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-tool-delegate-client.js","sourceRoot":"","sources":["../../src/browser/mcp-tool-delegate-client.ts"],"names":[],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- export * from './mcp-tool-delegate';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAgBA,cAAc,qBAAqB,CAAC"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 EclipseSource.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const tslib_1 = require("tslib");
19
- tslib_1.__exportStar(require("./mcp-tool-delegate"), exports);
20
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oCAAoC;AACpC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,8DAAoC"}
@@ -1,25 +0,0 @@
1
- import type { Tool, Resource, ResourceContents, Prompt, PromptMessage } from '@modelcontextprotocol/sdk/types';
2
- export declare const MCPToolDelegateClient: unique symbol;
3
- /**
4
- * Client interface for MCP tool operations.
5
- * This interface is implemented by the frontend and called by the backend.
6
- */
7
- export interface MCPToolDelegateClient {
8
- callTool(serverId: string, toolName: string, args: unknown): Promise<unknown>;
9
- listTools(serverId: string): Promise<Tool[]>;
10
- listResources(serverId: string): Promise<Resource[]>;
11
- readResource(serverId: string, uri: string): Promise<ResourceContents>;
12
- listPrompts(serverId: string): Promise<Prompt[]>;
13
- getPrompt(serverId: string, name: string, args: unknown): Promise<PromptMessage[]>;
14
- }
15
- export declare const MCPToolFrontendDelegate: unique symbol;
16
- /**
17
- * Backend delegate interface for MCP tool operations.
18
- * This interface extends MCPToolDelegateClient with RPC client setup capability.
19
- * It is implemented by the backend and acts as a proxy to forward calls to the frontend.
20
- */
21
- export interface MCPToolFrontendDelegate extends MCPToolDelegateClient {
22
- setClient(client: MCPToolDelegateClient): void;
23
- }
24
- export declare const mcpToolDelegatePath = "/services/mcpToolDelegate";
25
- //# sourceMappingURL=mcp-tool-delegate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-tool-delegate.d.ts","sourceRoot":"","sources":["../../src/common/mcp-tool-delegate.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAE/G,eAAO,MAAM,qBAAqB,eAAkC,CAAC;AACrE;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9E,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7C,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrD,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACvE,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACjD,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;CACtF;AAED,eAAO,MAAM,uBAAuB,eAAoC,CAAC;AACzE;;;;GAIG;AACH,MAAM,WAAW,uBAAwB,SAAQ,qBAAqB;IAClE,SAAS,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAAC;CAClD;AAED,eAAO,MAAM,mBAAmB,8BAA8B,CAAC"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 EclipseSource.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.mcpToolDelegatePath = exports.MCPToolFrontendDelegate = exports.MCPToolDelegateClient = void 0;
19
- exports.MCPToolDelegateClient = Symbol('MCPToolDelegateClient');
20
- exports.MCPToolFrontendDelegate = Symbol('MCPToolFrontendDelegate');
21
- exports.mcpToolDelegatePath = '/services/mcpToolDelegate';
22
- //# sourceMappingURL=mcp-tool-delegate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-tool-delegate.js","sourceRoot":"","sources":["../../src/common/mcp-tool-delegate.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oCAAoC;AACpC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAInE,QAAA,qBAAqB,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC;AAcxD,QAAA,uBAAuB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;AAU5D,QAAA,mBAAmB,GAAG,2BAA2B,CAAC"}
@@ -1,5 +0,0 @@
1
- export * from './mcp-theia-server';
2
- export * from './mcp-theia-server-impl';
3
- export * from './mcp-backend-contribution-manager';
4
- export * from './mcp-frontend-contribution-manager';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAgBA,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC"}