đ« CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
title: "Toolkit as MCP Server" icon: "server" description: "Share any CAMEL toolkit as an MCP server so external clients and agents can use your tools."
doc_code_map: - "camel/toolkits/base.py" - "camel/toolkits/function_tool.py" - "camel/toolkits/mcp_toolkit.py" - "camel/utils/mcp_client.py"
A Toolkit is a bundle of related toolsâfunctions that let agents fetch data, automate, search, or integrate with services.Browse all CAMEL toolkits â With one command, you can flip any toolkit into an MCP server. Now, any MCP-compatible client or agent can call your toolsâlocally or over the network.
Quick Example
You can turn any CAMEL toolkit into a full-featured MCP serverâmaking its tools instantly available to other AI agents or external apps via the Model Context Protocol.
Why do this?
- Instantly share your agent tools with external clients (e.g., Claude, Cursor, custom dashboards).
- Enable distributed, language-agnostic tool execution across different systems and teams.
- Easily test, debug, and reuse your toolsâno need to change the toolkit or agent code.
Launch a Toolkit Server
Below is a minimal script to expose ArxivToolkit as an MCP server.
Swap in any other toolkit (e.g., SearchToolkit, MathToolkit), they all work the same way!
parser = argparse.ArgumentParser( description="Run Arxiv Toolkit as an MCP server." ) parser.add_argument( "--mode", choices=["stdio", "sse", "streamable-http"], default="stdio", help="Select MCP server mode." ) args = parser.parse_args()
toolkit = ArxivToolkit() toolkit.mcp.run(args.mode)
- stdio: For local IPC (default, fast and secure for single-machine setups)
- sse: Server-Sent Events (good for remote servers and web clients)
- streamable-http: Modern, high-performance HTTP streaming
Discoverable & Usable Instantly
Once running, your MCP server will:
- Advertise all available toolkit methods as standard MCP tools
- Support dynamic tool discovery (
tools/listendpoint) - Allow any compatible agent or client (not just CAMEL) to connect and call your tools
This means you can build an LLM workflow where, for example, Claude running in your browser or another service in your company network can call your toolkit directlyâwithout ever importing your Python code.