Skip to main content
CrewAI connects to SAN with the MCPServerAdapter from crewai-tools. It turns SAN’s MCP tools into CrewAI-compatible tools you can hand to any agent in your crew.

Prerequisites

  • Python 3.10+
  • A SAN API key
    Create one in the API Quickstart if you don’t have one yet.

Quick Start

1

Install the MCP tools

pip install 'crewai-tools[mcp]'
2

Describe SAN's MCP server

Set the transport to streamable-http and pass your key in headers.
server_params = {
    "url": "https://gateway.sanfoundation.com/mcp",
    "transport": "streamable-http",
    "headers": {"x-api-key": "sk_..."},
}
3

Give the tools to an agent

Open the adapter as a context manager so the connection is cleaned up for you.
from crewai import Agent, Task, Crew
from crewai_tools import MCPServerAdapter

with MCPServerAdapter(server_params) as tools:
    agent = Agent(
        role="SAN Assistant",
        goal="Answer requests using the SAN gateway tools",
        backstory="You have access to tools served by the SAN MCP gateway.",
        tools=tools,
        verbose=True,
    )
    task = Task(
        description="List the available SAN agents.",
        expected_output="A list of SAN agents.",
        agent=agent,
    )
    Crew(agents=[agent], tasks=[task]).kickoff()