Home / Servers

@theia/ai-mcp-server

by eclipse-theia

<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 SERVER EXTENSION</h2> <hr /> </div>

Description

This package provides Model Context Protocol (MCP) server functionality for Theia, enabling AI tools to access Theia services and workspace information.

Features

  • HTTP Transport: RESTful HTTP API for MCP communication using the StreamableHTTPServerTransport
  • Backend MCP Contributions: Register backend-only tools, resources, and prompts
  • Frontend MCP Contributions: Register frontend-only tools, resources, and prompts that can access frontend services
  • Frontend-Backend Delegation: Allows frontend contributions to be exposed through the backend MCP server

Development Setup

Starting the MCP Server

  1. Start Theia application
  2. The MCP server will automatically start and be available at /mcp e.g. http://localhost:3000/mcp

API Endpoints

  • POST /mcp - MCP protocol endpoint (for all MCP protocol operations)

Architecture

The MCP server architecture consists of:

  1. HTTP Transport Layer: Manages HTTP connections using StreamableHTTPServerTransport
  2. MCP Server: Core server implementation that handles MCP protocol messages
  3. Backend Contributions: Extensions that run on the Node.js backend
  4. Frontend Contributions: Extensions that run in the browser frontend
  5. Frontend-Backend Bridge: RPC mechanism to connect frontend and backend

Creating Backend Contributions

Backend contributions run in the Node.js backend and have access to backend services:

@injectable()
export class MyBackendContribution implements MCPBackendContribution {
    @inject(ILogger)
    protected readonly logger: ILogger;
    
    async configure(server: McpServer): Promise<void> {
        // Register a tool
        server.tool('my-backend-tool', {
            type: 'object',
            properties: {
                input: { type: 'string' }
            }
        }, async (args) => {
            this.logger.info('my-backend-tool called with args:', args);
            return {
                content: [{ type: 'text', text: 'Result from backend' }]
            };
        });
        
        // Register a resource
        server.resource(
            'my-resource',
            'theia://resource-uri',
            async (uri) => {
                return {
                    content: 'Resource content'
                };
            }
        );
        
        // Register a prompt
        server.prompt(
            'my-prompt',
            'Prompt description',
            {}, // Arguments schema
            async (args) => {
                return {
                    messages: [{
                        role: 'user',
                        content: { type: 'text', text: 'Prompt content' }
                    }]
                };
            }
        );
    }
}

Register the contribution in your backend module:

bind(MyBackendContribution).toSelf().inSingletonScope();
bind(MCPBackendContribution).toService(MyBackendContribution);

Creating Frontend Contributions

Frontend contributions run in the browser and have access to frontend services:

@injectable()
export class MyFrontendContribution implements MCPFrontendContribution {
    @inject(WorkspaceService)
    protected readonly workspaceService: WorkspaceService;
    
    async getTools(): Promise<Tool[]> {
        return [{
            name: 'workspace-info',
            description: 'Get workspace info',
            inputSchema: {
                type: 'object',
                properties: {}
            }
        }];
    }
    
    async getTool(name: string): Promise<ToolProvider | undefined> {
        if (name === 'workspace-info') {
            return {
                handler: async () => {
                    const roots 

Related servers

n8n

by n8n-io

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

NOASSERTION198,904

@modelcontextprotocol/server-everything

Official

by modelcontextprotocol

MCP server that exercises all the features of the MCP protocol

89,105

@modelcontextprotocol/server-filesystem

Official

by modelcontextprotocol

MCP server for filesystem access

SEE LICENSE IN LICENSE89,105

mcp-server-fetch

Official

by modelcontextprotocol

A Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs

89,105