Build and deploy
MCP Agents
Open-source SDKs and infratructure for MCP that developers love.
Or use our open source libraries
Library used by devs from
The stack for MCP development
Build, preview, ship, iterate with mcp-use.
1class MCPClient:2def __init__(self):3# Initialize session and client objects4self.session: Optional[ClientSession] = None5self.exit_stack = AsyncExitStack()6self.anthropic = Anthropic()7# methods will go here89async def connect_to_server(self, server_script_path: str):10is_python = server_script_path.endswith('.py')11is_js = server_script_path.endswith('.js')12if not (is_python or is_js):13raise ValueError("Server script must be a .py or .js file")1415command = "python" if is_python else "node"16server_params = StdioServerParameters(17command=command,18args=[server_script_path],19env=None20)2122stdio_transport = await self.exit_stack.enter_async_context(stdio_client(server_params))23self.stdio, self.write = stdio_transport24self.session = await self.exit_stack.enter_async_context(ClientSession(self.stdio, self.write))2526await self.session.initialize()2728# List available tools29response = await self.session.list_tools()30tools = response.tools31print("\nConnected to server with tools:", [tool.name for tool in tools])32async def process_query(self, query: str) -> str:33"""Process a query using Claude and available tools"""34messages = [35{36"role": "user",37"content": query38}39]4041response = await self.session.list_tools()42available_tools = [{43"name": tool.name,44"description": tool.description,45"input_schema": tool.inputSchema46} for tool in response.tools]4748# Initial Claude API call49response = self.anthropic.messages.create(50model="claude-3-5-sonnet-20241022",51max_tokens=1000,52messages=messages,53tools=available_tools54)5556# Process response and handle tool calls57final_text = []5859assistant_message_content = []60for content in response.content:61if content.type == 'text':62final_text.append(content.text)63assistant_message_content.append(content)64elif content.type == 'tool_use':65tool_name = content.name66tool_args = content.input6768# Execute tool call69result = await self.session.call_tool(tool_name, tool_args)70final_text.append(f"[Calling tool {tool_name} with args {tool_args}]")7172assistant_message_content.append(content)73messages.append({74"role": "assistant",75"content": assistant_message_content76})77messages.append({78"role": "user",79"content": [80{81"type": "tool_result",82"tool_use_id": content.id,83"content": result.content84}85]86})8788# Get next response from Claude89response = self.anthropic.messages.create(90model="claude-3-5-sonnet-20241022",91max_tokens=1000,92messages=messages,93tools=available_tools94)9596final_text.append(response.content[0].text)9798return "\n".join(final_text)
1# Connect to remote server pool2client = MCPClient(server_pool="marketing_servers")3# Use any model you like4llm = AnyModelProvider(model="any-4o", api_key=...)5# Create agent with tools6agent = MCPAgent(llm=llm, client=client, max_steps=30)7# Run the query8result = await agent.run("Create a post about our latest release")
Full-Stack MCP Framework
- •MCP Agent 6 Lines of Code: That's all it takes to spin up a tool-using agent in Python or TypeScript.
- •MCP Apps in ChatGPT: Render interactive UI components directly in chat clients like ChatGPT.
- •MCP Server: Scaffold a production-ready server instantly and take inspo from templates.
Iterate with inspector
- •Built-in Debugger: Every server launches with a visual Inspector to test tools, edit prompts, and view resources in your browser.
- •Real-time Traffic: View raw JSON-RPC messages to see exactly what the LLM sent and what your tool returned.
- •Sandbox Testing: Validate tool execution safely before connecting to a live agent.
Your MCP servers
Managed or self-hosted
mcp-use hosting
Server deploy and agent runtime
- •Deploy MCP Servers with GitHub App: Install our GitHub App to automatically build and deploy your server on every push.
- •Isolated Scaling: Scale horizontally to handle thousands of concurrent users and prevet race conditions.
- •Agent Persistent Context: Agents usually forget everything. Ours do not. The runtime maintains state and memory across sessions without needing an external database.
Control Plane for MCP
- •Observability & Learning: See how users interact with your MCP servers. Analyze requests and let agents retain skills over time.
- •Auth & Access Control: Security is built-in. Use role-based controls and profiles to manage permissions across employees/clients/environments.
- •Centralized Config: Manage all configurations from one dashboard and import them directly via the SDK.
The control plane for MCP
Need to run on your stack? Deploy to your existing infrastructure.
Prefer a managed solution? Use mcp-use Cloud for zero setup and overheads.
pip install mcp-usenpx create-mcp-use-appAnything you do with a web app
you can do with mcp-use
Start building with mcp-use and see how we can help you.


Developers love
Thousands of dev-teams are building with mcp-use
Been thinking about trying your @mcpuse today when I started building a ChatGPT app, but wasn't sure if it's the right use case. Now I assume it is 🙂

Great addition to the generic MCP Client collection.

Infra isn't just plumbing. It's distribution. Examples: AgentMail: inboxes for agents, mcp-use: MCP infra, DeepAware: RL for data center ops. Whoever owns the rails agents use to talk to the outside world ends up with Twilio-style power.

