---
title: "Connect NationsGlory to Claude: Manage Webhooks, Nabot & API Access"
slug: connect-nationsglory-to-claude-manage-webhooks-nabot-api-access
date: 2026-07-07
author: Nachi Raman
categories: ["AI & Agents"]
excerpt: "Learn how to connect NationsGlory to Claude using a generated MCP server. Automate webhooks, query MMR, and manage API access with natural language."
tldr: "Connect NationsGlory to Claude via Truto MCP servers to automate gaming workflows. This guide covers bypassing undocumented schemas, filtering deprecated endpoints, tool generation, and managing API access."
canonical: https://truto.one/blog/connect-nationsglory-to-claude-manage-webhooks-nabot-api-access/
---

# Connect NationsGlory to Claude: Manage Webhooks, Nabot & API Access


If you are managing NationsGlory game servers at scale, you likely need a way to automate administrative workflows like syncing webhooks, analyzing MMR data, and interacting with the Nabot AI assistant. To do this using Anthropic's Claude, you need a Model Context Protocol (MCP) server. This server acts as the critical translation layer between Claude's LLM function calls and NationsGlory's REST API. You can either spend weeks building and maintaining this custom middleware (see our analysis on the [hidden costs of custom MCP servers](https://truto.one/build-vs-buy-the-hidden-costs-of-custom-mcp-servers/)), or use a managed integration platform like Truto to dynamically generate a secure, authenticated [managed MCP server for Claude](https://truto.one/managed-mcp-for-claude-full-saas-api-access-without-security-headaches/) in seconds. 

If your team relies on OpenAI's models, check out our guide on [connecting NationsGlory to ChatGPT](https://truto.one/connect-nationsglory-to-chatgpt-analyze-mmr-notations-rankings/) or explore our architectural overview on [connecting NationsGlory to AI Agents](https://truto.one/connect-nationsglory-to-ai-agents-automate-auction-house-planning/) for broader deployment strategies.

Giving an AI agent read and write access to a gaming ecosystem like NationsGlory presents unique engineering hurdles. You have to navigate undocumented response schemas, handle legacy deprecated endpoints, and manage rate limits without dropping critical data. This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for NationsGlory, connect it natively to Claude Desktop, and execute complex in-game data analytics and webhook management workflows using natural language.

## The Engineering Reality of the NationsGlory API

A custom MCP server is essentially a self-hosted integration layer. While the open MCP standard provides a predictable framework for models to discover tools, the reality of implementing it against the NationsGlory API is far from straightforward. If you decide to build a custom MCP server, you own the entire API lifecycle. Here are the specific challenges you will face:

**The Deprecated Endpoints Trap**
The NationsGlory API has undergone significant routing changes, leaving a massive footprint of deprecated endpoints (living under the `/deprecated/` path). If you dynamically map an OpenAPI spec to MCP tools without strict curation, you will expose Claude to dozens of redundant endpoints like `list_all_nations_glory_webhooks` versus `list_all_nations_glory_webhook`. If Claude chooses the deprecated endpoint, your AI agent workflows will randomly fail as those legacy routes degrade. A managed MCP server allows you to strictly filter out deprecated routes using metadata tags, ensuring the LLM only interacts with stable, supported API surface area.

**Undocumented Response Schemas**
Many critical NationsGlory endpoints lack enumerated response schemas in their upstream documentation. For example, the `list_all_nations_glory_mmr` endpoint returns matchmaking ratings, but the exact JSON keys in the 200 OK response are not publicly documented. If you build your own MCP server, you have to manually execute requests, inspect the payloads, and write custom JSON schemas so Claude knows what data it is looking at. A documentation-driven system handles these schema definitions centrally, ensuring Claude gets predictable inputs and outputs.

**Rate Limits and 429 Pass-Through**
NationsGlory enforces rate limits to protect server stability. If your AI agent attempts to rapidly pull notations for every country across multiple servers, it will quickly hit a wall. It is a factual reality that Truto does not automatically retry, throttle, or apply exponential backoff when an upstream API returns an HTTP 429 Too Many Requests error. Instead, Truto passes that 429 error directly back to the caller (Claude). However, Truto normalizes the upstream rate limit information into standardized IETF headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`). This allows the caller - whether it is Claude Desktop or a custom LangGraph agent - to read the headers and implement intelligent, mathematically sound backoff logic on its own.

## How to Generate a NationsGlory MCP Server with Truto

Truto generates MCP tools dynamically based on integration resources and documentation, following an [auto-generated tools architecture](https://truto.one/auto-generated-mcp-tools-for-ai-agents-a-2026-architecture-guide/). Tools are never pre-built or cached - they are generated at runtime when Claude requests them via the `tools/list` protocol method. You can create your NationsGlory MCP server through the UI or programmatically via the API.

### Method 1: Via the Truto UI

If you prefer a visual interface, you can generate your server in less than a minute:

1. Log in to your Truto dashboard and navigate to the integrated account page for your NationsGlory connection.
2. Click the **MCP Servers** tab.
3. Click **Create MCP Server**.
4. Select your desired configuration. You can apply filters to restrict the server to specific tags or HTTP methods (e.g., `read` operations only).
5. Click **Create** and securely copy the generated MCP server URL (e.g., `https://api.truto.one/mcp/a1b2c3d4e5f6...`).

