CopilotKit/mcp-client-langgraph
A LangGraph agent that connects to MCP (Multi-Copilot Platform) servers and calls their tools, coupled with a frontend application using CopilotKit for UI and state synchronization.
Key Features:
- LangGraph Agent: Integrates with MCP servers, enabling access to a variety of tools.
- CopilotKit UI: Provides a user-friendly interface for interacting with the agent.
- State Synchronization: Ensures seamless state management between the frontend and backend.
- Modular Architecture: Code is factored into
/agent
(LangGraph agent) and/app
(frontend application) for better organization.
Use Cases:
- Building interactive applications that leverage multiple copilot services.
- Creating custom agents with access to specialized tools.
- Developing user interfaces for managing and monitoring copilot interactions.
Development Setup:
- Set up environment variables in
.env
files for both the root and/agent
directories, includingLANGSMITH_API_KEY
andOPENAI_API_KEY
. - Run the frontend and agent separately for easier debugging:
# Terminal 1 - Frontend
pnpm run dev-frontend
Terminal 2 - Agent
pnpm run dev-agent
3. Alternatively, run both services together:
```shell
pnpm run dev
- Access the application at
http://localhost:3000
.