mcp-ai-agent

MCP.Pizza Chef: fkesheh

mcp-ai-agent is a TypeScript client library that empowers AI agents to connect to and leverage MCP servers for enhanced AI capabilities. It integrates with the AI SDK to facilitate seamless tool discovery, usage, and orchestration across multiple MCP servers using various transport methods. The client supports agent composition, custom tool definitions, and auto-configuration, enabling developers to build sophisticated multi-agent AI workflows with ease.

Unmaintained · No commits in 13 months.

Use This MCP client To

Connect AI agents to multiple MCP servers via STDIO or SSE Automatically discover and invoke tools exposed by MCP servers Compose specialized AI agents and combine their capabilities Integrate MCP tools with custom tools in AI workflows Auto-initialize agents without manual setup calls Create named agents with descriptions for better management Enable agents to call other agents for task delegation Simplify multi-agent system management with default model support

README

MCP AI Agent

A TypeScript library that enables AI agents to leverage MCP (Model Context Protocol) servers for enhanced capabilities. This library integrates with the AI SDK to provide a seamless way to connect to MCP servers and use their tools in AI-powered applications.

Features

  • Connect to multiple MCP servers using different transport methods (STDIO, SSE)
  • Automatically discover and use tools from MCP servers
  • Integrate with AI SDK for text generation with tool usage
  • Filter and combine MCP tools with custom tools
  • Preconfigured servers for easy initialization
  • Auto-configuration support for simplified setup
  • Agents can call other agents for specific tasks
  • Agent composition - create specialized agents and combine them
  • Named agents with descriptions for improved identification
  • Auto-initialization of agents (no need to call initialize explicitly)
  • Custom tool definitions directly within agent configuration
  • Default model support to simplify multi-agent systems
  • System prompt integration for specialized behaviors
  • Verbose mode for debugging

Roadmap

  • Basic agent with MCP tools integration
  • Auto handled MCP servers
  • Multi-agent workflows
  • Function based tool handlers
  • Automatic Swagger/OpenAPI to tools conversion (stateless servers simple integration)
  • API Server implementation (call your agent on a server)
  • Observabilty system

Installation

npm install mcp-ai-agent

For a comprehensive example implementation, check out the mcp-ai-agent-example repository.

Minimal Example

Here's the most basic way to use AI Agent with preconfigured servers:

mcp-ai-agent FAQ

How does mcp-ai-agent connect to MCP servers?
It supports multiple transport methods including STDIO and Server-Sent Events (SSE) for flexible connectivity.
Can mcp-ai-agent use tools from multiple MCP servers simultaneously?
Yes, it can connect to and manage tools from multiple MCP servers at once.
Does mcp-ai-agent support custom tool definitions?
Yes, you can define custom tools directly within the agent configuration.
How does mcp-ai-agent simplify agent initialization?
It supports auto-initialization, so you don't need to call initialize explicitly.
Can agents created with mcp-ai-agent call other agents?
Yes, agents can delegate tasks by calling other agents for specific functions.
Is mcp-ai-agent integrated with any AI SDKs?
Yes, it integrates with AI SDKs to enable text generation combined with tool usage.
How does mcp-ai-agent handle multi-agent systems?
It provides default model support and agent composition features to manage complex multi-agent workflows.
What programming language is mcp-ai-agent written in?
It is a TypeScript library designed for modern JavaScript/TypeScript development environments.