Add Big Query MCP to Crew AI

Hi all,

I was wondering how can we add Big Query MCP to crew AI

{
  "mcpServers": {
    "bigquery": {
      "command": "./PATH/TO/toolbox",
      "args": ["--prebuilt","bigquery","--stdio"],
      "env": {
        "BIGQUERY_PROJECT": "PROJECT_ID"
      }
    }
  }
}

Refer:

Any thoughts on the above would be appreciated?

Adapting the BigQuery MCP Toolbox documentation for the MCP Servers as Tools in CrewAI guide, I think something like this should be enough:

from crewai_tools import MCPServerAdapter
from mcp import StdioServerParameters
import os

bigquery_mcp_params = StdioServerParameters(
    command="<./PATH/TO/>toolbox",
    args=["--prebuilt", "bigquery", "--stdio"],
    env={
        "BIGQUERY_PROJECT": "<PROJECT_ID>",
        "UV_PYTHON": "3.12",
        **os.environ
    },
)

with MCPServerAdapter(bigquery_mcp_params, connect_timeout=30) as mcp_tools:
    print(f"Available tools: {[tool.name for tool in mcp_tools]}")

Hi @maxmoura

This worked.

It solved my query.

Thanks for your support.

Really appreciate it