mcp-ts.
1. Install
2. Server-Side Setup (Next.js)
Create an API route atapp/api/mcp/route.ts to handle MCP connections.
3. Client-Side Setup
Use theuseMcp hook in your React component to connect and call tools.
4. Environment Variables
By default,mcp-ts uses in-memory storage. For persistence, add a backend like Redis:
Next Steps
- Integrate with AI SDK
- Configure Production Storage
- Explore the API Reference