How to integrate Gigasheet MCP with Claude Agent SDK

This guide walks you through connecting Gigasheet to the Claude Agent SDK 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 Claude Agent SDK 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.

Gigasheet logoGigasheet
Api Key

Gigasheet is a big data automation platform with a spreadsheet-like interface for managing massive datasets. It makes it easy to automate, analyze, and streamline workflows without code.

150 Tools

Introduction

This guide walks you through connecting Gigasheet to the Claude Agent SDK 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 Claude Agent SDK 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 and set up your Claude/Anthropic and Composio API keys
  • Install the necessary dependencies
  • Initialize Composio and create a Tool Router session for Gigasheet
  • Configure an AI agent that can use Gigasheet as a tool
  • Run a live chat session where you can ask the agent to perform Gigasheet operations

What is Claude Agent SDK?

The Claude Agent SDK is Anthropic's official framework for building AI agents powered by Claude. It provides a streamlined interface for creating agents with MCP tool support and conversation management.

Key features include:

  • Native MCP Support: Built-in support for Model Context Protocol servers
  • Permission Modes: Control tool execution permissions
  • Streaming Responses: Real-time response streaming for interactive applications
  • Context Manager: Clean async context management for sessions

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.

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

Step by step09 STEPS
1

Prerequisites

Before starting, make sure you have:
  • Composio API Key and Claude/Anthropic API Key
  • Primary know-how of Claude Agents SDK
  • A Gigasheet account
  • Some knowledge of Python
2

Getting API Keys for Claude/Anthropic and Composio

Claude/Anthropic API Key
  • Go to the Anthropic Console and create an API key. You'll need credits to use the models.
  • 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.
3

Install dependencies

npm install @anthropic-ai/claude-agent-sdk @composio/core dotenv

Install the Composio SDK and the Claude Agents SDK.

What's happening:

  • @composio/core provides Composio integration for Anthropic
  • @anthropic-ai/claude-agent-sdk is the core agent framework
  • dotenv/config loads environment variables
4

Set up environment variables

bash
COMPOSIO_API_KEY=your_composio_api_key_here
USER_ID=your_user_id_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here

Create a .env file in your project root.

What's happening:

  • COMPOSIO_API_KEY authenticates with Composio
  • USER_ID identifies the user for session management
  • ANTHROPIC_API_KEY authenticates with Anthropic/Claude
5

Import dependencies

import 'dotenv/config';
import readline from 'node:readline';
import { Composio } from '@composio/core';
import { query, type Options } from "@anthropic-ai/claude-agent-sdk";

dotenv.config();
What's happening:
  • We're importing all necessary libraries including the Claude Agent SDK and Composio
  • The dotenv.config() function loads environment variables from your .env file
  • This setup prepares the foundation for connecting Claude with Gigasheet functionality
6

Create a Composio instance and Tool Router session

async function chat() {
  const { COMPOSIO_API_KEY, USER_ID } = process.env;
  if (!COMPOSIO_API_KEY || !USER_ID) {
    throw new Error('COMPOSIO_API_KEY and USER_ID required in .env');
  }

  const composio = new Composio({ apiKey: COMPOSIO_API_KEY });

  // Create Tool Router session for Gigasheet
  const session = await composio.create(USER_ID, {
    toolkits: ['gigasheet'],
  });
  const mcpUrl = session?.mcp.url;
What's happening:
  • The function checks for the required COMPOSIO_API_KEY environment variable
  • We're creating a Composio instance using our API key
  • The create method creates a Tool Router session for Gigasheet
  • The returned url is the MCP server URL that your agent will use
7

Configure Claude Agent with MCP

const options: Options = {
  permissionMode: 'bypassPermissions',
  mcpServers: {
    composio: {
      type: 'http',
      url: mcpUrl,
      headers: { 'x-api-key': COMPOSIO_API_KEY }
    }
  },
  systemPrompt: 'You are a helpful assistant with access to Gigasheet tools via Composio.',
  maxTurns: 10,
};
What's happening:
  • We're configuring the Claude Agent options with the MCP server URL
  • permissionMode: 'bypassPermissions' allows the agent to execute operations without asking for permission each time
  • The system prompt instructs the agent that it has access to Gigasheet
  • maxTurns: 10 limits the conversation length to prevent excessive API usage
8

Create client and start chat loop

const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
    prompt: 'You: '
  });

  console.log('\nChat started. Type "exit" to quit.\n');

  let isProcessing = false;

  async function ask(prompt: string) {
    isProcessing = true;
    rl.pause();

    process.stdout.write('Claude is thinking...');
    const stream = query({ prompt, options });

    let firstChunk = true;
    for await (const msg of stream) {
      const content = (msg as any).message?.content || (msg as any).content;
      if (Array.isArray(content)) {
        for (const block of content) {
          if (block.type === 'text' && block.text) {
            if (firstChunk) {
              process.stdout.write('\r\x1b[K');
              process.stdout.write('Claude: ');
              firstChunk = false;
            }
            process.stdout.write(block.text);
          }
        }
      }
    }
    process.stdout.write('\n\n');

    isProcessing = false;
    rl.resume();
    rl.prompt();
  }

  rl.on('line', async (line) => {
    if (isProcessing) return;

    const input = line.trim();
    if (input === 'exit') {
      rl.close();
      process.exit(0);
    }
    if (input) await ask(input);
    else rl.prompt();
  });

  await ask('What can you help me with?');
}
What's happening:
  • The readline interface is created to handle user input and output
  • The query function is used to send the user's input to the agent
  • The chat loop continues until the user types 'exit' or 'quit'
