MCP-Use
by pietrozullo
MCP-Use is an open-source library that connects any LLM to MCP tools, enabling the creation of custom agents with tool access. It allows developers to easily integrate LLMs with tools like web browsing and file operations without relying on closed-source clients.
Last updated: N/A
What is MCP-Use?
MCP-Use is an open-source Python library that simplifies the integration of Large Language Models (LLMs) with MCP (Meta-Control Protocol) tools. It provides a flexible and easy-to-use framework for building custom agents that can leverage various tools and services, such as web browsing, file operations, and 3D modeling, through MCP servers.
How to use MCP-Use?
To use MCP-Use, install the library using pip (pip install mcp-use
). Then, configure an MCPClient with the desired MCP servers, either programmatically or through a configuration file. Create an LLM instance (e.g., using LangChain) and instantiate an MCPAgent with the LLM and MCPClient. Finally, call the agent.run()
method with a query to execute the agent.
Key features of MCP-Use
Ease of use: Create an MCP-capable agent with minimal code.
LLM Flexibility: Works with any LangChain-supported LLM that supports tool calling.
HTTP Support: Direct connection to MCP servers running on specific HTTP ports.
Multi-Server Support: Use multiple MCP servers simultaneously in a single agent.
Tool Restrictions: Restrict access to potentially dangerous tools.
Use cases of MCP-Use
Web Browsing with Playwright: Automate web browsing tasks using Playwright MCP.
Airbnb Search: Search for accommodations on Airbnb using the Airbnb MCP server.
Blender 3D Creation: Create 3D models in Blender using the Blender MCP server.
General Tool Integration: Connect to any MCP-compatible tool or service.
FAQ from MCP-Use
What is MCP?
What is MCP?
MCP stands for Meta-Control Protocol. It's a protocol that allows LLMs to interact with external tools and services.
Which LLMs are supported?
Which LLMs are supported?
MCP-Use supports any LLM that is compatible with LangChain and supports tool calling (function calling). Examples include OpenAI models, Anthropic models, and Groq models.
How do I configure MCP servers?
How do I configure MCP servers?
MCP servers can be configured programmatically or through a configuration file. The configuration includes the command to start the server and any necessary environment variables.
Can I use multiple MCP servers at once?
Can I use multiple MCP servers at once?
Yes, MCP-Use supports using multiple MCP servers simultaneously, allowing you to combine tools from different servers in a single agent.
How can I restrict access to certain tools?
How can I restrict access to certain tools?
You can restrict access to tools by providing a list of disallowed tools to the MCPAgent constructor.