# Give ChatGPT live threat intelligence

> Add ThreatCluster to ChatGPT as a connector with OAuth sign-in, or call the threat intelligence API from OpenAI function calling or a custom GPT.

Three routes: a ChatGPT connector with no key, function calling from your code, or a custom GPT with Actions.

By [James Mockford](https://threatcluster.io/about#founder) · Founder, ThreatCluster · Last reviewed 1 December 2026 · [Report an error](https://threatcluster.io/corrections)

[Add to ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_6ae8833b90588191be7abfca11ec536a) · Function calling · [Get a free key](https://threatcluster.io/auth/login?signup=1)

## What do I need?

| Key needed | None for the ChatGPT connector (OAuth); a free key for function calling or Actions |
| --- | --- |
| Routes | ChatGPT connector, function calling, custom GPT Actions |
| Budget | 100 credits a day and 7 days on Free |
| Spec | OpenAPI 3.1.0 at /api/public/v1/openapi.json |

## Setup: a connector in ChatGPT

Add the server URL once and sign in. ChatGPT gets 27 tools and no key is typed anywhere.

### 1. Turn on Developer mode

In ChatGPT, open **Settings → Security and login** and turn on **Developer mode**. Custom connectors are only offered with it on.

### 2. Create the app

Open **Plugins**, select **+**, then **Create app** and **Create MCP App**. Enter a name and `https://threatcluster.io/mcp`, leave authentication on **OAuth**, tick the acknowledgement and select **Create**.

ChatGPT discovers the OAuth settings from the server, so leave Advanced OAuth settings empty.

### 3. Sign in

Select **Sign in with ThreatCluster**. A tab opens on the ThreatCluster login page; sign in or create a free account.

The sign-in happens on threatcluster.io. ChatGPT never sees your password.

### 4. Accept

The only permission asked for is offline access, so ChatGPT can refresh its token without prompting again.

The consent screen names the client asking, here ChatGPT.

### 5. Load the tools

Back in ChatGPT the connector shows your account as connected. Select **Refresh** once to load the tool list.

With the default permission, ChatGPT calls read-only tools without asking first.

### 6. Ask a question

In a new chat, select **+** in the message box, choose **ThreatCluster**, and ask something that needs live data.

Prompt: "Which CVEs published this month are in CISA KEV or have a public exploit? Give the top five with KEV and EPSS, and cite the ThreatCluster URLs." Four tool calls, 34 seconds.

On Claude it is one click from the directory: see the [Claude guide](https://threatcluster.io/integrations/claude). Other MCP clients use the same URL: see the [MCP server guide](https://threatcluster.io/integrations/mcp).

## What function calling needs

For function calling and Actions. The ChatGPT connector needs none of this.

- A ThreatCluster account (Free works) and an API key from **Settings → API**, sent in the `X-API-Key` header
- Base URL: `https://threatcluster.io/api/public/v1`
- An OpenAI API key for function calling, or a ChatGPT account that can create GPTs for Actions

A free key gets 100 credits a day, 30 requests a minute and a 7-day lookback. It has the read scopes `threats:read`, `iocs:read`, `entities:read`, `vulns:read` and `darkweb:read`.

## Setup: function calling with the Responses API

One /search tool covers clusters, entities and the dark web. Most agents need only this plus GETs on the detail endpoints.

### 1. Define the tool

It is derived from the live OpenAPI spec for `GET /search`. Returning the budget headers lets the model see each call's cost and what is left.

```
import json, os, requests
from openai import OpenAI

client = OpenAI()

tools = [{
    "type": "function",
    "name": "search_threatcluster",
    "description": "Search ThreatCluster threat clusters, entities and "
                   "dark-web records in one call. Chain the returned "
                   "short_id into /threats/{short_id} detail endpoints.",
    "parameters": {
        "type": "object",
        "properties": {
            "q": {"type": "string", "description": "A CVE id, threat actor, malware family, product or company name"},
            "limit": {"type": "integer", "description": "Max results, default 10"},
            "days": {"type": "integer", "description": "Only look at the last N days"},
            "include_articles": {"type": "boolean", "description": "Include source articles, default false"}
        },
        "required": ["q"],
        "additionalProperties": False
    }
}]

def search_threatcluster(q, limit=10, days=None, include_articles=False):
    params = {"q": q, "limit": limit, "include_articles": include_articles}
    if days is not None:
        params["days"] = days
    r = requests.get(
        "https://threatcluster.io/api/public/v1/search",
        params=params,
        headers={"X-API-Key": os.environ["TC_API_KEY"]},
        timeout=30,
    )
    r.raise_for_status()
    return {
        "cost": r.headers.get("X-Request-Cost"),
        "credits_remaining_today": r.headers.get("X-RateLimit-Remaining"),
        "data": r.json(),
    }
```

### 2. Send a request

```
input_list = [{"role": "user", "content": "What do we know about CVE-2026-46037?"}]

response = client.responses.create(
    model="gpt-5.6",  # any current model with tool calling
    tools=tools,
    input=input_list,
)
```

### 3. Run the calls and ask again

Execute each `function_call` the model returns, append the outputs, and call again.

```
input_list += response.output
for item in response.output:
    if item.type == "function_call":
        result = search_threatcluster(**json.loads(item.arguments))
        input_list.append({
            "type": "function_call_output",
            "call_id": item.call_id,
            "output": json.dumps(result),
        })

response = client.responses.create(model="gpt-5.6", tools=tools, input=input_list)
print(response.output_text)
```

## Setup: a custom GPT with Actions

### 1. Open Actions

In ChatGPT, create a GPT and open the **Actions** section of the editor.

### 2. Import the spec

Choose **Import from URL** and enter `https://threatcluster.io/api/public/v1/openapi.json`. It is OpenAPI 3.1.0, the version the GPT editor expects.

### 3. Add your key

Set authentication to **API key** and paste the key from Settings → API. The spec declares the `X-API-Key` header.

### 4. Test before publishing

Run an action from the editor preview. Note the operation names the import produces and use them in the GPT's instructions.

### Write endpoints

The import includes write endpoints your key's scopes refuse, and a 403 names the missing scope. For fewer actions, paste a trimmed copy of the spec.

## Worked example

A captured request and response. A company name finds leak-site records even with no news cluster.

```
GET /search?q=Intraco
```

 

```
{
  "query": "Intraco",
  "clusters": [],
  "entities": [],
  "darkweb": [
    {
      "type": "victim",
      "name": "PT Intraco Penta Tbk",
      "id": "bdd665d27f502e10",
      "date": "2026-09-01T15:53:54.238628+00:00",
      "group": "direwolf",
      "country": "ID",
      "sector": "Manufacturing"
    }
  ],
  "limit": 10,
  "total": 1
}
```

 Chain the victim `id` into `/darkweb/ransomware/victim/bdd665d27f502e10` for the enriched record. Chain a cluster's `short_id` into `/threats/{short_id}`, `/threats/{short_id}/iocs` or `/threats/{short_id}/stix`.

## Budgets for agents

| Request | Credits |
| --- | --- |
| Most requests | 1 |
| IOC feed, STIX bundle | 3 |
| /search | 5 |
| Dark-web enrichment | 10 |

Every response carries `X-Request-Cost` and the rate headers. A spent budget returns `429` with `Retry-After`, and empty results are refunded.

Endpoints: [API reference](https://threatcluster.io/about/api-reference) and [OpenAPI document](https://threatcluster.io/api/public/v1/docs). Agent keys: [/cli](https://threatcluster.io/cli). Credits by plan: [/pricing](https://threatcluster.io/pricing).

## Vendor documentation

Where a menu name or version here differs from theirs, theirs is current.

- [OpenAI Help: developer mode and MCP connectors in ChatGPT](https://help.openai.com/en/articles/12584461-developer-mode-apps-and-full-mcp-connectors-in-chatgpt-beta)
- [OpenAI docs: function calling](https://developers.openai.com/api/docs/guides/function-calling)
- [OpenAI docs: GPT Actions](https://developers.openai.com/api/docs/actions/introduction)
- [Model Context Protocol specification](https://modelcontextprotocol.io/specification/2025-06-18)

## FAQ

Which OpenAI route should I use?
The ChatGPT connector for chat with no key, function calling from your own code, and a custom GPT with Actions when you want to share a GPT.

Why does ChatGPT not offer custom connectors?
They are only offered with Developer mode turned on under Settings, Security and login.

Why does an action return 403?
The spec imports every endpoint, including ones your key's scopes refuse. The 403 names the missing scope.

## Related

[Lookup tool for LLM agents (script) · →](https://threatcluster.io/build/agent-tool) · [Give your AI agent threat intelligence · →](https://threatcluster.io/guides/give-your-ai-agent-threat-intelligence)

---
Canonical: https://threatcluster.io/integrations/openai  |  API reference: https://threatcluster.io/about/api-reference  |  OpenAPI: https://threatcluster.io/api/public/v1/openapi.json  |  Index for agents: https://threatcluster.io/llms.txt