9

Run the application

try {
  await chat();
} catch (error) {
  console.error(error);
  process.exit(1);
}
What's happening:
  • The chat function is the entry point for the application
  • The try-catch block is used to handle any errors that occur

Complete Code

Here's the complete code to get you started with Gigasheet and Claude Agent SDK:

import 'dotenv/config';
import readline from 'node:readline';
import { Composio } from '@composio/core';
import { query, type Options } from "@anthropic-ai/claude-agent-sdk";

async function chat() {
  const { COMPOSIO_API_KEY, USER_ID } = process.env;
  if (!COMPOSIO_API_KEY || !USER_ID) {
    throw new Error('COMPOSIO_API_KEY and USER_ID required in .env');
  }

  const composio = new Composio({ apiKey: COMPOSIO_API_KEY });
  const session = await composio.create(USER_ID, {
    toolkits: ['gigasheet']
  });
  const mcp_url = session?.mcp.url;

  const options: Options = {
    permissionMode: 'bypassPermissions',
    mcpServers: {
      composio: {
        type: 'http',
        url: mcp_url,
        headers: { 'x-api-key': COMPOSIO_API_KEY }
      }
    },
    systemPrompt: 'You are a helpful assistant with access to Gigasheet tools via Composio.',
    maxTurns: 10,
  };

  const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
    prompt: 'You: '
  });

  console.log('\nChat started. Type "exit" to quit.\n');

  let isProcessing = false;

  async function ask(prompt: string) {
    isProcessing = true;
    rl.pause();

    process.stdout.write('Claude is thinking...');
    const stream = query({ prompt, options });

    let firstChunk = true;
    for await (const msg of stream) {
      const content = (msg as any).message?.content || (msg as any).content;
      if (Array.isArray(content)) {
        for (const block of content) {
          if (block.type === 'text' && block.text) {
            if (firstChunk) {
              process.stdout.write('\r\x1b[K');
              process.stdout.write('Claude: ');
              firstChunk = false;
            }
            process.stdout.write(block.text);
          }
        }
      }
    }
    process.stdout.write('\n\n');

    isProcessing = false;
    rl.resume();
    rl.prompt();
  }

  rl.on('line', async (line) => {
    if (isProcessing) return;

    const input = line.trim();
    if (input === 'exit') {
      rl.close();
      process.exit(0);
    }
    if (input) await ask(input);
    else rl.prompt();
  });

  await ask('What can you help me with?');
}

try {
  await chat();
} catch (error) {
  console.error(error);
  process.exit(1);
}

Conclusion

You've successfully built a Claude Agent SDK agent that can interact with Gigasheet through Composio's Tool Router.

Key features:

  • Native MCP support through Claude's agent framework
  • Streaming responses for real-time interaction
  • Permission bypass for smooth automated workflows
You can extend this by adding more toolkits, implementing custom business logic, or building a web interface around the agent.
TOOLS

Supported Tools

Every Gigasheet action and event your agent gets out of the box.

Append Rows to Dataset

