deploy: current vibn theia state
Some checks failed
Playwright Tests / Playwright Tests (ubuntu-22.04, Node.js 22.x) (push) Has been cancelled
3PP License Check / 3PP License Check (11, 22.x, ubuntu-22.04) (push) Has been cancelled
Publish packages to NPM / Perform Publishing (push) Has been cancelled

Made-with: Cursor
This commit is contained in:
2026-02-27 12:01:08 -08:00
commit 8bb5110148
3782 changed files with 640947 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: [
'../../configs/build.eslintrc.json'
],
parserOptions: {
tsconfigRootDir: __dirname,
project: 'tsconfig.json'
}
};

View File

@@ -0,0 +1,78 @@
<div align='center'>
<br />
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
<h2>ECLIPSE THEIA - AI MCP UI EXTENSION</h2>
<hr />
</div>
## Description
The Model Context Server (MCP) UI Integration package provides the UI for users to start and use MCP servers
### Features
- Start and stop MCP servers.
- Provide preference schema for autocomplete etc. in preferences
### Commands
#### Start MCP Server
- **Command ID:** `mcp.startserver`
- **Label:** `MCP: Start MCP Server`
- **Functionality:** Allows you to start a MCP server by selecting from a list of configured servers.
#### Stop MCP Server
- **Command ID:** `mcp.stopserver`
- **Label:** `MCP: Stop MCP Server`
- **Functionality:** Allows you to stop a running MCP server by selecting from a list of currently running servers.
### Usage
1. **Starting a MCP Server:**
- Use the command palette to invoke `MCP: Start MCP Server`.
- A quick pick menu will appear with a list of configured MCP servers.
- Select a server to start.
2. **Stopping a MCP Server:**
- Use the command palette to invoke `MCP: Stop MCP Server`.
- A quick pick menu will display a list of currently running MCP servers.
- Select a server to stop.
3. **Using provided tool functions**
- Only functions of started MCP servers can be used
- Open a prompt template and add the added tool functions
- Type '~{' to open the auto completion
### Configuration
To configure MCP servers, open the preferences and add entries to the `MCP Servers Configuration` section.
See the Theia MCP package (`@theia/ai-mcp`) README for more information.
### More Information
[Theia AI MCP README](https://github.com/eclipse-theia/theia/tree/master/packages/ai-mcp)
[User documentation on MCP in the Theia IDE](https://theia-ide.org/docs/user_ai/#mcp-integration)
[List of available MCP servers](https://github.com/modelcontextprotocol/servers)
## Additional Information
- [API documentation for `@theia/mcp-ui`](https://eclipse-theia.github.io/theia/docs/next/modules/_theia_ai-mcp-ui.html)
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
- [Theia - Website](https://theia-ide.org/)
## License
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
- [GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
## Trademark
"Theia" is a trademark of the Eclipse Foundation
<https://www.eclipse.org/theia>

View File

@@ -0,0 +1,48 @@
{
"name": "@theia/ai-mcp-ui",
"version": "1.68.0",
"description": "Theia - MCP UI Integration",
"dependencies": {
"@theia/ai-core": "1.68.0",
"@theia/ai-mcp": "1.68.0",
"@theia/core": "1.68.0"
},
"publishConfig": {
"access": "public"
},
"theiaExtensions": [
{
"frontend": "lib/browser/mcp-ui-frontend-module"
}
],
"keywords": [
"theia-extension"
],
"license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
"repository": {
"type": "git",
"url": "https://github.com/eclipse-theia/theia.git"
},
"bugs": {
"url": "https://github.com/eclipse-theia/theia/issues"
},
"homepage": "https://github.com/eclipse-theia/theia",
"files": [
"lib",
"src"
],
"scripts": {
"build": "theiaext build",
"clean": "theiaext clean",
"compile": "theiaext compile",
"lint": "theiaext lint",
"test": "theiaext test",
"watch": "theiaext watch"
},
"devDependencies": {
"@theia/ext-scripts": "1.68.0"
},
"nyc": {
"extends": "../../configs/nyc.json"
}
}

View File

@@ -0,0 +1,120 @@
// *****************************************************************************
// Copyright (C) 2024 EclipseSource GmbH.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// http://www.eclipse.org/legal/epl-2.0.
//
// This Source Code may also be made available under the following Secondary
// Licenses when the conditions for such availability set forth in the Eclipse
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
// with the GNU Classpath Exception which is available at
// https://www.gnu.org/software/classpath/license.html.
//
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
// *****************************************************************************
import { AICommandHandlerFactory } from '@theia/ai-core/lib/browser/ai-command-handler-factory';
import { CommandContribution, CommandRegistry, MessageService, nls } from '@theia/core';
import { QuickInputService } from '@theia/core/lib/browser';
import { inject, injectable } from '@theia/core/shared/inversify';
import { MCPFrontendService, MCPServerStatus } from '@theia/ai-mcp';
export const StartMCPServer = {
id: 'mcp.startserver',
label: nls.localize('theia/ai/mcp/start/label', 'MCP: Start MCP Server'),
};
export const StopMCPServer = {
id: 'mcp.stopserver',
label: nls.localize('theia/ai/mcp/stop/label', 'MCP: Stop MCP Server'),
};
@injectable()
export class MCPCommandContribution implements CommandContribution {
@inject(AICommandHandlerFactory)
protected readonly commandHandlerFactory: AICommandHandlerFactory;
@inject(QuickInputService)
protected readonly quickInputService: QuickInputService;
@inject(MessageService)
protected messageService: MessageService;
@inject(MCPFrontendService)
protected readonly mcpFrontendService: MCPFrontendService;
private async getMCPServerSelection(serverNames: string[]): Promise<string | undefined> {
if (!serverNames || serverNames.length === 0) {
return undefined;
}
const options = serverNames.map(mcpServerName => ({ label: mcpServerName }));
const result = await this.quickInputService.showQuickPick(options);
return result?.label;
}
registerCommands(commandRegistry: CommandRegistry): void {
commandRegistry.registerCommand(StopMCPServer, this.commandHandlerFactory({
execute: async () => {
try {
const startedServers = await this.mcpFrontendService.getStartedServers();
if (!startedServers || startedServers.length === 0) {
this.messageService.error(nls.localize('theia/ai/mcp/error/noRunningServers', 'No MCP servers running.'));
return;
}
const selection = await this.getMCPServerSelection(startedServers);
if (!selection) {
return;
}
await this.mcpFrontendService.stopServer(selection);
} catch (error) {
console.error('Error while stopping MCP server:', error);
}
}
}));
commandRegistry.registerCommand(StartMCPServer, this.commandHandlerFactory({
execute: async () => {
try {
const servers = await this.mcpFrontendService.getServerNames();
const startedServers = await this.mcpFrontendService.getStartedServers();
const startableServers = servers.filter(server => !startedServers.includes(server));
if (!startableServers || startableServers.length === 0) {
if (startedServers && startedServers.length > 0) {
this.messageService.error(nls.localize('theia/ai/mcp/error/allServersRunning', 'All MCP servers are already running.'));
} else {
this.messageService.error(nls.localize('theia/ai/mcp/error/noServersConfigured', 'No MCP servers configured.'));
}
return;
}
const selection = await this.getMCPServerSelection(startableServers);
if (!selection) {
return;
}
await this.mcpFrontendService.startServer(selection);
const serverDescription = await this.mcpFrontendService.getServerDescription(selection);
if (serverDescription && serverDescription.status) {
if (serverDescription.status === MCPServerStatus.Running
|| serverDescription.status === MCPServerStatus.Connected) {
let toolNames: string | undefined = undefined;
if (serverDescription.tools) {
toolNames = serverDescription.tools.map(tool => tool.name).join(',');
}
this.messageService.info(
nls.localize('theia/ai/mcp/info/serverStarted', 'MCP server "{0}" successfully started. Registered tools: {1}', selection, toolNames ||
nls.localize('theia/ai/mcp/tool/noTools', 'No tools available.'))
);
return;
}
if (serverDescription.error) {
console.error('Error while starting MCP server:', serverDescription.error);
}
}
this.messageService.error(nls.localize('theia/ai/mcp/error/startFailed', 'An error occurred while starting the MCP server.'));
} catch (error) {
this.messageService.error(nls.localize('theia/ai/mcp/error/startFailed', 'An error occurred while starting the MCP server.'));
console.error('Error while starting MCP server:', error);
}
}
}));
}
}

View File

@@ -0,0 +1,26 @@
// *****************************************************************************
// Copyright (C) 2024 EclipseSource GmbH.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// http://www.eclipse.org/legal/epl-2.0.
//
// This Source Code may also be made available under the following Secondary
// Licenses when the conditions for such availability set forth in the Eclipse
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
// with the GNU Classpath Exception which is available at
// https://www.gnu.org/software/classpath/license.html.
//
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
// *****************************************************************************
import { CommandContribution } from '@theia/core';
import { ContainerModule } from '@theia/core/shared/inversify';
import { MCPCommandContribution } from './mcp-command-contribution';
import { PreferenceContribution } from '@theia/core/lib/common';
import { McpServersPreferenceSchema } from '@theia/ai-mcp/lib/common/mcp-preferences';
export default new ContainerModule(bind => {
bind(PreferenceContribution).toConstantValue({ schema: McpServersPreferenceSchema });
bind(CommandContribution).to(MCPCommandContribution);
});

View File

@@ -0,0 +1,28 @@
// *****************************************************************************
// Copyright (C) 2025 EclipseSource GmbH and others.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// http://www.eclipse.org/legal/epl-2.0.
//
// This Source Code may also be made available under the following Secondary
// Licenses when the conditions for such availability set forth in the Eclipse
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
// with the GNU Classpath Exception which is available at
// https://www.gnu.org/software/classpath/license.html.
//
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
// *****************************************************************************
/* note: this bogus test file is required so that
we are able to run mocha unit tests on this
package, without having any actual unit tests in it.
This way a coverage report will be generated,
showing 0% coverage, instead of no report.
This file can be removed once we have real unit
tests in place. */
describe('ai-mcp-ui package', () => {
it('support code coverage statistics', () => true);
});

View File

@@ -0,0 +1,22 @@
{
"extends": "../../configs/base.tsconfig",
"compilerOptions": {
"composite": true,
"rootDir": "src",
"outDir": "lib"
},
"include": [
"src"
],
"references": [
{
"path": "../ai-core"
},
{
"path": "../ai-mcp.disabled"
},
{
"path": "../core"
}
]
}