MCP API

When to use: Choose the MCP API when you need direct HTTP access to GWI data from your backend services, or any application that can make HTTP requests. This is the best choice for:

  • Production applications and services
  • Server-side integrations
  • Custom scripts and tools

Request example:

curl --request POST \
  --url https://api.globalwebindex.com/v1/spark-api/mcp/ \
  --header 'Authorization: Bearer GWI_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 7,
  "method": "tools/call",
  "params": {
    "name": "chat_gwi",
    "arguments": {
      "prompt": "What are the best marketing channels for Audi drivers according to GWI?"
    }
  }
}'

Response example:

{
  "jsonrpc": "2.0",
  "id": 7,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "# Data Analysis Result\n\nThe following data contains structured information for you to process:\n- The main response provides a summary of findings\n- Each insight has a unique ID for reference and traceability\n- Source information shows data origin, regions, and time periods\n- The response contains a \"Chat ID\" that should be included in successive requests to the tool.\n## Main Response\nBased on your input, here are some interesting Insights:\n\nChat ID: 0ba7dc9e-7ba4-4aa7-b441-6580955932b4\n\n## Insights\nEach insight below is identified by a unique ID:\n\n- **Insight ID**: 3e76aa8e-ec5d-43bd-891a-be28e0663832\n  **Content**: Audi drivers are 60% more likely than the average person to discover new brands through ads seen in virtual spaces.\n- **Insight ID**: a73fa6ef-cde3-48ee-8b49-0f637cec5161\n  **Content**: 16% of Audi drivers have provided ideas for a new product or design online in the past month.\n- **Insight ID**: 83256e03-6165-4eeb-bdb7-a964c08fba1f\n  **Content**: Audi drivers are 73% more likely than the average person to use micro-blogs when actively looking for more information about brands, products, or services.\n- **Insight ID**: d0a3d9e5-7bea-4584-a2d3-96a46e1dc905\n  **Content**: 18% of Audi drivers use messaging or live chat services when actively looking for more information about brands, products, or services.\n- **Insight ID**: 10f36181-ba71-4a69-842e-2c54904b9696\n  **Content**: Audi drivers are 47% more likely than the average person to find out about new brands through sponsorship of sporting teams, leagues, or events.\n\n## Sources\nThe following metadata describes the origin of the insights:\n\n**Topics**: best marketing channels\n**Datasets**: GWI Core (ds-core)\n**Locations**: Argentina, Australia, Austria, Belgium, Brazil, Canada, Chile, China, Colombia, Denmark, Egypt, France, Germany, Ghana, Greece, Hong Kong, India, Indonesia, Ireland, Israel, Italy, Japan, Kenya, Malaysia, Mexico, Morocco, Netherlands, New Zealand, Nigeria, Norway, Philippines, Poland, Portugal, Romania, Russia, Saudi Arabia, Serbia, Singapore, South Africa, South Korea, Spain, Sweden, Switzerland, Taiwan, Thailand, Turkey, UAE, UK, USA, Vietnam\n**Time periods**: Q3 2024, Q4 2024, Q1 2025, Q2 2025\n## Processing Instructions\nWhen responding to users about this data:\n1. Reference specific insights by their IDs when relevant\n2. Consider the source information for context\n3. Note the time periods when discussing trends\n4. If referring to specific datasets, include both the name and code if available"
      }
    ]
  }
}

MCP Remote

When to use: Choose the MCP remote when your MCP client needs to connect to a local server. This is typically required for:

  • Desktop MCP clients that connect to local servers
  • MCP clients that don’t support direct HTTP endpoints
  • Development and testing of MCP integrations

The MCP remote is an npm package that runs locally on your machine and acts as a bridge between MCP clients and the Spark API. This is available on:

How to use:

  1. Install Node.js for accessing npx on your machine. Please use one of the following methods to install for your OS:

  2. Validate npx exists in your system

    npx -v
    # should print the npx version ex. 10.7.0
    
  3. Use the following configuration for your MCP client:

{
  "mcpServers": {
    "gwi_spark_ai": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://api.globalwebindex.com/v1/spark-api/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer YOUR_GWI_TOKEN_HERE"
      }
    }
  }
}