> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-docs-scavio-google-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Client

> Launch a local FastMCP server by command and connect an agent to it with MCPTools.

<Warning>
  For free and developer tiers, Groq will shut down `llama-3.3-70b-versatile` on August 16, 2026. Replace it with `openai/gpt-oss-120b` before that date. See [Groq deprecations](https://console.groq.com/docs/deprecations).
</Warning>

```python client.py theme={null}
"""
Client
=============================

Demonstrates client.
"""

import asyncio

from agno.agent import Agent
from agno.models.groq import Groq
from agno.tools.mcp import MCPTools

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------


async def run_agent(message: str) -> None:
    # Initialize the MCP server
    async with (
        MCPTools(
            "fastmcp run cookbook/90_tools/mcp/local_server/server.py",  # Supply the command to run the MCP server
        ) as mcp_tools,
    ):
        agent = Agent(
            model=Groq(id="llama-3.3-70b-versatile"),
            tools=[mcp_tools],
            markdown=True,
        )
        await agent.aprint_response(message, stream=True)


# Example usage
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------

if __name__ == "__main__":
    asyncio.run(run_agent("What is the weather in San Francisco?"))
```

## Run the Example

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U "agno[mcp]" groq
    ```
  </Step>

  <Step title="Export your Groq API key">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export GROQ_API_KEY="your_groq_api_key_here"
      ```

      ```bash Windows theme={null}
      $Env:GROQ_API_KEY="your_groq_api_key_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Replace Llama 3.3">
    Replace `llama-3.3-70b-versatile` with `openai/gpt-oss-120b` in the saved file.
  </Step>

  <Step title="Run the example">
    Save the code above as `client.py`, then run:

    ```bash theme={null}
    python client.py
    ```
  </Step>
</Steps>

Full source: [cookbook/91\_tools/mcp/local\_server/client.py](https://github.com/agno-agi/agno/blob/main/cookbook/91_tools/mcp/local_server/client.py)
