MCP.so
Sign In

Unified MCP Client Library

@pietrozullo

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 without using closed-source or application clients.

How to use Unified MCP Client Library?

Install via pip (pip install mcp-use) and the appropriate LangChain provider package for your chosen LLM (e.g., pip install langchain-openai). Configure MCP servers in a JSON file or dictionary, then create an MCPAgent with your LLM and an MCPClient to run queries.

Key features of Unified MCP Client Library

  • Create your first agent in only six lines of code
  • Works with any LangChain-supported LLM that supports tool calling
  • Supports HTTP connections to MCP servers running on specific ports
  • Agents can dynamically select the best server for a task
  • Use multiple MCP servers simultaneously in a single agent
  • Restrict potentially dangerous tools like file system or network access

Use cases of Unified MCP Client Library

  • Web browsing and scraping using Playwright MCP server
  • Search and book accommodations via Airbnb MCP server
  • Create 3D models in Blender using Blender MCP server
  • Combine multiple server tools (e.g., web search + file ops) in a single workflow

FAQ from Unified MCP Client Library

What is Unified MCP Client Library and how does it differ from closed-source clients?

It is an open-source Python library that lets any LLM use MCP tools, without relying on proprietary clients. Developers can build and customize agents with full control.

Which LLMs are supported?

Any LLM that supports tool calling and is integrated with LangChain, such as OpenAI, Anthropic, Groq, and Llama. Install the corresponding LangChain provider package.

Does it support HTTP-based MCP servers?

Yes. You can connect to MCP servers running on specific HTTP ports by providing a url field in the server configuration (e.g., "url": "http://localhost:8931/sse").

Can I restrict which tools the agent can use?

Yes. The library includes tool restriction features to limit access to dangerous capabilities like file system or network operations.

How do I manage multiple MCP servers?

Use the MCPClient with a configuration file listing all servers. The agent can access tools from all servers, and you can optionally enable dynamic server selection (use_server_manager=True) or specify a server name per task.

Comments

More Agent Frameworks MCP clients