# AI Connectors & Remote MCP Server (Claude, ChatGPT, Gemini)

RiskWatch provides a production Model Context Protocol (MCP) server over Streamable HTTP at https://api.riskwatch.pl/mcp with OAuth 2.1 + PKCE (S256) authentication, plus an OpenAPI 3.1 specification with operationIds for ChatGPT Actions and Google Gemini.

```
# Remote MCP Streamable HTTP endpoint:
https://api.riskwatch.pl/mcp

# OAuth 2.1 Protected Resource Metadata (RFC 9728):
https://api.riskwatch.pl/.well-known/oauth-protected-resource

# OAuth 2.1 Authorization Server Metadata (RFC 8414):
https://api.riskwatch.pl/.well-known/oauth-authorization-server

# OpenAPI 3.1 Specification:
https://api.riskwatch.pl/v1/openapi.json
```

## Anthropic Claude (claude.ai, Claude Desktop & Claude Code)

In Claude, open Settings -> Connectors -> Add custom connector, enter https://api.riskwatch.pl/mcp, and approve access on the RiskWatch OAuth 2.1 consent screen. In Claude Code or local MCP clients, you can also authenticate directly with a Bearer API key:

```bash
claude mcp add --transport http riskwatch https://api.riskwatch.pl/mcp \
  --header "Authorization: Bearer ***"
```

## OpenAI ChatGPT (Apps in ChatGPT & Custom GPT Actions)

In ChatGPT Developer Mode (Apps SDK), connect the remote MCP server https://api.riskwatch.pl/mcp (OAuth 2.1 PKCE). For Custom GPT Actions in the GPT Store, import the OpenAPI 3.1 contract from https://api.riskwatch.pl/v1/openapi.json and configure only a portal API key as Bearer (rw_live_) authentication. OAuth tokens are for MCP connectors only, not REST Actions.

## Google Gemini (Gemini CLI, Antigravity, Gemini Enterprise)

RiskWatch runs no code inside your Google Cloud project and needs no Google API key: every Gemini path below connects to the same remote MCP server https://api.riskwatch.pl/mcp and signs in with RiskWatch OAuth 2.1 (or a RiskWatch API key).

### 1. Gemini CLI (Code Assist Standard/Enterprise or a paid API key)

Install the RiskWatch extension (integrations/gemini-cli: gemini-extension.json with httpUrl, OAuth and the six read tools in includeTools) or add the server to settings.json yourself, then run /mcp auth riskwatch. Since 2026-06-18, Gemini CLI for unpaid and Google One accounts has been replaced by Antigravity CLI.

```jsonc
// ~/.gemini/settings.json (Gemini CLI, read-only tools)
{
  "mcpServers": {
    "riskwatch": {
      "httpUrl": "https://api.riskwatch.pl/mcp",
      "oauth": { "enabled": true, "scopes": ["read"] },
      "includeTools": ["get_entity_risk", "get_entity_details", "list_entity_events",
                       "list_watchlist", "list_organization_events", "get_usage_quota"]
    }
  }
}
// then, inside Gemini CLI:  /mcp auth riskwatch
```

### 2. Antigravity (CLI, App, IDE)

Antigravity reads remote servers from mcp_config.json under serverUrl (httpUrl is not supported there) and signs in with OAuth through dynamic client registration.

```jsonc
// ~/.gemini/config/mcp_config.json (Antigravity CLI, App and IDE)
{
  "mcpServers": {
    "riskwatch": { "serverUrl": "https://api.riskwatch.pl/mcp" }
  }
}
```

### 3. Gemini Enterprise via Agent Registry

An admin of your governance project registers RiskWatch as an external MCP server in Agent Registry with our published tool specification, then adds it to a Gemini Enterprise app as a data store through Agent Gateway (the app, gateway and registry must be in matching regions). The registration lives in your project and region; RiskWatch does not operate it.

```bash
curl -o toolspec.json https://riskwatch.pl/agent-registry/toolspec.json
gcloud agent-registry services create riskwatch \
  --project=PROJECT_ID \
  --location=REGION \
  --display-name="RiskWatch" \
  --mcp-server-spec-type=tool-spec \
  --mcp-server-spec-content=toolspec.json \
  --interfaces=url=https://api.riskwatch.pl/mcp,protocolBinding=jsonrpc
```

### Tools to try first

- `get_entity_risk` — score, band and register status for one NIP
- `list_organization_events` — HIGH/CRITICAL alerts across the watchlist
- `add_to_watchlist` — start monitoring new contractors (write scope)
- `get_usage_quota` — usage against plan limits

## Example prompts to test your connector

- `Check the risk score and VAT, KRS, and KRZ registry status for Polish contractor NIP <YOUR_VALID_NIP> in RiskWatch.`
- `Add NIP <YOUR_VALID_NIP> to my RiskWatch watchlist with daily VAT and KRS checks, then trigger an immediate registry refresh.`
- `List all HIGH and CRITICAL risk events across my organization in RiskWatch and summarize the findings.`
- `Show my current RiskWatch plan usage and remaining quotas (get_usage_quota).`

## Agent readiness: remote MCP vs WebMCP

What ships today: the remote MCP server above (Streamable HTTP, OAuth 2.1 + PKCE, nine tools). It is the integration path for Claude, ChatGPT, Gemini and any agent running outside the browser.

What does not ship: the RiskWatch portal does not register WebMCP tools (document.modelContext), so in-browser agents get no tools in /app; use the remote MCP server instead. We also publish no A2A Agent Card, because RiskWatch does not serve an A2A protocol binding.

Machine-readable discovery files:

- https://riskwatch.pl/llms.txt — curated index for language models (llms.txt)
- https://riskwatch.pl/docs/ai.md — markdown copy of this page; every docs page has a .md twin
- https://api.riskwatch.pl/v1/openapi.json — OpenAPI 3.1 contract
- https://riskwatch.pl/riskwatch.postman_collection.json — Postman v2.1 collection generated from the OpenAPI
- https://riskwatch.pl/agent-registry/toolspec.json — MCP tool specification for Agent Registry

## Test from the terminal

MCP Inspector connects to the remote server and walks through the OAuth flow. It stores OAuth tokens in the OS keychain, or unencrypted in ~/.mcp-inspector/secrets.json where no keychain exists, so do not run it on shared CI with a production grant.

```bash
# Node 22.19+; opens the Inspector UI and runs the RiskWatch OAuth flow in your browser
npx @modelcontextprotocol/inspector --server-url https://api.riskwatch.pl/mcp --transport http
```

The riskwatch CLI ships in the SDK tarball and reads the key from RISKWATCH_API_KEY; it never prints the key.

```bash
export RISKWATCH_API_KEY="<YOUR_API_KEY>"   # https://riskwatch.pl/app/api-keys

npm exec --package=https://riskwatch.pl/sdk/riskwatch-sdk-1.0.0.tgz riskwatch check <YOUR_VALID_NIP>
npm exec --package=https://riskwatch.pl/sdk/riskwatch-sdk-1.0.0.tgz -- riskwatch vat <YOUR_VALID_NIP> --json

# exit codes: 0 ok, 1 HIGH/CRITICAL or inactive VAT payer, 2 usage, 3 API/network error
```

---

Markdown copy of https://riskwatch.pl/docs/ai (English). Index for language models: https://riskwatch.pl/llms.txt. Generated by scripts/gen-agent-discovery.ts.
