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
Tester Client for Model Context Protocol (MCP)
apifyModel Context Protocol (MCP) Client for Apify's Actors
MCP Tool Langgraph Integration
paulrobelloMCP Tools Langraph Integration
Evo AI - AI Agents Platform
evolutionapiEvo AI is an open-source platform for creating and managing AI agents, enabling integration with different AI models and services.
Saiki
truffle-aiA customizable, general purpose AI Agent that supports MCP. Talk to Saiki in natural language to control computers, applications and more!
Nerve
evilsocketThe Simple Agent Development Kit.
Comments