Show HN: Mcp-use – Connect any LLM to any MCP

https://news.ycombinator.com/rss Hits: 20
Summary

Connect any LLM to any MCP server 🌐 MCP-Use is the open source way to connect any LLM to any MCP server and build custom MCP agents that have tool access, without using closed source or application clients. 💡 Let developers easily connect any LLM to tools like web browsing, file operations, and more. If you want to get started quickly check out mcp-use.com website to build and deploy agents with your favorite MCP servers. Visit the mcp-use docs to get started with mcp-use library For the TypeScript version, visit mcp-use-ts Supports Primitives Transports Features Quick start With pip: pip install mcp-use Or install from source: git clone https://github.com/pietrozullo/mcp-use.git cd mcp-use pip install -e . Installing LangChain Providers mcp_use works with various LLM providers through LangChain. You'll need to install the appropriate LangChain provider package for your chosen LLM. For example: # For OpenAI pip install langchain-openai # For Anthropic pip install langchain-anthropic For other providers, check the LangChain chat models documentation and add your API keys for the provider you want to use to your .env file. OPENAI_API_KEY= ANTHROPIC_API_KEY= Important: Only models with tool calling capabilities can be used with mcp_use. Make sure your chosen model supports function calling or tool use. Spin up your agent: import asyncio import os from dotenv import load_dotenv from langchain_openai import ChatOpenAI from mcp_use import MCPAgent , MCPClient async def main (): # Load environment variables load_dotenv () # Create configuration dictionary config = { "mcpServers" : { "playwright" : { "command" : "npx" , "args" : [ "@playwright/mcp@latest" ], "env" : { "DISPLAY" : ":1" } } } } # Create MCPClient from configuration dictionary client = MCPClient . from_dict ( config ) # Create LLM llm = ChatOpenAI ( model = "gpt-4o" ) # Create agent with the client agent = MCPAgent ( llm = llm , client = client , max_steps = 30 ) # Run the query result = await agent . run ( "F...

First seen: 2025-07-31 19:00

Last seen: 2025-08-01 14:06