> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sanfoundation.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CrewAI

> Give a CrewAI agent SAN's tools through the MCPServerAdapter.

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](/api-quickstart) if you don't have one yet.

## Quick Start

<Steps>
  <Step title="Install the MCP tools">
    ```bash theme={null}
    pip install 'crewai-tools[mcp]'
    ```
  </Step>

  <Step title="Describe SAN's MCP server">
    Set the transport to `streamable-http` and pass your key in `headers`.

    ```python theme={null}
    server_params = {
        "url": "https://gateway.sanfoundation.com/mcp",
        "transport": "streamable-http",
        "headers": {"x-api-key": "sk_..."},
    }
    ```
  </Step>

  <Step title="Give the tools to an agent">
    Open the adapter as a context manager so the connection is cleaned up for you.

    ```python theme={null}
    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()
    ```
  </Step>
</Steps>