### Method 2: Via the Truto API

For platform engineers building multi-tenant AI systems, you can programmatically provision MCP servers per customer. Send a `POST` request to `/integrated-account/:id/mcp`.

```bash
curl -X POST https://api.truto.one/integrated-account/<integrated_account_id>/mcp \
  -H "Authorization: Bearer <YOUR_TRUTO_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "NationsGlory Webhooks and Analytics MCP",
    "config": {
      "methods": ["read", "write", "custom"]
    }
  }'
```

The API returns a securely hashed token and the full server URL:

```json
{
  "id": "mcp_srv_778899",
  "name": "NationsGlory Webhooks and Analytics MCP",
  "config": { "methods": ["read", "write", "custom"] },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f6..."
}
```

This URL encodes the specific NationsGlory account and the configuration filters. It is fully self-contained - the URL alone is enough to authenticate and serve tools to the client.

## How to Connect the MCP Server to Claude

Once you have your Truto MCP URL, connecting it to Claude is a matter of configuration. The Truto server communicates using JSON-RPC 2.0 messages over standard HTTP POST requests, which means it works seamlessly with both the Claude Desktop app and enterprise agent environments.

### Method A: Via the Claude UI (Settings)

If you are using an AI chat interface that supports custom connectors via UI (like Claude for Enterprise or ChatGPT Developer Mode):

1. Open your settings pane (e.g., **Settings -> Integrations -> Add MCP Server**).
2. Provide a recognizable name like "NationsGlory Admin Tools".
3. Paste the Truto MCP URL into the endpoint field.
4. Click **Add** or **Save**.
5. Claude will immediately ping the endpoint, execute the `initialize` handshake, and call `tools/list` to populate its context window with the NationsGlory tools.

### Method B: Via Manual Config File (Claude Desktop)

For Claude Desktop running locally, you define the server using the `claude_desktop_config.json` file. Because Truto MCP servers act as standard Server-Sent Events (SSE) endpoints, you can use the official `@modelcontextprotocol/server-sse` transport.

Open your config file:
* Mac: `~/Library/Application Support/Claude/claude_desktop_config.json`
* Windows: `%APPDATA%\Claude\claude_desktop_config.json`

Add the NationsGlory server configuration:

```json
{
  "mcpServers": {
    "nationsglory-admin": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/a1b2c3d4e5f6..."
      ]
    }
  }
}
```

Restart Claude Desktop. The application will initialize the MCP connection and you will see the "plug" icon indicating the tools are ready to use.

## NationsGlory Hero Tools

When Claude lists the tools, it receives a flat array of available operations mapped directly from the NationsGlory integration resources. Here are the highest-leverage tools available for your LLM workflows.

### list_all_nations_glory_webhook

This tool retrieves all webhooks currently registered in your NationsGlory account. It is critical for auditing your event architecture to ensure automated notifications are routing to the correct endpoints.

**Returns:** `url`, `eventType`.

> "Claude, list all the webhooks currently registered in our NationsGlory account and group them by event type."

### create_a_nations_glory_webhook

This tool registers a new webhook in NationsGlory. This is primarily used to receive real-time notifications about in-game events, player status changes, or country updates directly to your Discord or internal APIs.

**Returns:** `url`, `eventType`.

> "Claude, create a new webhook in NationsGlory pointing to 'https://api.mydomain.com/ng-alerts' for the 'country_update' event type."

### list_all_nations_glory_mmr

Retrieves the Matchmaking Rating (MMR) records from the NationsGlory public API. This is heavily utilized by data analysts looking to track player or country performance over time.

**Optional parameters:** `server` (to target a specific colored server, e.g., 'blue', 'red').

> "Claude, fetch the MMR records for the 'blue' server and summarize the top 10 ratings in a markdown table."

### list_all_nations_glory_notations

Retrieves detailed country notations (scores/evaluations) for a specified week, country, and server. This is essential for auditing country performance and administrative compliance within the game world.

**Optional parameters:** `week` (defaults to 2801), `country` (defaults to france), `server` (defaults to blue).

> "Claude, get the notations for the country 'france' on the 'blue' server for week 2950 and tell me what their economy score was."

### list_all_nations_glory_country

Lists all countries available on a specific NationsGlory game server. This acts as a primary discovery tool for agents needing to map the current geopolitical state of the server before executing deeper queries.

**Required parameters:** `server`.

> "Claude, list all the registered countries on the 'yellow' server and output them as a comma-separated list."

### create_a_nations_glory_nabot_message

