plugin-comput3ai-mcp
This plugin offers AI-related functionalities using TypeScript. It includes tools that assist in building machine learning models and data processing. Users can easily integrate AI capabilities into their applications, enhancing development efficiency.
GitHub Stars
1
User Rating
Not Rated
Favorites
0
Views
23
Forks
1
Issues
0
Comput3AI MCP Plugin
A powerful integration plugin that bridges ElizaOS with the Model Context Protocol (MCP), enabling your AI agents to harness multiple MCP servers for enhanced capabilities.
π Overview
The Model Context Protocol (MCP) is a revolutionary open protocol that creates a seamless bridge between Large Language Models (LLMs) and external resources. It standardizes how AI applications interact with external data and tools, making integration simple and efficient.
β¨ Key Features
This plugin supercharges your ElizaOS agents by providing access to multiple MCP servers, each offering unique capabilities:
- Smart Resources: Access and utilize contextual data and information
- Dynamic Prompts: Leverage templated messages and workflows
- Powerful Tools: Execute sophisticated functions and operations
π Getting Started
create an account on
https://comput3.ai/
top up your account and launch gpus
get your eliza agent on
git clone https://github.com/elizaos/eliza-starter.git
cd eliza-starter
cp .env.example .env
pnpm i && pnpm build && pnpm start
add compute3 configurations to the .env file.
OPENAI_API_KEY=c3_api_key
OPENAI_API_URL=https://api.comput3.ai/v1
SMALL_OPENAI_MODEL=hermes3:70b
MEDIUM_OPENAI_MODEL=hermes3:70b
LARGE_OPENAI_MODEL=hermes3:70b
To integrate this plugin into your ElizaOS project:
π¦ Installation
Install the plugin in your ElizaOS project:
packages/
ββplugin-comput3ai-mcp/ # Your plugin directory
βββ package.json
βββ tsconfig.json
βββ src/
β βββ index.ts # Main plugin entry
β βββ actions/ # Custom actions
β βββ providers/ # Data providers
β βββ types.ts # Type definitions
β βββ environment.ts # Configuration
- Clone the repository:
cd packages
git clone github:comput3ai/plugin-comput3ai-mcp
- npm
npm install @compute3ai/plugin-compute3ai-mcp
- pnpm
pnpm install @compute3ai/plugin-compute3ai-mcp
- yarn
yarn add @compute3ai/plugin-compute3ai-mcp
- bun
bun add @compute3ai/plugin-compute3ai-mcp
π Usage
1.deploy and mcp server
examples can be found here https://github.com/modelcontextprotocol/servers/
or you can use https://n8n.io/
- Add the plugin to your character configuration:
{
"name": "Your Character",
"plugins": ["@compute3ai/plugin-compute3ai-mcp"],
"settings": {
"mcp": {
"servers": {
"n8n": {
"name": "n8n",
"type": "sse",
"command": "npx",
"args": [
"-y",
"supergateway",
"--sse",
"https://comput3ai.app.n8n.cloud/mcp/tutorial/sse"],
"url": "https://comput3ai.app.n8n.cloud/mcp/tutorial/sse",
"timeout": 10000,
"interval": 10000,
"max_retries": 3,
"retry_delay": 1000
}
}
},
}
}
βοΈ Configuration Options
MCP supports two types of servers: "stdio" and "sse". Each type has its own configuration options.
Common Options
Option | Type | Description |
---|---|---|
type |
string | The type of MCP server: "stdio" or "sse" |
name |
string | The display name of the server |
timeout |
number | Timeout in seconds for tool calls (default: 60) |
disabled |
boolean | Whether the server is disabled |
stdio Server Options
Option | Type | Description |
---|---|---|
command |
string | The command to run the MCP server |
args |
string[] | Command-line arguments for the server |
env |
object | Environment variables to pass to the server |
cwd |
string | Optional Working directory to run the server in |
sse Server Options
Option | Type | Description |
---|---|---|
url |
string | The URL of the SSE endpoint |
π οΈ Using MCP Capabilities
Once configured, the plugin automatically exposes MCP servers' capabilities to your agent:
Context Providers
The plugin includes three providers that add MCP capabilities to the agent's context:
MCP_SERVERS
: Lists available servers and their tools, resources and prompts
π Plugin Flow
The following diagram illustrates the MCP plugin's flow for tool selection and execution:
graph TD
%% Starting point - User request
start[User Request] --> action[CALL_TOOL Action]
%% MCP Server Validation
action --> check{MCP Servers Available?}
check -->|No| fail[Return No Tools Available]
%% Tool Selection Flow
check -->|Yes| state[Get MCP Provider Data]
state --> prompt[Create Tool Selection Prompt]
%% First Model Use - Tool Selection
prompt --> model1[Use Compute3ai for Tool Selection]
model1 --> parse[Parse Selection]
parse --> retry{Valid Selection?}
%% Second Model Use - Retry Selection
retry -->|No| feedback[Generate Feedback]
feedback --> model2[Use Compute3ai for Retry]
model2 --> parse
%% Tool Selection Result
retry -->|Yes| toolAvailable{Tool Available?}
toolAvailable -->|No| fallback[Fallback Response]
%% Tool Execution Flow
toolAvailable -->|Yes| callTool[Call MCP Tool]
callTool --> processResult[Process Tool Result]
%% Memory Creation
processResult --> createMemory[Create Memory Record]
createMemory --> reasoningPrompt[Create Reasoning Prompt]
%% Third Model Use - Response Generation
reasoningPrompt --> model3[Use Compute3ai for Response]
model3 --> respondToUser[Send Response to User]
%% Styling
classDef model fill:#ffa500,stroke:#333,stroke-width:2px;
classDef decision fill:#bbf,stroke:#333,stroke-width:2px;
classDef output fill:#bfb,stroke:#333,stroke-width:2px;
class model1,model2,model3 model;
class check,retry,toolAvailable decision;
class respondToUser,fallback output;
π Example: Setting Up Multiple MCP Servers
Here's a complete example configuration with multiple MCP servers of both types:
{
"name": "Developer Assistant",
"plugins": ["@elizaos/plugin-mcp", "other-plugins"],
"settings": {
"mcp": {
"servers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
}
},
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
},
"google-maps": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-google-maps"],
"env": {
"GOOGLE_MAPS_API_KEY": "<YOUR_API_KEY>"
}
}
},
"maxRetries": 2
}
}
}
π Security Considerations
Please be aware that MCP servers can execute arbitrary code, so only connect to servers you trust.
π Troubleshooting
If you encounter issues with the MCP plugin:
- Check that your MCP servers are correctly configured and running
- Ensure the commands are accessible in the ElizaOS environment
- Review the logs for connection errors
- Verify that the plugin is properly loaded in your character configuration