Unified MCP Client Library
@mcp-use
About Unified MCP Client Library
mcp-use is the easiest way to interact with mcp servers with custom agents
Overview
What is Unified MCP Client Library?
Unified MCP Client Library (mcp-use) is an open-source Python library that connects any LLM to any MCP server, enabling developers to build custom agents with tool access. It runs on any platform supporting Python and is designed for developers who want to integrate MCP tools without proprietary clients.
How to use Unified MCP Client Library?
Install the library with pip install mcp-use and the appropriate LangChain provider for your LLM (e.g., langchain-openai). Configure MCP servers via a JSON configuration file or dictionary, create an MCPClient and MCPAgent, then run queries asynchronously. See the README for a six-line starter example.
Key features of Unified MCP Client Library
- Connect any LangChain-compatible LLM with tool-calling support
- Support for multiple MCP servers in a single agent
- Dynamic server selection based on task requirements
- HTTP connection support for MCP servers
- Tool access restriction for safety
- Asynchronous streaming of agent output
- Interactive code builder for exploring MCP capabilities
- Custom agent creation via LangChain adapter or new adapters
Use cases of Unified MCP Client Library
- Web browsing and automation using Playwright MCP server
- Travel planning with Airbnb MCP server and natural language queries
- 3D scene creation in Blender via MCP tool calls
- Building custom agents that combine file operations, network access, and other MCP tools
- Real-time applications like chatbots and dashboards using streaming
FAQ from Unified MCP Client Library
Which LLMs are supported?
Any LLM from LangChain that supports function/tool calling, such as OpenAI (GPT-4o), Anthropic (Claude 3.5 Sonnet), Groq (Llama 3), and others.
How do I install the library?
Run pip install mcp-use from PyPI, or clone the repository and install from source using pip install -e ..
Does the library support streaming?
Yes. Use the astream method on MCPAgent to receive incremental results, tool actions, and intermediate steps asynchronously.
Can I restrict which tools the agent can use?
Yes. The “Tool Restrictions” feature allows you to block potentially dangerous tools like file system or network access.
What are the system requirements?
Only Python 3.x (version shown as 3.8+ likely) and an LLM provider’s API key. The library works cross-platform.
Basic information
More Agent Frameworks MCP clients
MCP REST API and CLI Client
rakesh-eltropychatmcp
daodao97ChatMCP is an AI chat client implementing the Model Context Protocol (MCP).
Where On-Device and Cloud LLMs Meet
hazyresearchBig & Small LLMs working together
MCP Tool Langgraph Integration
paulrobelloMCP Tools Langraph Integration
mcp-cli
wong2A CLI inspector for the Model Context Protocol
Comments