# How to integrate Gong MCP with Claude Agent SDK

```json
{
  "title": "How to integrate Gong MCP with Claude Agent SDK",
  "toolkit": "Gong",
  "toolkit_slug": "gong",
  "framework": "Claude Agent SDK",
  "framework_slug": "claude-agents-sdk",
  "url": "https://composio.dev/toolkits/gong/framework/claude-agents-sdk",
  "markdown_url": "https://composio.dev/toolkits/gong/framework/claude-agents-sdk.md",
  "updated_at": "2026-05-12T10:13:25.097Z"
}
```

## Introduction

This guide walks you through connecting Gong to the Claude Agent SDK using the Composio tool router. By the end, you'll have a working Gong agent that can create a new gong meeting with your team, list user activity statistics for last week, add call recording media to a specific call through natural language commands.
This guide will help you understand how to give your Claude Agent SDK agent real control over a Gong account through Composio's Gong MCP server.
Before we dive in, let's take a quick look at the key ideas and tools involved.

## Also integrate Gong with

- [ChatGPT](https://composio.dev/toolkits/gong/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/gong/framework/open-ai-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/gong/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/gong/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/gong/framework/codex)
- [OpenClaw](https://composio.dev/toolkits/gong/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/gong/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/gong/framework/cli)
- [Google ADK](https://composio.dev/toolkits/gong/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/gong/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/gong/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/gong/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/gong/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/gong/framework/crew-ai)

## 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 Gong
- Configure an AI agent that can use Gong as a tool
- Run a live chat session where you can ask the agent to perform Gong 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 Gong MCP server, and what's possible with it?

The Gong MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Gong account. It provides structured and secure access to your meetings, calls, and team collaboration data, so your agent can schedule meetings, analyze call recordings, generate user activity reports, and manage CRM integrations—all on your behalf.
- Automated meeting scheduling and management: Have your agent create new Gong meetings, ensuring your team and clients are always connected at the right time.
- Call recording upload and analysis: Let your agent add call media, process call recordings, and help organize your sales conversations for later review.
- User activity and scorecard reporting: Direct your agent to generate detailed reports on team activity, review scorecards, and aggregate user statistics for performance insights.
- Prospect and flow management: Assign prospects to sales flows, helping automate outreach and follow-ups directly from your CRM data.
- CRM integration and data privacy controls: Enable your agent to manage CRM integrations and surface all records related to specific phone numbers, ensuring compliance and streamlined operations.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `GONG_ADD_CALL_MEDIA_V2_CALLS_ID_MEDIA` | Add call media | Adds a call media, recorded by a telephony system (PBX) or other media recording facility. Gong accepts call recordings in various audio and video file formats, including WAV, MP3, MP4, MKV and FLAC. If uploading a dual-channel (stereo) file separated by speaker, make sure to specify which channel corresponds to the company team member (rep) in the parties/mediaChannelId parameter of the Add New Call operation. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:calls:create'. |
| `GONG_ADD_NEW_CALL_V2_CALLS` | Add new call v2 calls | When using this endpoint, either provide a downloadMediaUrl or use the returned callId in a follow-up request to /v2/calls/{id}/media to upload the media file. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:calls:create'. |
| `GONG_AGGREGATE_ACTIVITY_BY_PERIOD_VIA_API` | Aggregate activity by period via api | Lists the aggregated activity of multiple users within the Gong system for each time period within the defined date range. This endpoint returns multiple records, one for each user. For each user there are items for every time period in the date range, including statistics about the user's activity. Records are returned only for users with activity in the range. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:stats:user-actions'. |
| `GONG_AGGREGATE_USER_ACTIVITY_STATISTICS` | Aggregate user activity statistics | Lists the activity of multiple users within the Gong system during a defined period. Given the period, this endpoint returns multiple records, one for each user, with an applicable activity during the period. Each record includes statistics about the user's activity. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:stats:user-actions'. |
| `GONG_ASSIGN_PROSPECTS_TO_FLOW` | Assign prospects to flow | Use this endpoint to assign a number of prospects to a flow. Prospects can be contacts or leads in your CRM. Generate a list of comma separated CRM Ids of the prospects you want to add to a flow. The flowInstanceOwnerEmail parameter is the email address of the Gong user who set up the flow instance and owns the flow to-dos. You can assign up to 200 prospects to a flow in a single request. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:flows:write'. |
| `GONG_CREATE_ACTIVITY_SCORECARDS_REPORT` | Retrieve activity scorecards report | Retrieve all the answers for the scorecards that were reviewed during a specified date range, for calls that took place during a specified date range, for specific scorecards or for specific reviewed users. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:stats:scorecards'. |
| `GONG_CREATE_A_NEW_GONG_MEETING_V2_MEETINGS` | Create a new gong meeting v2 meetings | When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:meetings:user:create'. |
| `GONG_CREATE_PERMISSION_PROFILE_V2_PERMISSION_PROFILE` | Create permission profile v2 permission profile | Create a permission profile in a given workspace. |
| `GONG_DATA_PRIVACY_FOR_PHONE_NUMBER` | Data privacy for phone number | Shows the elements in the Gong system that reference the given phone number. Given a phone number, this endpoint returns details of any leads or contacts with this phone number and their associated calls and email messages. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:data-privacy:read'. |
| `GONG_DELETE_A_GENERIC_CRM_INTEGRATION_V2_CRM_INTEGRATIONS` | Delete a generic CRM integration | Deletes an existing generic CRM integration from the Gong platform. This endpoint asynchronously removes a CRM integration and all its associated CRM objects (Accounts, Contacts, Deals, Leads, and Users). Use this when you want to disconnect a previously established integration between Gong and a CRM system. IMPORTANT: This endpoint only works with generic CRM integrations created via the 'register_crm_integration' action. It does NOT delete native integrations (e.g., Salesforce, HubSpot) that were set up directly through Gong's UI. The deletion is permanent and cannot be undone, so use with caution. This operation will affect data synchronization and may impact existing analytics or reports that rely on the integrated CRM data. Before deletion, you can retrieve existing integration details using the 'get_crm_integration_details' action to verify the integration ID. |
| `GONG_DELETE_MEETING` | Delete Meeting | Deletes a Gong meeting created via the Meetings API (Beta). Use this to remove a scheduled meeting by providing its unique meeting ID and the organizer's email address. Note: This endpoint is for meetings created through Gong's Meetings API, not for recorded calls accessible via the Calls API. Returns organizer email and request ID upon successful deletion. |
| `GONG_DELETE_USERS_FROM_CALL_ACCESS_LIST` | Delete users from call access list | Remove individual user access from calls. The request can only remove access previously given by the /v2/calls/users-access API. If a given user does not have access to the call, they will be unaffected. If a given user does have access to the call, but not through the public API (for example if the call was shared with the user), the user's access will remain unchanged. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:call-user-access:write'. |
| `GONG_ERASE_DATA_FOR_EMAIL_ADDRESS` | Erase data for email address | Erase all data associated with an email address from Gong (GDPR compliance). This endpoint permanently deletes from the Gong system: - All calls where the email address appears (as lead, contact, attendee, or speaker) - All email messages sent to or from the address - All leads or contacts with this email address **IMPORTANT NOTES:** - The deletion is NOT immediate and may take several hours to complete - Has a data integrity protection mechanism to prevent deletion of abnormal number of objects - Delete the data from your CRM and email system BEFORE this operation to prevent re-import - If deletion fails, contact support at help@gong.io - Requires Bearer token scope: 'api:data-privacy:delete' **CAUTION:** This is a destructive operation that cannot be undone. |
| `GONG_ERASE_DATA_FOR_PHONE_NUMBER` | Erase data for phone number | Given a phone number, this endpoint deletes from the Gong system any leads or contacts with a matching phone number or mobile phone number. Email messages sent to or from these leads/contacts are deleted. Calls where the leads/contacts appear are deleted. The deletion is not immediate, and may take several hours to complete. This endpoint contains a data integrity protection mechanism to prevent the deletion of an abnormal number of objects. If the deletion fails please contact support at help@gong.io Delete the data from your CRM and email system before performing this operation so that private data is not re-imported into Gong. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:data-privacy:delete'. |
| `GONG_FETCH_ALL_PERMISSION_PROFILES` | Fetch all permission profiles | Returns a list of all permission profiles. The listing is in the alphabetical order of the profile names. |
| `GONG_GET_CALL_BY_ID` | Get Call By ID | Tool to fetch specific call metadata by call ID. Use when you need to retrieve detailed information about a specific call using Gong's unique identifier. |
| `GONG_GET_CALL_TRANSCRIPT` | Get Call Transcript | Tool to retrieve call transcripts from Gong. Use when you need to access the text content of calls with speaker information, timestamps, and topic categorization. Requires either a date range or specific call IDs to filter results. |
| `GONG_GET_CRM_INTEGRATION_DETAILS` | Get Crm Integration Details | Retrieves details of generic CRM integrations registered with Gong. This endpoint returns generic CRM integrations that were set up using the PUT /v2/crm/integrations endpoint. It does NOT return native integrations (e.g., SALESFORCE, HubSpot) that are configured through Gong's UI. Note: Gong allows only one active CRM integration at a time (either generic or native). If a native integration is active, you cannot register a generic integration until the native one is disconnected. Returns an empty list if no generic CRM integrations exist. Required OAuth scope: 'api:crm:integrations:read' |
| `GONG_GET_CRM_OBJECTS_V2_CRM_ENTITIES` | Get crm objects v2 crm entities | Retrieves specific CRM objects by their IDs from Gong's CRM integration. Use this endpoint to fetch detailed information about CRM entities (accounts, contacts, deals, or leads) that have been uploaded to Gong through a registered CRM integration. This is particularly useful during development to verify that CRM objects are uploaded and processed correctly. Prerequisites: - A registered CRM integration (use the register CRM integration endpoint first) - CRM objects must be uploaded to Gong before they can be retrieved - You need the specific CRM IDs of the objects you want to fetch The response includes a crmObjectsMap containing the requested CRM objects with their fields and values as defined in your CRM system. |
| `GONG_GET_FLOW_PROSPECTS` | Get Flow Prospects | Tool to retrieve Gong Engage flows assigned to specified prospects. Use when you need to get flow instance IDs and details for specific CRM prospect IDs. Requires 'api:flows:read' scope. |
| `GONG_GET_INTERACTION_STATISTICS` | Get Interaction Statistics | Tool to retrieve interaction trend statistics for users based on calls with Whisper enabled. Use when analyzing user interaction patterns, measuring engagement metrics, or tracking communication behaviors over a specified date range. Returns metrics like interactivity, question rate, longest monologue, and patience levels. |
| `GONG_GET_PERMISSION_PROFILE` | Get permission profile | Returns a permission profile. |
| `GONG_GET_REQUEST_STATUS_V2_CRM_REQUEST_STATUS` | Get CRM Request Status | The GetCRMRequestStatus endpoint retrieves the current status of CRM integration requests in the Gong platform. It allows users to check the progress and outcome of operations related to CRM data uploads, synchronization, or other CRM-related processes. This endpoint is particularly useful for monitoring the health and progress of CRM integrations, troubleshooting issues, and ensuring data consistency between Gong and connected CRM systems. It should be used when you need to verify if a CRM integration request has been completed, is still in progress, or has encountered any errors. The endpoint does not modify any data and is intended for status checking only. Note that the specific details returned may vary depending on the type and complexity of the CRM integration request being queried. |
| `GONG_GET_USER_BY_ID` | Get User By ID | Tool to retrieve individual user details by user ID. Use when you need to fetch specific user information including profile data, settings, and organizational details. |
| `GONG_GET_USER_SETTINGS_HISTORY` | Get User Settings History | Tool to retrieve historical changes to a user's settings. Use when you need to track capability modifications for a specific user identified by their Gong ID. |
| `GONG_LIST_ALL_COACHING_METRICS_V2_COACHING` | List all coaching metrics v2 coaching | List all of the coaching metrics of a manager. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:coaching:read'. |
| `GONG_LIST_ALL_COMPANY_WORKSPACES_V2_WORKSPACES` | List all company workspaces v2 workspaces | Returns a list of all workspaces including their details. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:workspaces:read'. |
| `GONG_LIST_ALL_USERS_V2_USERS` | List all users v2 users | List all of the company's users. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:users:read'. |
| `GONG_LIST_CALL_OUTCOMES` | List Call Outcomes | Tool to retrieve all available call outcomes defined in Gong. Use when you need to list all call outcome configurations including their categories, sentiments, and automation settings. |
| `GONG_LIST_FLOW_FOLDERS` | List Flow Folders | Tool to list all Gong Engage flow folders with visibility types. Use when you need to retrieve company flow folders, personal folders, and folders shared with a specific user. |
| `GONG_LIST_FOLDER_CALLS` | List Folder Calls | Given a folder id, this endpoint retrieves a list of calls in it. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:library:read'. |
| `GONG_LIST_GONG_ENGAGE_FLOWS_V2_FLOWS` | List gong engage flows v2 flows | Engage flows have the following visibility types: * Company: visible to everyone in the company, can only be edited by users with edit permissions. * Personal: reps can set up their own flows which are only available to them. * Shared: reps can share a flow with other reps. Those reps can then add leads to the flow. This endpoint returns all company flows, together with personal flows and flows shared with the user specified in the flowOwnerEmail parameter. When accessed through a Bearer token authorization method, use the 'api:flows:read' scope. |
| `GONG_LIST_SCHEMA_FIELDS_V2_CRM_ENTITY_SCHEMA` | List schema fields v2 crm entity schema | Retrieves schema fields for a specific CRM object type within a Generic CRM integration. Returns field metadata including names, data types (STRING, NUMBER, PICKLIST, etc.), labels, reference relationships, and picklist values for ACCOUNT, CONTACT, DEAL, or LEAD objects. IMPORTANT: Only works with Generic CRM integrations created via /v2/crm/integrations API. Does NOT work with native integrations (Salesforce, HubSpot, Dynamics 365). Required: integrationId (from Generic CRM integration creation), objectType (ACCOUNT/CONTACT/DEAL/LEAD). |
| `GONG_LIST_SCORECARDS` | List Scorecards | Tool to retrieve all scorecards within the Gong system. Use when you need to list all scorecard configurations and their associated assessment questions. |
| `GONG_LIST_TASKS` | List Tasks | Tool to retrieve Engage tasks assigned to a specific user with filtering options. Use when you need to list tasks by status, action type, and other criteria. Requires 'api:tasks:read' scope. |
| `GONG_LIST_USERS_BY_FILTER_V2_USERS_EXTENSIVE` | List users by filter v2 users extensive | List multiple Users. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:users:read'. |
| `GONG_MANAGE_USER_CALL_ACCESS` | Get user call access | Retrieves a list of users who have been granted individual access to specific calls through the API. This endpoint returns only users with explicit API-granted access and doesn't include users who have access through other means (such as being sharing recipients or having access through permission profiles). When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:call-user-access:read'. |
| `GONG_POST_A_DIGITAL_INTERACTION_V2_DIGITAL_INTERACTION` | Post a digital interaction v2 digital interaction | When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:digital-interactions:write'. |
| `GONG_POST_DAY_BY_DAY_ACTIVITY_STATS` | Post day by day activity stats | Retrieve the daily activity of multiple users within the Gong system for a range of dates. This endpoint returns records including statistics about each user's activity, on the daily level. Records are returned only for users with activity in the range. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:stats:user-actions:detailed'. |
| `GONG_REGISTER_CRM_INTEGRATION` | Register Crm Integration | Updates an existing CRM integration in the Gong platform. This endpoint allows you to modify the details of a previously set up integration between Gong and your Customer Relationship Management (CRM) system. It's primarily used for changing the integration's name or reassigning the ownership to a different team member. This operation is crucial for maintaining accurate and up-to-date integration configurations, especially when there are changes in your organization's structure or integration strategies. Note that this endpoint only updates the integration metadata and does not affect the actual data synchronization between Gong and your CRM. |
| `GONG_REPORT_CONTENT_SHARE_EVENT` | Report Content Share Event | Tool to push content share engagement events to Gong's activity timeline. Use when documenting that a Gong user shared content with external participants such as contracts or proposals. |
| `GONG_REPORT_CONTENT_VIEW_EVENT` | Report Content View Event | Tool to log content view engagement events to Gong's activity timeline. Use when tracking external participants viewing shared content like documents or presentations. |
| `GONG_REPORT_CUSTOM_ENGAGEMENT_EVENT` | Report Custom Engagement Event | Report custom engagement events to Gong's activity timeline. Use this action to track when external participants (prospects, customers) engage with content such as viewing documents, signing contracts, attending webinars, or downloading materials. The events appear in Gong's activity timeline and help track customer engagement. Required fields: reportingSystem (identifier for your system), eventTimestamp (ISO-8601 format), and actor information (at minimum actor__email and actor__name) to identify who performed the action. Common use cases: Document viewed, contract signed, webinar attended, presentation downloaded, proposal opened. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:engagement-data:write'. |
| `GONG_RETRIEVE_CALL_DATA_BY_DATE_RANGE_V2_CALLS` | Retrieve call data by date range v2 calls | List calls that took place during a specified date range. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:calls:read:basic'. |
| `GONG_RETRIEVE_DATA_PRIVACY_INFO_FOR_EMAIL_ADDRESS` | Retrieve data privacy info for email address | Retrieves data privacy information for a third-party email address. Shows all elements in the Gong system that reference the given email address, including calls, email messages, meetings, customer data, and engagement events. This endpoint is designed for third-party privacy requests (e.g., customers, prospects, or external contacts) and will reject internal Gong user email addresses. When accessed through a Bearer token authorization, this endpoint requires the scope 'api:data-privacy:read'. |
| `GONG_RETRIEVE_FILTERED_CALL_DETAILS` | Retrieve filtered call details | Lists detailed call data for calls that took place during a specified date range, have specified call IDs or hosted by specified users. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:calls:read:extensive'. Moreover, clients requesting media download URLs by the contentSelector.exposedFields.media field should also have the scope 'api:calls:read:media-url'. |
| `GONG_RETRIEVE_LIBRARY_FOLDERS_V2_LIBRARY_FOLDERS` | Retrieve library folders v2 library folders | Use this endpoint to retrieve a list of public library folders. We do not allow retrieval of either private or archived folders. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:library:read'. |
| `GONG_RETRIEVE_LOGS_DATA_BY_TYPE_AND_TIME_RANGE_V2_LOGS` | Retrieve logs data by type and time range v2 logs | List log entries that took place during a specified time range. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:logs:read'. |
| `GONG_RETRIEVE_MANUAL_CRM_CALL_ASSOCIATIONS` | Retrieve manual crm call associations | Returns a list of all calls that were manually associated or re-associated with CRM account and deal/opportunity since a given time. Actions will be listed in the ascending order of their timing. Notice if a call was associated and later re-associated the API will return both events. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:crm-calls:manual-association:read'. |
| `GONG_RETRIEVE_TRACKER_DETAILS_V2_SETTINGS_TRACKERS` | Retrieve tracker details v2 settings trackers | Retrieves details of all keyword trackers in the system or in a given workspace. When accessed through a Bearer token authorization method, this endpoint requires the 'api:settings:trackers:read' scope. |
| `GONG_RETRIEVE_USERS_FROM_PERMISSION_PROFILE` | Retrieve users from permission profile | Returns a list of all users whose access is controlled by the given permission profile. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:users:read'. |
| `GONG_SET_USER_CALL_ACCESS` | Set User Call Access | Give individual users access to calls. If a user already has access (perhaps the call was shared with them, or they have access through their permission profiles) the request will have no effect. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:call-user-access:write'. |
| `GONG_UNASSIGN_FLOWS_BY_CRM_ID` | Unassign Flows By CRM ID | Tool to unassign flows from prospects by their CRM Prospect ID. Use when you need to remove a prospect from specific flows or all flows in Gong Engage. |
| `GONG_UPDATE_A_GONG_MEETING_V2_MEETINGS_MEETING_ID` | Update a gong meeting v2 meetings meetingid | When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:meetings:user:update'. |
| `GONG_UPDATE_PERMISSION_PROFILE_V2_PERMISSION_PROFILE` | Update permission profile v2 permission profile | Update a permission profile. |
| `GONG_UPLOAD_CRM_OBJECTS_V2_CRM_ENTITIES` | Upload crm objects v2 crm entities | Uploads CRM entity data to Gong via LDJSON file. Use this to insert, update, or delete CRM entities (Accounts, Contacts, Deals, Leads, Stages, Business Users) in Gong's platform. The file should be in LDJSON format (Line-Delimited JSON) where each line is a separate JSON object representing one entity. Each entity object must include 'objectId' (unique CRM ID), 'objectType' (matching the objectType parameter), and 'fields' (array of name-value pairs for entity attributes). Maximum file size is 200MB. After upload, use the returned requestId with /v2/crm/request-status to check processing status. Requires 'api:crm:upload' scope and a registered CRM integration (via /v2/crm/integrations). |
| `GONG_VALIDATE_MEETING_INTEGRATION` | Validate Meeting Integration | Validates Gong meeting integration status for one or more users by their email addresses. This endpoint checks if users have their meeting integration properly configured in Gong. Returns status information including whether users exist, if their integration is valid, and any error messages with help/fix URLs if issues are found. Use this when you need to: - Verify meeting integration is working for specific users - Diagnose meeting recording or import issues - Check if users are properly set up to use Gong meeting features - Troubleshoot why meetings aren't being captured for certain users Note: The API returns an empty array when all specified users have valid integration or when users don't have meeting integration issues to report. |

## Supported Triggers

None listed.

## Creating MCP Server - Stand-alone vs Composio SDK

The Gong MCP server is an implementation of the Model Context Protocol that connects your AI agent to Gong. It provides structured and secure access so your agent can perform Gong operations on your behalf through a secure, permission-based interface.
With Composio's managed implementation, you don't have to create your own developer app. For production, if you're building an end product, we recommend using your own credentials. The managed server helps you prototype fast and go from 0-1 faster.

## Step-by-step Guide

### 1. Prerequisites

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

### 1. Getting API Keys for Claude/Anthropic and Composio

Claude/Anthropic API Key
- Go to the [Anthropic Console](https://console.anthropic.com/settings/organization/api-keys) 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](https://dashboard.composio.dev?utm_source=toolkits&utm_medium=framework_docs).
- Navigate to your API settings and generate a new API key.
- Store this key securely as you'll need it for authentication.

### 2. Install dependencies

No description provided.
```python
pip install composio-anthropic claude-agent-sdk python-dotenv
```

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

### 3. Set up environment variables

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
```bash
COMPOSIO_API_KEY=your_composio_api_key_here
USER_ID=your_user_id_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here
```

### 4. Import dependencies

No description provided.
```python
import asyncio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions
import os
from composio import Composio
from dotenv import load_dotenv

load_dotenv()
```

```typescript
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();
```

### 5. Create a Composio instance and Tool Router session

No description provided.
```python
async def chat_with_remote_mcp():
    api_key = os.getenv("COMPOSIO_API_KEY")
    if not api_key:
        raise RuntimeError("COMPOSIO_API_KEY is not set")

    composio = Composio(api_key=api_key)

    # Create Tool Router session for Gong
    mcp_server = composio.create(
        user_id=os.getenv("USER_ID"),
        toolkits=["gong"]
    )

    url = mcp_server.mcp.url

    if not url:
        raise ValueError("Session URL not found")
```

```typescript
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 Gong
  const session = await composio.create(USER_ID, {
    toolkits: ['gong'],
  });
  const mcpUrl = session?.mcp.url;
```

### 6. Configure Claude Agent with MCP

No description provided.
```python
# Configure remote MCP server for Claude
options = ClaudeAgentOptions(
    permission_mode="bypassPermissions",
    mcp_servers={
        "composio": {
            "type": "http",
            "url": url,
            "headers": {
                "x-api-key": os.getenv("COMPOSIO_API_KEY")
            }
        }
    },
    system_prompt="You are a helpful assistant with access to Gong tools via Composio.",
    max_turns=10
)
```

```typescript
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 Gong tools via Composio.',
  maxTurns: 10,
};
```

### 7. Create client and start chat loop

No description provided.
```python
# Create client with context manager
async with ClaudeSDKClient(options=options) as client:
    print("\nChat started. Type 'exit' or 'quit' to end.\n")

    # Main chat loop
    while True:
        user_input = input("You: ").strip()
        if user_input.lower() in {"exit", "quit"}:
            print("Goodbye!")
            break

        # Send query
        await client.query(user_input)

        # Receive and print response
        print("Claude: ", end="", flush=True)
        async for message in client.receive_response():
            if hasattr(message, "content"):
                for block in message.content:
                    if hasattr(block, "text"):
                        print(block.text, end="", flush=True)
        print()
```

```typescript
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?');
}
```

### 8. Run the application

No description provided.
```python
if __name__ == "__main__":
    asyncio.run(chat_with_remote_mcp())
```

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

## Complete Code

```python
import asyncio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions
import os
from composio import Composio
from dotenv import load_dotenv

load_dotenv()

async def chat_with_remote_mcp():
    api_key = os.getenv("COMPOSIO_API_KEY")
    if not api_key:
        raise RuntimeError("COMPOSIO_API_KEY is not set")

    composio = Composio(api_key=api_key)

    # Create Tool Router session for Gong
    mcp_server = composio.create(
        user_id=os.getenv("USER_ID"),
        toolkits=["gong"]
    )

    url = mcp_server.mcp.url

    if not url:
        raise ValueError("Session URL not found")

    # Configure remote MCP server for Claude
    options = ClaudeAgentOptions(
        permission_mode="bypassPermissions",
        mcp_servers={
            "composio": {
                "type": "http",
                "url": url,
                "headers": {
                    "x-api-key": os.getenv("COMPOSIO_API_KEY")
                }
            }
        },
        system_prompt="You are a helpful assistant with access to Gong tools via Composio.",
        max_turns=10
    )

    # Create client with context manager
    async with ClaudeSDKClient(options=options) as client:
        print("\nChat started. Type 'exit' or 'quit' to end.\n")

        # Main chat loop
        while True:
            user_input = input("You: ").strip()
            if user_input.lower() in {"exit", "quit"}:
                print("Goodbye!")
                break

            # Send query
            await client.query(user_input)

            # Receive and print response
            print("Claude: ", end="", flush=True)
            async for message in client.receive_response():
                if hasattr(message, "content"):
                    for block in message.content:
                        if hasattr(block, "text"):
                            print(block.text, end="", flush=True)
            print()

if __name__ == "__main__":
    asyncio.run(chat_with_remote_mcp())
```

```typescript
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: ['gong']
  });
  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 Gong 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 Gong 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.

## How to build Gong MCP Agent with another framework

- [ChatGPT](https://composio.dev/toolkits/gong/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/gong/framework/open-ai-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/gong/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/gong/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/gong/framework/codex)
- [OpenClaw](https://composio.dev/toolkits/gong/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/gong/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/gong/framework/cli)
- [Google ADK](https://composio.dev/toolkits/gong/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/gong/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/gong/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/gong/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/gong/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/gong/framework/crew-ai)

## Related Toolkits

- [Gmail](https://composio.dev/toolkits/gmail) - Gmail is Google's email service with powerful spam protection, search, and G Suite integration. It keeps your inbox organized and makes communication fast and reliable.
- [Outlook](https://composio.dev/toolkits/outlook) - Outlook is Microsoft's email and calendaring platform for unified communications and scheduling. It helps users stay organized with powerful email, contacts, and calendar management.
- [Slack](https://composio.dev/toolkits/slack) - Slack is a channel-based messaging platform for teams and organizations. It helps people collaborate in real time, share files, and connect all their tools in one place.
- [Microsoft teams](https://composio.dev/toolkits/microsoft_teams) - Microsoft Teams is a collaboration platform that combines chat, meetings, and file sharing within Microsoft 365. It keeps distributed teams connected and productive through seamless virtual communication.
- [Slackbot](https://composio.dev/toolkits/slackbot) - Slackbot is a conversational automation tool for Slack that handles reminders, notifications, and automated responses. It boosts team productivity by streamlining onboarding, answering FAQs, and managing timely alerts—all right inside Slack.
- [2chat](https://composio.dev/toolkits/_2chat) - 2chat is an API platform for WhatsApp and multichannel text messaging. It streamlines chat automation, group management, and real-time messaging for developers.
- [Agent mail](https://composio.dev/toolkits/agent_mail) - Agent mail provides AI agents with dedicated email inboxes for sending, receiving, and managing emails. It empowers agents to communicate autonomously with people, services, and other agents—no human intervention needed.
- [Basecamp](https://composio.dev/toolkits/basecamp) - Basecamp is a project management and team collaboration tool by 37signals. It helps teams organize tasks, share files, and communicate efficiently in one place.
- [Chatwork](https://composio.dev/toolkits/chatwork) - Chatwork is a team communication platform with group chats, file sharing, and task management. It helps businesses boost collaboration and streamline productivity.
- [Clickmeeting](https://composio.dev/toolkits/clickmeeting) - ClickMeeting is a cloud-based platform for running online meetings and webinars. It helps businesses and individuals host, manage, and engage virtual audiences with ease.
- [Confluence](https://composio.dev/toolkits/confluence) - Confluence is Atlassian's team collaboration and knowledge management platform. It helps your team organize, share, and update documents and project content in one secure workspace.
- [Dailybot](https://composio.dev/toolkits/dailybot) - DailyBot streamlines team collaboration with chat-based standups, reminders, and polls. It keeps work flowing smoothly in your favorite messaging platforms.
- [Dialmycalls](https://composio.dev/toolkits/dialmycalls) - Dialmycalls is a mass notification service for sending voice and text messages to contacts. It helps teams and organizations quickly broadcast urgent alerts and updates.
- [Dialpad](https://composio.dev/toolkits/dialpad) - Dialpad is a cloud-based business phone and contact center system for teams. It unifies voice, video, messaging, and meetings across your devices.
- [Discord](https://composio.dev/toolkits/discord) - Discord is a real-time messaging and VoIP platform for communities and teams. It lets users chat, share media, and collaborate across public and private channels.
- [Discordbot](https://composio.dev/toolkits/discordbot) - Discordbot is an automation tool for Discord servers that handles moderation, messaging, and user engagement. It helps communities run smoothly by automating routine and complex tasks.
- [Echtpost](https://composio.dev/toolkits/echtpost) - Echtpost is a secure digital communication platform for encrypted document and message exchange. It ensures confidential data stays private and protected during transmission.
- [Egnyte](https://composio.dev/toolkits/egnyte) - Egnyte is a cloud-based platform for secure file sharing, storage, and governance. It helps teams collaborate efficiently while maintaining data compliance and security.
- [Google Meet](https://composio.dev/toolkits/googlemeet) - Google Meet is a secure video conferencing platform for virtual meetings, chat, and screen sharing. It helps teams connect, collaborate, and communicate seamlessly from anywhere.
- [Heartbeat](https://composio.dev/toolkits/heartbeat) - Heartbeat is a plug-and-play platform for building and managing online communities. It helps you organize users, channels, events, and discussions in one place.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Gong MCP?

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

### Can I use Tool Router MCP with Claude Agent SDK?

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 Gong tools.

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

Yes, absolutely. You can configure which Gong 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 Gong data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
