-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed #14523 Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
- Loading branch information
1 parent
2078cdf
commit 4e5f65d
Showing
21 changed files
with
882 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
extends: [ | ||
'../../configs/build.eslintrc.json' | ||
], | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
project: 'tsconfig.json' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# Model Context Server (MCP) Integration | ||
|
||
The AI MCP package provides an integration that allows users to start and use MCP Servers to provide additional tool functions to LLMs, e.g. search or file access (outside of the workspace). | ||
|
||
## Features | ||
- Add MCP Servers via settings.json | ||
- Start and stop MCP servers. | ||
- Use tool functions provided by MCP servers in prompt templates | ||
|
||
## 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 Llamafile Language 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 Llamafile Language 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 | ||
|
||
Make sure to configure your MCP Servers properly within the preference settings. | ||
|
||
Example Configuration: | ||
|
||
```json | ||
{ | ||
"ai-features.mcp.mcpServers": { | ||
"memory": { | ||
"command": "npx", | ||
"args": [ | ||
"-y", | ||
"@modelcontextprotocol/server-memory" | ||
] | ||
}, | ||
"brave-search": { | ||
"command": "npx", | ||
"args": [ | ||
"-y", | ||
"@modelcontextprotocol/server-brave-search" | ||
], | ||
"env": { | ||
"BRAVE_API_KEY": "YOUR_API_KEY" | ||
} | ||
}, | ||
"filesystem": { | ||
"command": "npx", | ||
"args": [ | ||
"-y", | ||
"@modelcontextprotocol/server-filesystem", | ||
"ABSOLUTE_PATH_TO_ALLOWED_DIRECTORY", | ||
] | ||
}, | ||
} | ||
} | ||
``` | ||
|
||
Example prompt (for search) | ||
```md | ||
~{mcp_brave-search_brave_web_search} | ||
``` | ||
|
||
Example User query | ||
```md | ||
Search the internet for XYZ | ||
``` | ||
|
||
## More Information | ||
[List of available MCP servers](https://github.com/modelcontextprotocol/servers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "@theia/ai-mcp", | ||
"version": "1.56.0", | ||
"description": "Theia - MCP Integration", | ||
"dependencies": { | ||
"@theia/core": "1.56.0", | ||
"@theia/ai-core": "1.56.0", | ||
"@modelcontextprotocol/sdk": "1.0.1" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"theiaExtensions": [ | ||
{ | ||
"frontend": "lib/browser/ai-mcp-frontend-module", | ||
"backend": "lib/node/ai-mcp-backend-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.56.0" | ||
}, | ||
"nyc": { | ||
"extends": "../../configs/nyc.json" | ||
} | ||
} |
Oops, something went wrong.