How to integrate Gigasheet MCP with CrewAI

Trusted by
AWS
Glean
Zoom
Airtable

30 min · no commitment · see it on your stack

Gigasheet logo
CrewAI logo
divider

Introduction

This guide walks you through connecting Gigasheet to CrewAI using the Composio tool router. By the end, you'll have a working Gigasheet agent that can list all columns in your sales dataset, download export url for last week's data, apply saved filter to monthly report sheet through natural language commands.

This guide will help you understand how to give your CrewAI agent real control over a Gigasheet account through Composio's Gigasheet MCP server.

Before we dive in, let's take a quick look at the key ideas and tools involved.

Also integrate Gigasheet with

TL;DR

Here's what you'll learn:
  • Get a Composio API key and configure your Gigasheet connection
  • Set up CrewAI with an MCP enabled agent
  • Create a Tool Router session or standalone MCP server for Gigasheet
  • Build a conversational loop where your agent can execute Gigasheet operations

What is CrewAI?

CrewAI is a powerful framework for building multi-agent AI systems. It provides primitives for defining agents with specific roles, creating tasks, and orchestrating workflows through crews.

Key features include:

  • Agent Roles: Define specialized agents with specific goals and backstories
  • Task Management: Create tasks with clear descriptions and expected outputs
  • Crew Orchestration: Combine agents and tasks into collaborative workflows
  • MCP Integration: Connect to external tools through Model Context Protocol

What is the Gigasheet MCP server, and what's possible with it?

The Gigasheet MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Gigasheet account. It provides structured and secure access to your big data spreadsheets, so your agent can perform actions like retrieving datasets, applying filters, exporting data, managing sheets, and integrating with connector sources on your behalf.

  • Dataset retrieval and inspection: Instantly fetch metadata or details for any dataset or sheet, such as column names, types, and structure, so you can quickly understand and analyze your data.
  • Automated data export and download: Direct your agent to initiate data exports and retrieve download links for processed datasets, streamlining big data extraction directly to your tools or workflows.
  • Smart filtering and template application: Apply saved filter templates to sheets or retrieve available filter templates, enabling rapid, repeatable data curation without manual setup.
  • Sheet and folder management: Effortlessly delete sheets or folders—including recursive deletions—so you can keep your workspace organized and clutter-free.
  • Connector and integration management: List and manage connector connections to keep all your external data sources in sync with Gigasheet, making data aggregation seamless and automated.

Supported Tools & Triggers

