Overview
mcp-use is a comprehensive full-stack framework for building Model Context Protocol applications and servers. It supports both Python and TypeScript, providing tools to create MCP Apps for ChatGPT and Claude, as well as MCP Servers for AI Agents.
Framework Components
MCP Apps
- Build interactive apps for ChatGPT and Claude
- Rich UI components and widgets
- Real-time updates
- User interaction handling
- State management
MCP Servers
- Create servers for AI agents
- Built-in agent capabilities
- Tool and resource management
- Protocol compliance
- Transport handling
Dual Language Support
- Python: Full-featured Python implementation
- TypeScript: Complete TypeScript support
- Shared protocol definitions
- Cross-language compatibility
Features
Application Development
- Pre-built UI components
- Form builders
- Data visualization
- Real-time updates
- Responsive design
Server Development
- Tool definition helpers
- Resource management
- Prompt templates
- Sampling capabilities
- Error handling
Agent Integration
- Built-in agent patterns
- Multi-agent coordination
- State persistence
- Event handling
- Workflow management
Rich UI Components
- Forms and inputs
- Tables and grids
- Charts and graphs
- Modal dialogs
- Notifications
Use Cases
- Building interactive MCP applications
- Creating custom MCP servers
- Developing AI agent systems
- Multi-agent workflows
- Enterprise MCP deployments
- Prototype to production
- Cross-platform MCP tools
Python Implementation
from mcp_use import MCPServer, tool
server = MCPServer("my-server")
@tool()
def my_tool(param: str) -> str:
return f"Result: {param}"
TypeScript Implementation
import { MCPServer, tool } from 'mcp-use';
const server = new MCPServer('my-server');
tool('my-tool', (param: string) => {
return `Result: ${param}`;
});
Advanced Features
App Builder
- Drag-and-drop interface
- Component library
- Theme customization
- Layout management
Server Templates
- Quick start templates
- Common patterns
- Best practices
- Example implementations
- Hot reload
- Debugging support
- Testing utilities
- Documentation generator
Deployment
- Local development server
- Production deployment
- Docker containers
- Cloud platforms
- Edge deployment
Technical Architecture
Python Stack
- FastAPI for HTTP
- Pydantic for validation
- AsyncIO for concurrency
TypeScript Stack
- Express for HTTP
- Zod for validation
- Promise-based async
Integration
Built-in support for:
- ChatGPT
- Claude (Anthropic)
- Custom MCP clients
- Agent frameworks
- Active development
- Regular updates
- Example projects
- Documentation
- Community support