Appends rows to an existing Gigasheet dataset using column letters as keys.

Append Sheet from Another Sheet

Tool to append data from a source sheet to a target sheet by matching column names.

Apply HTTP Enrichment

Tool to apply generic HTTP enrichment to a Gigasheet dataset.

Calculate Enrich Expected Credits

Calculate expected credits for a user-defined HTTP enrichment operation.

Cancel HTTP Enrichment Task

Tool to cancel a running enrichment task.

Check Connector Source Availability

Tool to check if a source of the given type is available.

Combine Files

Tool to combine multiple files into a new file.

Copy File

Tool to copy a file in Gigasheet.

Count Dataset Deduplication Results

Tool to count how many duplicates will be removed and how many rows remain when deduplicating.

Count Dataset Groups

Tool to count the number of groups matching certain criteria in a Gigasheet dataset.

Count Dataset Rows

Counts rows in a Gigasheet dataset matching specified filter criteria.

Count Dataset Activities

Tool to get total activity count on a given Gigasheet dataset.

Create AI Chat Query

AI analysis assistant for Gigasheet datasets.

Create Dataset Column Comment

Tool to add a comment to a column in a Gigasheet dataset.

Add Comment to Cell

Tool to add a comment to a specific cell in a Gigasheet dataset.

Create Conditional Label Column

Tool to add a label column to a Gigasheet dataset with values based on conditional filters.

Create Formula Column

Tool to create a new column based on a formula input in a Gigasheet dataset.

Edit Formula Column

Tool to edit a formula column in a Gigasheet dataset.

Create Formula Preview

Tool to calculate a formula preview on a Gigasheet dataset and return sample results with involved column values.

Create Iterator Column

Tool to add an iterator column to a Gigasheet dataset based on current filters and order.

Create Dataset Liveshare

Tool to create a new liveshare for a Gigasheet dataset.

Create Dataset View

Tool to create a new view for a Gigasheet dataset with a specified name and client state version.

Explode JSON Column

Tool to explode JSON data in a column into separate columns.

Create File Aggregation

Tool to retrieve ungrouped aggregated values for a Gigasheet file.

Create Blank File

Tool to create an empty file in your Gigasheet Library.

Create Files Directory

Tool to create a new folder in your Gigasheet Library.

Create Cross-File Lookup

Creates a cross-file lookup to enrich data by matching values between two sheets.

Send MCP Request to Sheet Assistant

Tool to interact with Gigasheet Sheet Assistant via the Model Context Protocol (MCP) over HTTP.

Split Column

Tool to split a column into multiple columns based on a separator.

Delete Sheet Assistant Logs

Tool to delete Sheet Assistant chat history for a specific sheet.

Delete columns by name

Tool to delete multiple columns from a Gigasheet dataset by their column names.

Delete Connector Source

Tool to delete a connector source for the authenticated user.

Delete Dataset Comment

Tool to delete a comment from a cell in a Gigasheet dataset.

Delete Rows Not Matching Filter

Deletes rows in a Gigasheet dataset that do NOT match the specified filter criteria.

Delete Duplicated Rows from Dataset

Tool to delete duplicated rows from a Gigasheet dataset based on specified columns and sort model.

Delete Rows from Dataset

Tool to delete selected rows from a Gigasheet dataset.

Delete Rows Matching Filter

Tool to delete rows in a Gigasheet dataset that match a specified filter.

Delete dataset view

Tool to delete a specific view from a Gigasheet dataset.

Delete dataset live share

Tool to delete a live share of a Gigasheet dataset.

Delete sheet or folder by handle

Deletes a Gigasheet sheet or folder by its unique handle identifier.

Delete column from sheet

Tool to delete a single column from a Gigasheet sheet by its column identifier.

Delete Filter Template

Tool to delete a saved filter template by its unique handle.

Delete multiple columns from file

Tool to delete multiple columns from a Gigasheet file.

Filter File Rows

Tool to retrieve rows from a Gigasheet file matching specified filter criteria.

Generate Dataset Description

Generates an AI-powered description for a Gigasheet dataset.

Get Sheet AI Chat History

Tool to retrieve AI chat history for a sheet.

Get Cell Comments

Tool to get comments for a specific cell in a Gigasheet dataset.

Get Client State Current Version

