Skip to main content
MCP Server URL: https://gdelt-cloud-mcp.fastmcp.app/mcpUse this URL to connect your MCP client to GDELT Cloud.

Quick Setup

Get connected to GDELT data through MCP in just a few steps.
1

Verify your plan

MCP access requires Scout (49/mo),Analyst(49/mo), **Analyst** (499/mo), or Professional ($1,999/mo) planCheck your plan at gdeltcloud.com/dashboard/settings
2

Generate API key

Go to SettingsAPI Keys and create a new key
Copy your API key immediately - it’s only shown once!
3

Choose your integration

Select based on your use case:

FastMCP

Direct Python integration for custom agents

LangChain

Build AI agents with LangChain framework
4

Connect and query

Use the examples below to connect and start querying GDELT data

Configuration Examples

from fastmcp import Client
from fastmcp.client.auth import BearerAuth
import os

# API key authentication
async with Client(
    "https://gdelt-cloud-mcp.fastmcp.app/mcp",
    auth=BearerAuth(token=os.environ["GDELT_API_KEY"])
) as client:
    # List available tools
    tools = await client.get_tools()
    print(f"Available tools: {[t.name for t in tools]}")
    
    # Fetch schemas resource
    schemas = await client.read_resource(
        "gdelt://resources/schemas"
    )
    print(schemas.text)
    
    # Execute a query
    result = await client.call_tool(
        "execute_query",
        arguments={
            "sql": """
                SELECT day, actor1_name, actor2_name, event_code 
                FROM gdelt_events 
                WHERE day >= '2025-04-01' 
                AND action_geo_country_code = 'USA' 
                LIMIT 10
            """
        }
    )
    print(result)
Store your API key in a .env file:
GDELT_API_KEY=gdelt_sk_your_api_key_here

Available MCP Capabilities

The GDELT MCP server provides three types of capabilities:

Tools

Validate and optimize SQL queries before execution
result = await client.call_tool(
    "prepare_query",
    arguments={
        "sql": "SELECT * FROM gdelt_events WHERE day >= '2025-04-01' LIMIT 10"
    }
)
Execute validated SQL queries against GDELT data
result = await client.call_tool(
    "execute_query",
    arguments={
        "sql": "SELECT day, actor1_name FROM gdelt_events LIMIT 10"
    }
)
Format SQL queries for user review (used in alert creation)
result = await client.call_tool(
    "present_sql",
    arguments={
        "sql": "SELECT * FROM gdelt_events WHERE event_code = '14'"
    }
)
Fetch CAMEO codes and schema documentation
result = await client.call_tool(
    "get_resource",
    arguments={
        "uri": "gdelt://resources/codes"
    }
)

Resources

Access static documentation via resource URIs:
  • gdelt://resources/schemas - Database schema documentation
  • gdelt://resources/codes - CAMEO taxonomy (country codes, event codes, themes, etc.)

Prompts

  • gdelt_system_prompt - Core system prompt for GDELT query assistance

Example Queries

Try these natural language queries with your AI agent:
What protests happened in France in the last week?

Next Steps