Skip to content

Connect Cognism to ChatGPT: Search, Filter, and Redeem Prospect Data

A definitive engineering guide to connecting Cognism to ChatGPT using a managed MCP server. Automate prospect search, data enrichment, and credit redemptions.

Nachi Raman Nachi Raman · · 10 min read
Connect Cognism to ChatGPT: Search, Filter, and Redeem Prospect Data

If you need to connect Cognism to ChatGPT to automate account-based marketing, prospect research, and data enrichment, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between ChatGPT's tool calls and Cognism's REST APIs. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL.

If your team uses Claude, check out our guide on connecting Cognism to Claude or explore our broader architectural overview on connecting Cognism to AI Agents.

Giving a Large Language Model (LLM) read and write access to a premium B2B data provider like Cognism is a massive engineering challenge. You have to handle unique search-and-redeem API mechanics, manage strict compliance checks, and ensure the agent does not burn through expensive API credits by hallucinating recursive extraction loops. Every time a developer adds a new filter or updates a schema, your custom server code must be updated, redeployed, and tested.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Cognism, connect it natively to ChatGPT, and execute complex prospecting workflows using natural language.

Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds. :::

The Engineering Reality of the Cognism API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, implementing it against Cognism's highly specific API mechanics is exceptionally painful.

If you decide to build a custom MCP server for Cognism, you own the entire API lifecycle. Here are the specific integration challenges that break standard CRUD assumptions when working with Cognism:

The Two-Step "Preview and Redeem" Architecture

Unlike standard SaaS platforms where a GET /contacts request returns the actual contact data, Cognism protects its proprietary database behind a credit system. When you execute a search, you do not get emails or phone numbers. Instead, you receive "preview" records with boolean flags indicating data availability (e.g., hasEmail, hasDirectDial, hasMobile). To get the actual data, you must take the ID from the search result and pass it to a separate "Redeem" endpoint, which deducts credits from your account. If you give an LLM raw API access without strictly defined MCP tools representing this two-step flow, the LLM will either hallucinate the missing data or burn through your entire credit quota by redeeming every single search result blindly.

Entitlement-Driven Schemas

Cognism's API response structures mutate based on your subscription tier. If your account is only entitled to specific data points (e.g., European phone numbers but not US intent data), the API fields will silently change or drop. Building static MCP schemas for Cognism means writing a schema parser that reads the user's specific Entitlements configuration and dynamically generates the JSON-RPC tool definitions. If you skip this, your LLM will continuously attempt to request data types your account cannot access, resulting in endless HTTP 403 errors and broken agent loops.

Array-Heavy Search Constraints

Cognism's search endpoints are incredibly powerful, allowing filtering across dozens of criteria (job titles, NAICS codes, tech stacks). However, the API expects these as highly specific array payloads, with strict maximums (up to 1000 terms per field). An LLM natively struggles with formatting complex nested arrays correctly without precise JSON schema validation guiding its tool calls.

Cognism to ChatGPT Quickstart Guide

If you just want the fastest path from a fresh Truto account to ChatGPT calling the Cognism API, follow these five steps. Deeper architecture, security, and lifecycle details live in the sections below.

What you need:

  • A Truto account with API access.
  • A Cognism admin account with an active API token.
  • A ChatGPT Pro, Plus, Business, Enterprise, or Education seat with Developer mode available.

Step 1: Connect Cognism as an Integrated Account

First, you need to establish the baseline API connection. In the Truto dashboard, open Integrated Accounts -> New Integrated Account, select Cognism, and provide your API credentials. Truto securely vaults this credential so ChatGPT never handles the raw API key.

Step 2: Grab your Integrated Account ID

You need the unique identifier for this specific Cognism connection. You can copy it directly from the account detail page in the Truto UI, or list it via the API:

curl https://api.truto.one/integrated-account \
  -H "Authorization: Bearer $TRUTO_API_TOKEN"

Step 3: Generate a Cognism MCP Server

Truto can derive an MCP server directly from the integrated account. You can do this via the Truto UI or programmatically via the API.

Method A: Via the Truto UI

  1. Navigate to the integrated account page for your Cognism connection.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Select your desired configuration (e.g., filtering to specific tags like "contacts" or "compliance").
  5. Copy the generated MCP server URL.

Method B: Via the API Make a single POST call to scope an MCP endpoint to that account. You can filter by methods and tags to strictly constrain what ChatGPT can touch (highly recommended to prevent accidental credit spend):

curl -X POST https://api.truto.one/integrated-account/$INTEGRATED_ACCOUNT_ID/mcp \
  -H "Authorization: Bearer $TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Cognism Prospecting Server",
    "config": {
      "methods": ["read", "write", "custom"],
      "tags": ["search", "redeem", "compliance"]
    }
  }'