Retrieves the current client-state version and timestamp for a specified sheet.

Get Connector Connection Parameters

Tool to get connection parameters for a specific connector.

Get Connector Connection Parameters

Tool to retrieve connection parameters for a specific connector type.

Get Connector Connections

Tool to list connector connections.

Get Connector Sources

Tool to retrieve information about connected data sources for the user.

Get Connector Source Parameters

Tool to get parameters required for a specific connector source type.

Get Dataset Column Comments

Tool to get comments for a specific column in a dataset sheet.

Get Dataset by Handle

Retrieves comprehensive metadata for a specific dataset in Gigasheet.

Get Dataset Columns

Tool to list all column metadata (IDs, names, types) for a dataset.

Get Dataset Export Download URL

Tool to retrieve the download URL for an exported dataset.

Get Dataset Liveshare CSV

Tool to retrieve CSV data from a Gigasheet liveshare.

Get Dataset Note

Tool to retrieve a dataset's note by handle.

Get Dataset Organization Permissions

Tool to retrieve organization file permissions for a dataset.

Get Dataset Version Metadata

Retrieves metadata about a dataset at a specific version.

Get Dataset Views

Tool to list all views associated with a specific dataset.

Get Dataset Operation Status

Tool to get information about the last operation on a dataset.

Get Dataset Activity

Tool to get the list of write actions on a given dataset sheet.

Get Dataset View Metadata

Tool to retrieve view metadata for a specific view within a dataset.

Get Docs Formulas Functions

Tool to retrieve all supported formula functions.

Get Enrich Task Status

Tool to get status for a user-defined HTTP enrichment task.

Apply Filter Template On Sheet

Tool to fetch a saved filter template's model for a given sheet.

Get Filter Templates

Retrieves all saved filter templates from GigaSheet.

Get Filter Template by Handle

Retrieves details of a specific saved filter template by its unique handle.

Generate New Handle

Tool to generate a new unique dataset handle.

Get Library Files

Tool to retrieve all datasets and files in the user's Gigasheet library.

Get Library Files in Directory

Retrieves all library files with file permissions in a given directory.

Get Library Home Page Files

Tool to retrieve suggested recent files for the home page.

Get Library Path

Tool to retrieve the chain of parent directories for a file or folder in Gigasheet.

Get TICIntel NPI Public Profile

Tool to retrieve public NPI (National Provider Identifier) profile from TICIntel database.

Get TIC Intel States

Tool to list available TIC Intel states from Gigasheet.

List Cities by State

Tool to retrieve a list of cities for a given US state code from the TICIntel dataset.

List Providers by City

Tool to retrieve a list of healthcare providers in a specific city and state from the TicIntel dataset.

Get User Details

Retrieves detailed information about the authenticated user in Gigasheet.

Get User Enrichment Credits

Tool to get the current user's enrichment credit information.

Get User Metadata

Tool to retrieve metadata for the authenticated user.

Get User Autofill Suggestions

Retrieves autofill suggestions for the authenticated user, including team members and previously used share recipients.

Get User Space Used

Tool to get the amount of space used by the current user in bytes.

Get Authenticated User Info

Tool to fetch the authenticated user's details.

List Billing Plans

Tool to list available Gigasheet billing plans.

List Dataset Comments

Tool to get all comments in a dataset sheet.

List Dataset Liveshares

Tool to list all liveshares for a specific Gigasheet dataset.

List All Datasets

Tool to retrieve all datasets owned by the user at any folder depth.

List Datasets by Handle

Tool to list files and datasets in a given Gigasheet location.

List Library Exports

Tool to list exports owned by the current user, regardless of location.

List Shared Files by Handle

Tool to retrieve all files with permissions shared with the user in a specific directory location.

Move file or folder to directory

Tool to move a file or folder into a folder or to the root of your Library.

Update User Metadata

Tool to update user metadata in Gigasheet.

Generate AI Formula

Tool to generate Excel-style formulas using AI based on natural language queries.

Cast Column Data Type

Tool to change a column's data type in a Gigasheet dataset.

Change Column Case

Tool to change the case of a column to Uppercase, Lowercase, Capitalized, or Proper.

Clean Company Name