Sends a message to Nabot, the NationsGlory AI assistant, and receives its reply. You can supply a `session_uid` to persist conversation memory across requests. This allows your Claude agent to effectively proxy and analyze conversations with the native game assistant.

**Returns:** `message`.

> "Claude, send a message to Nabot asking 'What are the current rules for declaring war?' and summarize its response."

For a complete list of all 30+ endpoints, including OAuth management, auction house data (HDV), and planning tasks, view the complete [NationsGlory integration page](https://truto.one/integrations/detail/nationsglory).

## Workflows in Action

Providing an LLM with these tools allows it to execute complex, multi-step tasks across the NationsGlory API without manual script writing. Here is how Claude handles real-world requests.

### Workflow 1: Auditing and Provisioning Webhooks

Server administrators frequently need to ensure that their alerting infrastructure is correctly hooked up to NationsGlory. Instead of writing custom curl scripts, you can ask Claude to handle the audit and provisioning.

> "Claude, check our NationsGlory account to see if we have a webhook set up for 'country_events'. If we do not, please create one pointing to 'https://api.ourdiscordbot.com/ng-events'."

**Execution Steps:**
1.  Claude calls `list_all_nations_glory_webhook` to retrieve the current active webhook registrations.
2.  Claude parses the JSON response, scanning the `eventType` field for "country_events".
3.  Upon finding that the event type is missing, Claude calls `create_a_nations_glory_webhook` with the URL `https://api.ourdiscordbot.com/ng-events` and the required event type.
4.  Claude responds to the user confirming the new webhook ID and URL have been successfully registered.

```mermaid
sequenceDiagram
    participant User as User
    participant Claude as Claude Desktop
    participant Truto as Truto MCP Router
    participant Upstream as NationsGlory API

    User->>Claude: "Check and create webhook..."
    Claude->>Truto: call tool "list_all_nations_glory_webhook"
    Truto->>Upstream: GET /webhooks
    Upstream-->>Truto: Return array of webhooks
    Truto-->>Claude: JSON-RPC Result
    Claude->>Claude: Analyze data (missing event)
    Claude->>Truto: call tool "create_a_nations_glory_webhook"
    Truto->>Upstream: POST /webhooks
    Upstream-->>Truto: Return 201 Created
    Truto-->>Claude: JSON-RPC Result
    Claude-->>User: "Webhook successfully created."
```

### Workflow 2: Cross-Referencing MMR and Country Notations

Data analysts or server moderators tracking faction balance often need to correlate player skill (MMR) with geopolitical success (Notations). Claude can seamlessly chain these API calls.

> "Claude, fetch the MMR records for the 'red' server. Then, pull the latest notations for the country 'spain' on that same server and give me a brief report on how their notation aligns with the top MMR ratings."

**Execution Steps:**
1.  Claude calls `list_all_nations_glory_mmr` passing `server: "red"`.
2.  Claude analyzes the raw MMR data array, identifying the top performing players.
3.  Claude calls `list_all_nations_glory_notations` passing `country: "spain"` and `server: "red"`.
4.  Claude synthesizes the two datasets, cross-referencing player names from the MMR list against the roster of the Spanish faction, and outputs a formatted markdown report detailing the correlation.

## Security and Access Control

Because Truto exposes direct API access via these tools, securing the MCP server is critical, especially when dealing with webhooks or OAuth endpoints. Truto provides several architectural controls at the token level to lock down access:

*   **Method Filtering:** Use `config.methods` during server creation to restrict operations. Passing `["read"]` ensures Claude can only call `get` and `list` methods, preventing the LLM from accidentally deleting a webhook or creating an OAuth service.
*   **Tag Filtering:** Use `config.tags` to limit the server's scope to specific resource groups. You can restrict an agent so it only sees tools related to `notations` and `mmr`, completely hiding administrative tools.
*   **Extra Authentication:** Setting `require_api_token_auth: true` adds a second layer of security. The MCP client must provide a valid Truto API token in the `Authorization` header. If a URL leaks, it is useless without the accompanying API token.
*   **Automatic Expiration:** Setting `expires_at` gives the MCP server a strict Time-to-Live (TTL). Truto schedules a Durable Object alarm to automatically delete the token and flush it from edge KV storage at the exact expiration time. This is ideal for granting temporary access to contractors or short-lived AI agents.

> Stop writing boilerplate code to maintain gaming APIs. Let Truto generate secure, dynamic MCP servers for your AI agents so you can focus on building intelligent workflows.
>
> [Talk to us](https://cal.com/truto/partner-with-truto)

Integrating AI into legacy or undocumented APIs like NationsGlory does not require a massive engineering effort. By generating a dynamic MCP server through Truto, you bypass the friction of schema mapping, pagination logic, and manual endpoint configuration. You give Claude instant, structured access to your gaming infrastructure, protected by enterprise-grade token scopes and rigorous access controls. Build the tools once, and let your AI agents handle the rest.