The response contains a url field (e.g., https://api.truto.one/mcp/<token>). That single URL carries routing and authentication - treat it like a secret.

Step 4: Register the MCP Server with ChatGPT

Now, tell ChatGPT where to find your new tools. You can do this via the ChatGPT application settings or via a standard MCP configuration file.

Method A: Via the ChatGPT UI

  1. In ChatGPT, navigate to Settings -> Apps -> Advanced settings.
  2. Enable Developer mode.
  3. Under MCP servers / Custom connectors, click Add new server.
  4. Enter a name (e.g., "Cognism Prospecting").
  5. Paste the Truto MCP URL into the Server URL field and click Save.

Method B: Via manual config file If you are orchestrating agents locally or using a CLI runner, you can register the server using the standard JSON configuration approach:

{
  "mcpServers": {
    "cognism": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/<your-secure-token>"
      ]
    }
  }
}

Step 5: Start Prompting

Open a new ChatGPT session and test the connection. Try a prompt like: "Search Cognism for VPs of Engineering at software companies in London, and tell me how many have valid email addresses available."

ChatGPT will transparently call the Truto MCP server, fetch the schema, execute the search, and return the preview results.

Hero Tools for Cognism

Truto automatically generates detailed MCP tools from Cognism's documentation. Here are the highest-leverage tools available for your AI agents.

Search Contacts Preview

Tool Name: list_all_cognism_search_contacts

This is the starting point for any contact workflow. It allows the agent to search the global database by job title, location, seniority, skills, and account attributes. Critically, this tool does not deduct credits. It returns preview flags (id, hasEmail, hasDirectDial) so the agent can assess data quality before committing to a purchase.

"Find 10 contacts who are Chief Information Security Officers in the financial services sector in New York. Only show me the ones that have a high-quality direct dial flag set to true."

Redeem Contacts

Tool Name: cognism_contacts_redeem

This tool executes the actual data purchase. The agent takes the id values acquired from the search tool and passes them here. This returns the full payload including firstName, lastName, phoneNumbers, and exact email addresses, deducting from your Cognism credit balance.

"Take the 3 contact IDs I just found that have direct dials, and redeem them to get their full contact profiles and phone numbers."

Search Accounts Preview

Tool Name: list_all_cognism_search_accounts

Ideal for ABM (Account-Based Marketing) workflows, this tool searches company records by domain, industry, revenue, technology stack, and headcount. Like the contact search, it returns preview flags indicating if the account has associated technographics or firmographics available to redeem.

"Search for manufacturing companies in Germany with revenue over 50 million that are using Salesforce, and list their account IDs."

Redeem Accounts

Tool Name: cognism_accounts_redeem

Spends credits to retrieve the full firmographic profile of an account based on its ID. The response includes deep data points like NAICS/SIC codes, full descriptions, location arrays, and specific technology usage details based on your account entitlement.

"Redeem account ID 'xyz-123' to get the full list of technologies they currently use and their exact global headcount."

Check Opt-Out Compliance by Email

Tool Name: cognism_compliance_get_opt_out_by_email

An absolutely critical tool for outbound sequencing. Before an agent passes an email to a downstream sequencer (like Outreach or Salesloft), it can verify if the prospect exists on the global opt-out list. A successful response indicates the user has opted out, protecting your domain reputation and GDPR compliance.

"Check if 'jdoe@example.com' is on the global opt-out list before we add them to the outbound sequence."

List Technology Filters

Tool Name: cognism_filters_search_technologies

Cognism tracks thousands of technologies. Because LLMs might hallucinate the exact string required for a tech search (e.g., guessing "AWS" instead of the required "Amazon Web Services"), this tool allows the agent to search the valid technology taxonomy first, ensuring subsequent account searches succeed.

"Search the technology filters for 'HubSpot' and tell me the exact string ID I need to use for an account search."

For the complete inventory of available tools - including ISIC code lookups, enrichment endpoints, and entitlement checks - see the Cognism integration page.

Workflows in Action

By chaining these tools together, ChatGPT transitions from a simple chat interface into an autonomous revenue operations agent. Here are two real-world sequences.

Scenario 1: Autonomous ICP Prospecting and Redemption

Sales development teams waste hours manually filtering lists and guessing which contacts have valid data. You can instruct ChatGPT to execute a highly targeted search, evaluate the data quality, and selectively redeem only the best prospects.

"I need a list of 5 valid prospects. Search for Director of IT contacts at healthcare companies in Texas. Check the results, and ONLY redeem contacts where 'hasDirectDial' is true and the match quality is high. Once you have 5 redeemed profiles, output their names, titles, and phone numbers."

How the agent executes this:

  1. Calls list_all_cognism_search_contacts with industry set to healthcare, state set to Texas, and title set to Director of IT.
  2. Analyases the response, looking specifically at the hasDirectDial boolean flags on each returned object.
  3. Extracts the id values for 5 contacts that meet the strict criteria.
  4. Calls cognism_contacts_redeem passing those 5 IDs in the redeemIds array.
  5. Parses the final payload to present the requested contact details to the user.