Tool to clean company names by stripping common business suffixes (Inc.

Combine Columns

Tool to combine multiple columns into a single new column with a separator.

Append Rows to Sheet by Name

Appends one or more rows to a Gigasheet dataset using column names as keys.

Generate Dataset Assistant Tips

Tool to generate AI-powered tips for analyzing a dataset.

Initiate Dataset Export

Initiates an asynchronous export job for a Gigasheet dataset.

Find and Replace in Dataset

Tool to find and replace values in specified columns of a Gigasheet dataset.

Insert Blank Row in Dataset

Tool to insert a blank row with null values into a dataset.

Rename Columns to Unique

Tool to rename all columns in a dataset to unique names.

Save Current View

Saves the current view state of a Gigasheet dataset and returns a view handle.

Select columns by name

Tool to select specific columns from a Gigasheet dataset by name, keeping only those columns in the specified order.

Extract Domain from URL Column

Tool to extract domain from a URL column in a Gigasheet dataset.

Filter File Rows by Column Name

Filter rows in a Gigasheet file by column names and return matching results.

Get Filtered Row Index

Maps an unfiltered row number to its position in the filtered result set.

Filter File with Stream Progress

Filter data from a Gigasheet file with real-time streaming progress updates.

Save Exported File

Saves a file state with applied filters and grouping to create an exported version.

Combine Files by Name

Tool to combine multiple files by a shared column name.

Export Gigasheet to S3

Tool to export Gigasheet data to AWS S3.

Import from S3

Tool to import data from AWS S3 into your Gigasheet Library.

Request Access to File

Tool to request access to a Gigasheet file.

Request API Access

Request API access by sending a notification to Gigasheet support team.

Trim Column Whitespace

Tool to trim leading and trailing whitespace from all values in a column.

Unroll Delimited Column

Tool to explode a column containing delimited data into multiple rows.

Upload Raw Data Direct

Tool to upload raw data directly to Gigasheet using byte array contents.

Upload from URL

Tool to upload data to Gigasheet from a specified URL.

Preview HTTP Enrichment

Tool to preview a generic HTTP enrichment on a Gigasheet dataset before executing it on all rows.

Set Dataset Client State Version

Applies or restores a specific client state version to a dataset.

Update cell by column name and row

Tool to update a cell in a dataset by specifying column name and row number.

Share file

Tool to share a Gigasheet file with specified recipients.

Opt out of shared file

Tool to remove your access from a file that has been shared with you.

Create/Update Filter Template

Tool to create or update a saved filter template.

Rename Columns by Name

Tool to rename columns in a Gigasheet dataset using their current names.

Rename File

Tool to rename a file in Gigasheet.

Reset Client State to Default

Resets the client state of a sheet to the default state.

Reset User Password

Tool to trigger password reset for the authenticated user.

Search Dataset Activity

Tool to search the history of write actions performed on a Gigasheet dataset.

Search Library

Tool to search through the Gigasheet file library by file metadata.

Send Invite Emails

Tool to send email invitations to join Gigasheet.

Set Aggregate Filter Model

Tool to set the aggregate filter model in the client state of a sheet.

Set Client State Aggregations

Sets aggregations in the client state of a sheet.

Set Client State Column State

Tool to set column state in the client state of a sheet.

Set Client State Filter Model

Tool to set the filter model in the client state of a sheet.

Set Client State Group Columns

Tool to set group columns in the client state of a sheet.

Set Client State Sort Model

Sets the sort model for a sheet's client state.

Set Client State Visible Columns

Tool to set visible columns in the client state of a sheet.

Set Dataset Client State

Sets the client state of a dataset using a state object.

Set Dataset Column Currency

Tool to set currency format for a dataset column.

Set Dataset Note

Tool to set or update a note on a dataset in Gigasheet.

Update Dataset Cell

Tool to update a single cell value in a Gigasheet dataset by column letter and row number.

Update Dataset View

Tool to update the client state of a specified view.

Upsert Rows in Dataset

Tool to upsert rows in an existing Gigasheet dataset.

Validate Dataset Formula

Tool to validate a formula expression against a dataset.

Validate Files Combine

Tool to validate a combine files request and return all errors that might appear.

Validate Files Combine by Name

Tool to validate a combine by name request before executing it.

FAQ

Frequently asked questions

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.

Yes, you can. Claude Agent SDK 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.

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.

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.

Start with Gigasheet.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Gigasheet tool your agent needs.Free to start.

Start building