Tools
Append Rows to DatasetAppends rows to an existing Gigasheet dataset using column letters as keys.
Append Sheet from Another SheetTool to append data from a source sheet to a target sheet by matching column names.
Apply HTTP EnrichmentTool to apply generic HTTP enrichment to a Gigasheet dataset.
Calculate Enrich Expected CreditsCalculate expected credits for a user-defined HTTP enrichment operation.
Cancel HTTP Enrichment TaskTool to cancel a running enrichment task.
Check Connector Source AvailabilityTool to check if a source of the given type is available.
Combine FilesTool to combine multiple files into a new file.
Copy FileTool to copy a file in Gigasheet.
Count Dataset Deduplication ResultsTool to count how many duplicates will be removed and how many rows remain when deduplicating.
Count Dataset GroupsTool to count the number of groups matching certain criteria in a Gigasheet dataset.
Count Dataset RowsCounts rows in a Gigasheet dataset matching specified filter criteria.
Count Dataset ActivitiesTool to get total activity count on a given Gigasheet dataset.
Create AI Chat QueryAI analysis assistant for Gigasheet datasets.
Create Dataset Column CommentTool to add a comment to a column in a Gigasheet dataset.
Add Comment to CellTool to add a comment to a specific cell in a Gigasheet dataset.
Create Conditional Label ColumnTool to add a label column to a Gigasheet dataset with values based on conditional filters.
Create Formula ColumnTool to create a new column based on a formula input in a Gigasheet dataset.
Edit Formula ColumnTool to edit a formula column in a Gigasheet dataset.
Create Formula PreviewTool to calculate a formula preview on a Gigasheet dataset and return sample results with involved column values.
Create Iterator ColumnTool to add an iterator column to a Gigasheet dataset based on current filters and order.
Create Dataset LiveshareTool to create a new liveshare for a Gigasheet dataset.
Create Dataset ViewTool to create a new view for a Gigasheet dataset with a specified name and client state version.
Explode JSON ColumnTool to explode JSON data in a column into separate columns.
Create File AggregationTool to retrieve ungrouped aggregated values for a Gigasheet file.
Create Blank FileTool to create an empty file in your Gigasheet Library.
Create Files DirectoryTool to create a new folder in your Gigasheet Library.
Create Cross-File LookupCreates a cross-file lookup to enrich data by matching values between two sheets.
Send MCP Request to Sheet AssistantTool to interact with Gigasheet Sheet Assistant via the Model Context Protocol (MCP) over HTTP.
Split ColumnTool to split a column into multiple columns based on a separator.
Delete Sheet Assistant LogsTool to delete Sheet Assistant chat history for a specific sheet.
Delete columns by nameTool to delete multiple columns from a Gigasheet dataset by their column names.
Delete Connector SourceTool to delete a connector source for the authenticated user.
Delete Dataset CommentTool to delete a comment from a cell in a Gigasheet dataset.
Delete Rows Not Matching FilterDeletes rows in a Gigasheet dataset that do NOT match the specified filter criteria.
Delete Duplicated Rows from DatasetTool to delete duplicated rows from a Gigasheet dataset based on specified columns and sort model.
Delete Rows from DatasetTool to delete selected rows from a Gigasheet dataset.
Delete Rows Matching FilterTool to delete rows in a Gigasheet dataset that match a specified filter.
Delete dataset viewTool to delete a specific view from a Gigasheet dataset.
Delete dataset live shareTool to delete a live share of a Gigasheet dataset.
Delete sheet or folder by handleDeletes a Gigasheet sheet or folder by its unique handle identifier.
Delete column from sheetTool to delete a single column from a Gigasheet sheet by its column identifier.
Delete Filter TemplateTool to delete a saved filter template by its unique handle.
Delete multiple columns from fileTool to delete multiple columns from a Gigasheet file.
Filter File RowsTool to retrieve rows from a Gigasheet file matching specified filter criteria.
Generate Dataset DescriptionGenerates an AI-powered description for a Gigasheet dataset.
Get Sheet AI Chat HistoryTool to retrieve AI chat history for a sheet.
Get Cell CommentsTool to get comments for a specific cell in a Gigasheet dataset.
Get Client State Current VersionRetrieves the current client-state version and timestamp for a specified sheet.
Get Connector Connection ParametersTool to get connection parameters for a specific connector.
Get Connector Connection ParametersTool to retrieve connection parameters for a specific connector type.
Get Connector ConnectionsTool to list connector connections.
Get Connector SourcesTool to retrieve information about connected data sources for the user.
Get Connector Source ParametersTool to get parameters required for a specific connector source type.
Get Dataset Column CommentsTool to get comments for a specific column in a dataset sheet.
Get Dataset by HandleRetrieves comprehensive metadata for a specific dataset in Gigasheet.
Get Dataset ColumnsTool to list all column metadata (IDs, names, types) for a dataset.
Get Dataset Export Download URLTool to retrieve the download URL for an exported dataset.
Get Dataset Liveshare CSVTool to retrieve CSV data from a Gigasheet liveshare.
Get Dataset NoteTool to retrieve a dataset's note by handle.
Get Dataset Organization PermissionsTool to retrieve organization file permissions for a dataset.
Get Dataset Version MetadataRetrieves metadata about a dataset at a specific version.
Get Dataset ViewsTool to list all views associated with a specific dataset.
Get Dataset Operation StatusTool to get information about the last operation on a dataset.
Get Dataset ActivityTool to get the list of write actions on a given dataset sheet.
Get Dataset View MetadataTool to retrieve view metadata for a specific view within a dataset.
Get Docs Formulas FunctionsTool to retrieve all supported formula functions.
Get Enrich Task StatusTool to get status for a user-defined HTTP enrichment task.
Apply Filter Template On SheetTool to fetch a saved filter template's model for a given sheet.
Get Filter TemplatesRetrieves all saved filter templates from GigaSheet.
Get Filter Template by HandleRetrieves details of a specific saved filter template by its unique handle.
Generate New HandleTool to generate a new unique dataset handle.
Get Library FilesTool to retrieve all datasets and files in the user's Gigasheet library.
Get Library Files in DirectoryRetrieves all library files with file permissions in a given directory.
Get Library Home Page FilesTool to retrieve suggested recent files for the home page.
Get Library PathTool to retrieve the chain of parent directories for a file or folder in Gigasheet.
Get TICIntel NPI Public ProfileTool to retrieve public NPI (National Provider Identifier) profile from TICIntel database.
Get TIC Intel StatesTool to list available TIC Intel states from Gigasheet.
List Cities by StateTool to retrieve a list of cities for a given US state code from the TICIntel dataset.
List Providers by CityTool to retrieve a list of healthcare providers in a specific city and state from the TicIntel dataset.
Get User DetailsRetrieves detailed information about the authenticated user in Gigasheet.
Get User Enrichment CreditsTool to get the current user's enrichment credit information.
Get User MetadataTool to retrieve metadata for the authenticated user.
Get User Autofill SuggestionsRetrieves autofill suggestions for the authenticated user, including team members and previously used share recipients.
Get User Space UsedTool to get the amount of space used by the current user in bytes.
Get Authenticated User InfoTool to fetch the authenticated user's details.
List Billing PlansTool to list available Gigasheet billing plans.
List Dataset CommentsTool to get all comments in a dataset sheet.
List Dataset LivesharesTool to list all liveshares for a specific Gigasheet dataset.
List All DatasetsTool to retrieve all datasets owned by the user at any folder depth.
List Datasets by HandleTool to list files and datasets in a given Gigasheet location.
List Library ExportsTool to list exports owned by the current user, regardless of location.
List Shared Files by HandleTool to retrieve all files with permissions shared with the user in a specific directory location.
Move file or folder to directoryTool to move a file or folder into a folder or to the root of your Library.
Update User MetadataTool to update user metadata in Gigasheet.
Generate AI FormulaTool to generate Excel-style formulas using AI based on natural language queries.
Cast Column Data TypeTool to change a column's data type in a Gigasheet dataset.
Change Column CaseTool to change the case of a column to Uppercase, Lowercase, Capitalized, or Proper.
Clean Company NameTool to clean company names by stripping common business suffixes (Inc.
Combine ColumnsTool to combine multiple columns into a single new column with a separator.
Append Rows to Sheet by NameAppends one or more rows to a Gigasheet dataset using column names as keys.
Generate Dataset Assistant TipsTool to generate AI-powered tips for analyzing a dataset.
Initiate Dataset ExportInitiates an asynchronous export job for a Gigasheet dataset.
Find and Replace in DatasetTool to find and replace values in specified columns of a Gigasheet dataset.
Insert Blank Row in DatasetTool to insert a blank row with null values into a dataset.
Rename Columns to UniqueTool to rename all columns in a dataset to unique names.
Save Current ViewSaves the current view state of a Gigasheet dataset and returns a view handle.
Select columns by nameTool to select specific columns from a Gigasheet dataset by name, keeping only those columns in the specified order.
Extract Domain from URL ColumnTool to extract domain from a URL column in a Gigasheet dataset.
Filter File Rows by Column NameFilter rows in a Gigasheet file by column names and return matching results.
Get Filtered Row IndexMaps an unfiltered row number to its position in the filtered result set.
Filter File with Stream ProgressFilter data from a Gigasheet file with real-time streaming progress updates.
Save Exported FileSaves a file state with applied filters and grouping to create an exported version.
Combine Files by NameTool to combine multiple files by a shared column name.
Export Gigasheet to S3Tool to export Gigasheet data to AWS S3.
Import from S3Tool to import data from AWS S3 into your Gigasheet Library.
Request Access to FileTool to request access to a Gigasheet file.
Request API AccessRequest API access by sending a notification to Gigasheet support team.
Trim Column WhitespaceTool to trim leading and trailing whitespace from all values in a column.
Unroll Delimited ColumnTool to explode a column containing delimited data into multiple rows.
Upload Raw Data DirectTool to upload raw data directly to Gigasheet using byte array contents.
Upload from URLTool to upload data to Gigasheet from a specified URL.
Preview HTTP EnrichmentTool to preview a generic HTTP enrichment on a Gigasheet dataset before executing it on all rows.
Set Dataset Client State VersionApplies or restores a specific client state version to a dataset.
Update cell by column name and rowTool to update a cell in a dataset by specifying column name and row number.
Share fileTool to share a Gigasheet file with specified recipients.
Opt out of shared fileTool to remove your access from a file that has been shared with you.
Create/Update Filter TemplateTool to create or update a saved filter template.
Rename Columns by NameTool to rename columns in a Gigasheet dataset using their current names.
Rename FileTool to rename a file in Gigasheet.
Reset Client State to DefaultResets the client state of a sheet to the default state.
Reset User PasswordTool to trigger password reset for the authenticated user.
Search Dataset ActivityTool to search the history of write actions performed on a Gigasheet dataset.
Search LibraryTool to search through the Gigasheet file library by file metadata.
Send Invite EmailsTool to send email invitations to join Gigasheet.
Set Aggregate Filter ModelTool to set the aggregate filter model in the client state of a sheet.
Set Client State AggregationsSets aggregations in the client state of a sheet.
Set Client State Column StateTool to set column state in the client state of a sheet.
Set Client State Filter ModelTool to set the filter model in the client state of a sheet.
Set Client State Group ColumnsTool to set group columns in the client state of a sheet.
Set Client State Sort ModelSets the sort model for a sheet's client state.
Set Client State Visible ColumnsTool to set visible columns in the client state of a sheet.
Set Dataset Client StateSets the client state of a dataset using a state object.
Set Dataset Column CurrencyTool to set currency format for a dataset column.
Set Dataset NoteTool to set or update a note on a dataset in Gigasheet.
Update Dataset CellTool to update a single cell value in a Gigasheet dataset by column letter and row number.
Update Dataset ViewTool to update the client state of a specified view.
Upsert Rows in DatasetTool to upsert rows in an existing Gigasheet dataset.
Validate Dataset FormulaTool to validate a formula expression against a dataset.
Validate Files CombineTool to validate a combine files request and return all errors that might appear.
Validate Files Combine by NameTool to validate a combine by name request before executing it.

What is the Composio tool router, and how does it fit here?

What is Composio SDK?

Composio's Composio SDK helps agents find the right tools for a task at runtime. You can plug in multiple toolkits (like Gmail, HubSpot, and GitHub), and the agent will identify the relevant app and action to complete multi-step workflows. This can reduce token usage and improve the reliability of tool calls. Read more here: Getting started with Composio SDK

The tool router generates a secure MCP URL that your agents can access to perform actions.

How the Composio SDK works

The Composio SDK follows a three-phase workflow:

  1. Discovery: Searches for tools matching your task and returns relevant toolkits with their details.
  2. Authentication: Checks for active connections. If missing, creates an auth config and returns a connection URL via Auth Link.
  3. Execution: Executes the action using the authenticated connection.

Step-by-step Guide

Prerequisites

Before starting, make sure you have:
  • Python 3.9 or higher
  • A Composio account and API key
  • A Gigasheet connection authorized in Composio
  • An OpenAI API key for the CrewAI LLM
  • Basic familiarity with Python

Getting API Keys for OpenAI and Composio

OpenAI API Key
  • Go to the OpenAI dashboard and create an API key. You'll need credits to use the models, or you can connect to another model provider.
  • Keep the API key safe.
Composio API Key
  • Log in to the Composio dashboard.
  • Navigate to your API settings and generate a new API key.
  • Store this key securely as you'll need it for authentication.

Install dependencies

bash
pip install composio crewai crewai-tools[mcp] python-dotenv
What's happening:
  • composio connects your agent to Gigasheet via MCP
  • crewai provides Agent, Task, Crew, and LLM primitives
  • crewai-tools[mcp] includes MCP helpers
  • python-dotenv loads environment variables from .env

Set up environment variables

bash
COMPOSIO_API_KEY=your_composio_api_key_here
USER_ID=your_user_id_here
OPENAI_API_KEY=your_openai_api_key_here

Create a .env file in your project root.

What's happening:

  • COMPOSIO_API_KEY authenticates with Composio
  • USER_ID scopes the session to your account
  • OPENAI_API_KEY lets CrewAI use your chosen OpenAI model

Import dependencies

python
import os
from composio import Composio
from crewai import Agent, Task, Crew
from crewai_tools import MCPServerAdapter
import dotenv

dotenv.load_dotenv()

COMPOSIO_API_KEY = os.getenv("COMPOSIO_API_KEY")
COMPOSIO_USER_ID = os.getenv("COMPOSIO_USER_ID")

if not COMPOSIO_API_KEY:
    raise ValueError("COMPOSIO_API_KEY is not set")
if not COMPOSIO_USER_ID:
    raise ValueError("COMPOSIO_USER_ID is not set")
What's happening:
  • CrewAI classes define agents and tasks, and run the workflow
  • MCPServerHTTP connects the agent to an MCP endpoint
  • Composio will give you a short lived Gigasheet MCP URL

Create a Composio Tool Router session for Gigasheet

python
composio_client = Composio(api_key=COMPOSIO_API_KEY)
session = composio_client.create(user_id=COMPOSIO_USER_ID, toolkits=["gigasheet"])

url = session.mcp.url
What's happening:
  • You create a Gigasheet only session through Composio
  • Composio returns an MCP HTTP URL that exposes Gigasheet tools

Initialize the MCP Server

python
server_params = {
    "url": url,
    "transport": "streamable-http",
    "headers": {"x-api-key": COMPOSIO_API_KEY},
}

with MCPServerAdapter(server_params) as tools:
    agent = Agent(
        role="Search Assistant",
        goal="Help users search the internet effectively",
        backstory="You are a helpful assistant with access to search tools.",
        tools=tools,
        verbose=False,
        max_iter=10,
    )
What's Happening:
  • Server Configuration: The code sets up connection parameters including the MCP server URL, streamable HTTP transport, and Composio API key authentication.
  • MCP Adapter Bridge: MCPServerAdapter acts as a context manager that converts Composio MCP tools into a CrewAI-compatible format.
  • Agent Setup: Creates a CrewAI Agent with a defined role (Search Assistant), goal (help with internet searches), and access to the MCP tools.
  • Configuration Options: The agent includes settings like verbose=False for clean output and max_iter=10 to prevent infinite loops.
  • Dynamic Tool Usage: Once created, the agent automatically accesses all Composio Search tools and decides when to use them based on user queries.

Create a CLI Chatloop and define the Crew

python
print("Chat started! Type 'exit' or 'quit' to end.\n")

conversation_context = ""

while True:
    user_input = input("You: ").strip()

    if user_input.lower() in ["exit", "quit", "bye"]:
        print("\nGoodbye!")
        break

    if not user_input:
        continue

    conversation_context += f"\nUser: {user_input}\n"
    print("\nAgent is thinking...\n")

    task = Task(
        description=(
            f"Conversation history:\n{conversation_context}\n\n"
            f"Current request: {user_input}"
        ),
        expected_output="A helpful response addressing the user's request",
        agent=agent,
    )

    crew = Crew(agents=[agent], tasks=[task], verbose=False)
    result = crew.kickoff()
    response = str(result)

    conversation_context += f"Agent: {response}\n"
    print(f"Agent: {response}\n")
What's Happening:
  • Interactive CLI Setup: The code creates an infinite loop that continuously prompts for user input and maintains the entire conversation history in a string variable.
  • Input Validation: Empty inputs are ignored to prevent processing blank messages and keep the conversation clean.
  • Context Building: Each user message is appended to the conversation context, which preserves the full dialogue history for better agent responses.
  • Dynamic Task Creation: For every user input, a new Task is created that includes both the full conversation history and the current request as context.
  • Crew Execution: A Crew is instantiated with the agent and task, then kicked off to process the request and generate a response.
  • Response Management: The agent's response is converted to a string, added to the conversation context, and displayed to the user, maintaining conversational continuity.

Complete Code

Here's the complete code to get you started with Gigasheet and CrewAI:

python
from crewai import Agent, Task, Crew, LLM
from crewai_tools import MCPServerAdapter
from composio import Composio
from dotenv import load_dotenv
import os

load_dotenv()

GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
COMPOSIO_API_KEY = os.getenv("COMPOSIO_API_KEY")
COMPOSIO_USER_ID = os.getenv("COMPOSIO_USER_ID")

if not GOOGLE_API_KEY:
    raise ValueError("GOOGLE_API_KEY is not set in the environment.")
if not COMPOSIO_API_KEY:
    raise ValueError("COMPOSIO_API_KEY is not set in the environment.")
if not COMPOSIO_USER_ID:
    raise ValueError("COMPOSIO_USER_ID is not set in the environment.")

# Initialize Composio and create a session
composio = Composio(api_key=COMPOSIO_API_KEY)
session = composio.create(
    user_id=COMPOSIO_USER_ID,
    toolkits=["gigasheet"],
)
url = session.mcp.url

# Configure LLM
llm = LLM(
    model="gpt-5",
    api_key=os.getenv("OPENAI_API_KEY"),
)

server_params = {
    "url": url,
    "transport": "streamable-http",
    "headers": {"x-api-key": COMPOSIO_API_KEY},
}

with MCPServerAdapter(server_params) as tools:
    agent = Agent(
        role="Search Assistant",
        goal="Help users with internet searches",
        backstory="You are an expert assistant with access to Composio Search tools.",
        tools=tools,
        llm=llm,
        verbose=False,
        max_iter=10,
    )

    print("Chat started! Type 'exit' or 'quit' to end.\n")

    conversation_context = ""

    while True:
        user_input = input("You: ").strip()

        if user_input.lower() in ["exit", "quit", "bye"]:
            print("\nGoodbye!")
            break

        if not user_input:
            continue

        conversation_context += f"\nUser: {user_input}\n"
        print("\nAgent is thinking...\n")

        task = Task(
            description=(
                f"Conversation history:\n{conversation_context}\n\n"
                f"Current request: {user_input}"
            ),
            expected_output="A helpful response addressing the user's request",
            agent=agent,
        )

        crew = Crew(agents=[agent], tasks=[task], verbose=False)
        result = crew.kickoff()
        response = str(result)

        conversation_context += f"Agent: {response}\n"
        print(f"Agent: {response}\n")

Conclusion

You now have a CrewAI agent connected to Gigasheet through Composio's Tool Router. The agent can perform Gigasheet operations through natural language commands.

Next steps:

  • Add role-specific instructions to customize agent behavior
  • Plug in more toolkits for multi-app workflows
  • Chain tasks for complex multi-step operations

How to build Gigasheet MCP Agent with another framework

FAQ

What are the differences in Tool Router MCP and Gigasheet MCP?

With a standalone Gigasheet MCP server, the agents and LLMs can only access a fixed set of Gigasheet tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Gigasheet and many other apps based on the task at hand, all through a single MCP endpoint.

Can I use Tool Router MCP with CrewAI?

Yes, you can. CrewAI fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Gigasheet tools.

Can I manage the permissions and scopes for Gigasheet while using Tool Router?

Yes, absolutely. You can configure which Gigasheet scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Gigasheet data and credentials are handled as safely as possible.

Used by agents from

Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.