sequenceDiagram
    participant Agent as ChatGPT Agent
    participant Truto as Truto MCP Server
    participant Cognism as Cognism API
    Agent->>Truto: list_all_cognism_search_contacts (Healthcare, TX, IT)
    Truto->>Cognism: POST /search/contacts
    Cognism-->>Truto: Returns preview (IDs, hasDirectDial)
    Truto-->>Agent: Returns schema-mapped preview
    Agent->>Truto: cognism_contacts_redeem (redeemIds: [id1, id2...])
    Truto->>Cognism: POST /redeem/contacts
    Cognism-->>Truto: Returns full contact data (Credits deducted)
    Truto-->>Agent: Returns parsed payload

Scenario 2: ABM Enrichment and Compliance Auditing

Revenue Ops teams often receive raw lists of domains that need to be enriched and checked for compliance before a campaign begins.

"I have a target account: 'acmecorp.com'. First, enrich this account to find their firmographic data. Then, search for their VP of Marketing. Finally, check if the email address you find for the VP is on the compliance opt-out list."

How the agent executes this:

  1. Calls cognism_accounts_enrich using the unique domain identifier "acmecorp.com".
  2. Calls cognism_accounts_redeem using the returned account ID to get full data.
  3. Calls list_all_cognism_search_contacts filtering by the account name and "VP of Marketing".
  4. Calls cognism_contacts_redeem on the resulting contact ID to acquire the email address.
  5. Calls cognism_compliance_get_opt_out_by_email with the extracted email to verify outbound safety.
  6. Reports the final, compliance-checked profile back to the user.

Security and Access Control

Exposing a credit-burning database API to an LLM requires strict guardrails. Truto's MCP architecture provides several layers of control directly on the server URL generation, ensuring ChatGPT can only do exactly what you authorize.

  • Method Filtering: When creating the MCP server, you can restrict operations by passing config.methods. For example, setting "methods": ["read"] ensures the agent can only perform searches and lookups, explicitly blocking it from executing redeem calls that spend credits.
  • Tag Filtering: You can restrict the server to specific functional areas using config.tags. Passing "tags": ["compliance"] restricts the server strictly to opt-out checks, making it perfectly safe for a compliance-auditing agent to use without exposing the broader search API.
  • Mandatory API Token Auth: By setting require_api_token_auth: true, possession of the MCP URL alone is not enough. The client (or agent runner) must also pass a valid Truto API token in the Authorization header, preventing unauthorized internal access if the URL leaks in a Slack channel or log file.
  • Time-to-Live (TTL): Using the expires_at parameter, you can generate ephemeral MCP servers. This is ideal for giving a contractor or temporary AI worker access to Cognism data for exactly 24 hours, after which the database automatically deletes the server and revokes the URL.
  • Rate Limits are Passed Through: Truto does not retry, throttle, or apply arbitrary backoff to Cognism API rate limits. If the upstream Cognism API returns an HTTP 429 error, Truto passes that error directly to ChatGPT. Truto normalizes the upstream rate limit information into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller (or the agent framework) is fully responsible for executing its own retry and backoff logic.

Automate Prospecting Without the Boilerplate

Connecting ChatGPT to Cognism unlocks autonomous pipeline generation, intelligent data enrichment, and automated compliance auditing. But building a custom integration layer to handle Cognism's unique search-and-redeem mechanics, entitlement schemas, and nested array payloads is a massive distraction for your engineering team.

By leveraging Truto, you can generate a secure, authenticated MCP server in minutes. Your team gets native AI tool calling, comprehensive security guardrails, and completely abstracted OAuth management, while you focus on building superior revenue workflows instead of maintaining infrastructure.

Stop wrestling with custom API integration code. Generate managed MCP servers for Cognism and 100+ other enterprise tools with Truto today. :::

FAQ

How does the MCP server handle Cognism's credit system?
The MCP server exposes Cognism's functionality exactly as defined in their API. It generates separate tools for 'searching' (which returns free previews) and 'redeeming' (which costs credits to fetch full data). You can use Truto's method filtering to prevent AI agents from calling the redeem endpoints if you only want them to execute free searches.
Can I restrict ChatGPT to only check compliance opt-outs?
Yes. When generating the MCP server in Truto, you can apply tag filters such as ["compliance"]. This scopes the generated URL so it only serves tools related to opt-out checks, completely hiding the search and redeem tools from the LLM.
How does Truto handle Cognism API rate limits?
Truto does not retry or throttle rate limit errors. If Cognism returns an HTTP 429, Truto passes the error directly to the caller and normalizes the rate limit information into standard headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). Your agent framework is responsible for handling backoff logic.

More from our Blog