Agent framework

OrcaRouter tools in CrewAI

Give a CrewAI agent the OrcaRouter tool catalog through MCPServerAdapter, so it can find and run tools while it works on a task.

Details

Kind
Agent framework
Connects through
MCP server

Set it up

  1. Install the packages: pip install crewai "crewai-tools[mcp]".
  2. Set ORCAROUTER_API_KEY to an API key from your OrcaRouter console. It pays for the agent's model, reached through OrcaRouter's OpenAI-compatible API, and for the tools; Node.js 18 or later runs the MCP server through npx.
  3. Open the server with MCPServerAdapter and give its tools to your agents.

Code

A crew with the OrcaRouter MCP server
import os

from crewai import LLM, Agent, Crew, Task
from crewai_tools import MCPServerAdapter
from mcp import StdioServerParameters

server = StdioServerParameters(
    command="npx",
    args=["-y", "@orcarouter/mcp"],
    env={"ORCAROUTER_API_KEY": os.environ["ORCAROUTER_API_KEY"]},
)
# The agent's model, through OrcaRouter's OpenAI-compatible API, on the same key:
# "openai/" picks CrewAI's OpenAI-compatible client, the rest is OrcaRouter's model id.
llm = LLM(
    model="openai/openai/gpt-5-mini",
    base_url="https://api.orcarouter.ai/v1",
    api_key=os.environ["ORCAROUTER_API_KEY"],
)

with MCPServerAdapter(server) as tools:
    researcher = Agent(
        role="Social media researcher",
        goal="Answer questions about social accounts with live figures",
        backstory="You look up live data with the OrcaRouter tool catalog.",
        tools=tools,
        llm=llm,
    )
    task = Task(
        description="How many followers does @nasa have on TikTok?",
        expected_output="The follower count and the tool that returned it.",
        agent=researcher,
    )
    print(Crew(agents=[researcher], tasks=[task]).kickoff())

Recipes to try with CrewAI

© 2026 OrcaRouter

For Providers

Run an inference platform? Get your models on OrcaRouter.

providers@orcarouter.ai

Join our community

Discordsupport@orcarouter.aiXLinkedInGitHubYouTube