What is MCP?
MCP uses a client-server architecture that allows AI applications to securely access external resources:- MCP Servers: Provide tools, data sources, and prompt templates
- MCP Clients: AI applications that consume these resources (like AG-Kit Agents)
Use Cases
1. Connect to Existing Tool Ecosystems
Many development tools and services already provide MCP servers that you can use directly in AG-Kit:- Playwright Mcp: Playwright MCP server
- CloudBase AI ToolKit: One-stop backend services for WeChat Mini-Programs and full-stack apps
- Context7: Code documentation for LLMs and AI code editors
2. Expose AG-Kit Tools
Wrap your AG-Kit tools as MCP servers for use by other AI applications:- Internal Tool Sharing: Reuse tools across teams
- Cross-Platform Integration: Interoperate with other AI frameworks
- Service Deployment: Provide tools as standalone services
Quick Start
Using External MCP Tools
The most common scenario is connecting to existing MCP servers to access their tools:Exposing AG-Kit Tools
Expose your AG-Kit tools as an MCP server:Connection Types
Standard Input/Output (Stdio)
The most common connection type, suitable for local tools and command-line programs:HTTP Connection
Suitable for remote services and web applications:Memory Connection
Used for testing and in-process communication:Real-World Examples
Multi-Server Integration
In real projects, you may need to connect multiple MCP servers to gain different capabilities:Error Handling and Monitoring
Production environments require comprehensive error handling and monitoring:Next Steps
Need Advanced Features?This guide covers basic MCP integration. For production features like connection pooling, retry policies, event monitoring, schema transformation, and performance optimization, see the complete MCP reference.
Complete MCP Reference
Advanced features, MCPClientManager, and production configuration
Built-in Toolkits
Discover pre-built toolkit collections for common use cases
Function Tools
Learn how to create custom tools from TypeScript functions
MCP Server Registry
Discover available MCP servers from the community