multimodal/tarko/mcp-agent/README.md
An event-stream driven MCP Agent Framework for building effective multimodal Agents.
npm install @tarko/mcp-agent
import { MCPAgent } from '@tarko/mcp-agent';
const agent = new MCPAgent({
instructions: 'You are a helpful assistant.',
mcpServers: {
filesystem: {
command: 'npx',
args: ['@agent-infra/mcp-server-filesystem@latest'],
},
browser: {
command: 'npx',
args: ['@agent-infra/mcp-server-browser@latest'],
},
},
model: {
provider: 'openai',
model: 'gpt-4',
},
});
await agent.initialize();
const response = await agent.run('List files in current directory');
await agent.cleanup();
{
mcpServers: {
commands: {
command: 'npx',
args: ['-y', '@agent-infra/mcp-server-commands@latest'],
env: { NODE_ENV: 'production' }
}
}
}
{
mcpServers: {
remote: {
url: 'http://localhost:8089/sse'
}
}
}
const agent = new MCPAgent({
mcpServers: { /* all servers */ },
mcpServer: {
include: ['filesystem', 'browser'],
exclude: ['dangerous-server']
}
});
@agent-infra/mcp-server-filesystem - File operations@agent-infra/mcp-server-browser - Web automation@agent-infra/mcp-server-commands - Command execution@agent-infra/mcp-server-search - Search operations