mcp-use is by far the best Python framework for building an agent MCP. It's so easy to set up an agent connected to MCP servers through the command line, that way I can quickly iterate on my MCP servers and test. Most people are using MCP servers in chat clients like Cursor / Claude Code, but MCP server use by agents will explode in the near future. I think it's important to test your server in an agent environment, and mcp-use provides that.

MCP-Use is the open source way to connect any LLM to any MCP server and build custom agents that have tool access, without using closed source or application clients.

that's why we love open-source! @NASA is building an agent with MCP using our library @mcpuse 🚀

Been thinking about trying your @mcpuse today when I started building a ChatGPT app, but wasn't sure if it's the right use case. Now I assume it is 🙂

Great addition to the generic MCP Client collection.

Infra isn't just plumbing. It's distribution. Examples: AgentMail: inboxes for agents, mcp-use: MCP infra, DeepAware: RL for data center ops. Whoever owns the rails agents use to talk to the outside world ends up with Twilio-style power.

mcp-use is by far the best Python framework for building an agent MCP. It's so easy to set up an agent connected to MCP servers through the command line, that way I can quickly iterate on my MCP servers and test. Most people are using MCP servers in chat clients like Cursor / Claude Code, but MCP server use by agents will explode in the near future. I think it's important to test your server in an agent environment, and mcp-use provides that.

MCP-Use is the open source way to connect any LLM to any MCP server and build custom agents that have tool access, without using closed source or application clients.

that's why we love open-source! @NASA is building an agent with MCP using our library @mcpuse 🚀

Awesome to see mcp-use support MCP-UI! We're aligning on the open spec with OAI and others to make sure the entire community benefits from complete compatibility

mcp-use is really into something good here.

mcp-use (@mcpuse) is building open-source dev tools and infrastructure for MCP to help dev teams quickly build and deploy custom AI agents with MCP servers.

awesome to see @mcpuse on product hunt today! for everyone needing to build with or around MCP! and yes, we'll do a small hack night with them next week to put that to the test as well 😉

MCP evals is here in @deepeval, metric name taken from @mcpuse 👀

🚀 @mcpuse launched! Open source infrastructure and dev tools for MCP agents: "Spin-up and aggregate MCP servers through a single endpoint and zero friction."

Awesome to see mcp-use support MCP-UI! We're aligning on the open spec with OAI and others to make sure the entire community benefits from complete compatibility

mcp-use is really into something good here.

mcp-use (@mcpuse) is building open-source dev tools and infrastructure for MCP to help dev teams quickly build and deploy custom AI agents with MCP servers.

awesome to see @mcpuse on product hunt today! for everyone needing to build with or around MCP! and yes, we'll do a small hack night with them next week to put that to the test as well 😉

MCP evals is here in @deepeval, metric name taken from @mcpuse 👀

🚀 @mcpuse launched! Open source infrastructure and dev tools for MCP agents: "Spin-up and aggregate MCP servers through a single endpoint and zero friction."

Really sharp execution, mcp-use nails the 'Vercel for MCP' play. Love how you've stripped deployment and aggregation down to a single endpoint with zero friction. Crypto infra teams, onchain data providers, and AI-powered DeFi dashboards could slot this in to speed up agent builds massively.

🦜🤖 MCP-Use Tools - Just launched: An open-source library that connects any LLM to MCP tools for custom agents, featuring seamless integration with LangChain and support for web browsing, Airbnb search, and 3D modeling capabilities.

<60s to deploy your ChatGPT App 🤯 With mcp-use creating your own app takes less than a minute. 1. npx create-mcp-use-app 2. Edit your react widgets 3. yarn deploy. Done! You can now connect your mcp server to ChatGPT and start chatting.

We implemented Code Mode in mcp-use's MCPClient . All you need to do is define which servers you want your agent to use, enable code mode, and you're done! The client will expose two tools: - One that allows the agent to progressively discover which servers and tools are available - One that allows the agent to execute code in an environment where the MCP servers are available as Python modules (SDKs)

Really sharp execution, mcp-use nails the 'Vercel for MCP' play. Love how you've stripped deployment and aggregation down to a single endpoint with zero friction. Crypto infra teams, onchain data providers, and AI-powered DeFi dashboards could slot this in to speed up agent builds massively.

🦜🤖 MCP-Use Tools - Just launched: An open-source library that connects any LLM to MCP tools for custom agents, featuring seamless integration with LangChain and support for web browsing, Airbnb search, and 3D modeling capabilities.

<60s to deploy your ChatGPT App 🤯 With mcp-use creating your own app takes less than a minute. 1. npx create-mcp-use-app 2. Edit your react widgets 3. yarn deploy. Done! You can now connect your mcp server to ChatGPT and start chatting.

We implemented Code Mode in mcp-use's MCPClient . All you need to do is define which servers you want your agent to use, enable code mode, and you're done! The client will expose two tools: - One that allows the agent to progressively discover which servers and tools are available - One that allows the agent to execute code in an environment where the MCP servers are available as Python modules (SDKs)

Join MCP community
Get help, share your projects, and get inspired.
The community for developers building with MCP and mcp-use.
Among the most popular MCP projects
mcp-use is one of the most popular open-source MCP projects
MCP agents executed with mcp-use
Companies used mcp-use SDKs to experiment and build MCP-enabled agents and MCP servers.
Stars on GitHub.
