---
name: ristria-search
description: Use Ristria for web search with passage ranking and token-budget packing (max_tokens), PDF/Markdown extraction, site mapping, and similarity discovery via MCP, CLI, or REST.
---

# Ristria Agent Onboarding Skill

> **Status (checked 2026-11-20):** the hosted API at `api.ristria.com` (REST and the hosted MCP server at `https://api.ristria.com/mcp`) and sign-up at `app.ristria.com` are open. The `@ristria/mcp` npm package is not published yet: use the hosted MCP server below, which needs nothing installed.

## Step 1: Ask the user for an API key

Ristria does not issue anonymous keys. Ask the user to sign up at `https://app.ristria.com/sign-up`, create a key at `https://app.ristria.com/keys` (shown once) and paste it to you as `RISTRIA_API_KEY` (`rs_live_...`). The Free plan includes `1,500` credits per month, no card required.

## Step 2: Choose Your Execution Channel

### Recommended: the hosted MCP server (nothing to install)

`https://api.ristria.com/mcp`, Streamable HTTP, header `Authorization: Bearer <key>`. Use the setup for the agent you are running in, then list your MCP servers to check that `ristria` is connected and run one `web_search`.

**Claude Code** (terminal):

```bash
claude mcp add --transport http --header "Authorization: Bearer $RISTRIA_API_KEY" ristria https://api.ristria.com/mcp
```

**OpenAI Codex CLI** (`~/.codex/config.toml`; keep `RISTRIA_API_KEY` in the environment Codex starts from):

```toml
[mcp_servers.ristria]
url = "https://api.ristria.com/mcp"
bearer_token_env_var = "RISTRIA_API_KEY"
```

**OpenCode** (`~/.config/opencode/opencode.json`; add the entry to the existing `mcp` object instead of replacing the file):

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "ristria": {
      "type": "remote",
      "url": "https://api.ristria.com/mcp",
      "enabled": true,
      "headers": { "Authorization": "Bearer rs_live_YOUR_API_KEY" }
    }
  }
}
```

In OpenCode use `web_search`: its tool list shows only short tools.

The options below use the `@ristria/mcp` package and work once it is on npm.

### Option A: Zero-Token Bash CLI (Recommended for Claude Code / OpenCode / Aider)

Avoid loading 3,000 tokens of MCP schemas into every turn by calling the `ristria` CLI directly:

```bash
export RISTRIA_API_KEY="rs_live_..."
export RISTRIA_API_URL="https://api.ristria.com"

# Search the web and pack the top ranked passages into 600 tokens
npx -y -p @ristria/mcp ristria search "Python asyncio TaskGroup exception handling" --limit 5 --max-tokens 600

# Extract clean Markdown from HTML, /llms.txt, or PDF files
npx -y -p @ristria/mcp ristria extract "https://docs.python.org/3/library/asyncio-task.html"

# Map a documentation site (sitemaps + link discovery)
npx -y -p @ristria/mcp ristria map "https://modelcontextprotocol.io" --limit 20
```

### Option B: MCP Server (`stdio`)

Every client below starts `npx -y @ristria/mcp` with `RISTRIA_API_KEY` in its environment. Most of them read the shared `mcpServers` config; the rest have their own format. Checked against each client's own documentation on 2026-10-19.

| Client | Where the config goes | Config |
|---|---|---|
| Claude Code | claude mcp add (terminal) | Claude Code |
| Cursor | ~/.cursor/mcp.json, or .cursor/mcp.json per project | mcpServers |
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json (macOS), %APPDATA%\Claude\claude_desktop_config.json (Windows) (Restart Claude Desktop after saving.) | mcpServers |
| OpenCode | ~/.config/opencode/opencode.json, or opencode.json in the project root | OpenCode |
| Devin Desktop (formerly Windsurf) | ~/.config/devin/mcp_config.json (macOS, Linux), %APPDATA%\devin\mcp_config.json (Windows), .devin/mcp_config.json per project (Windsurf became Devin Desktop on 2026-06-02.) | mcpServers |
| VS Code (GitHub Copilot) | .vscode/mcp.json | VS Code (GitHub Copilot) |
| GitHub Copilot CLI | ~/.copilot/mcp-config.json, or copilot mcp add | GitHub Copilot CLI |
| Zed | ~/.config/zed/settings.json | Zed |
| Cline | MCP Servers → Configure → Configure MCP Servers (cline_mcp_settings.json); CLI: ~/.cline/data/settings/cline_mcp_settings.json | mcpServers |
| Continue | .continue/mcpServers/ristria.yaml | Continue |
| OpenAI Codex CLI | ~/.codex/config.toml, or codex mcp add | OpenAI Codex CLI |
| Gemini CLI | ~/.gemini/settings.json, or .gemini/settings.json per project | mcpServers |
| Antigravity CLI | ~/.gemini/config/mcp_config.json, or .agents/mcp_config.json per workspace | mcpServers |
| Goose | ~/.config/goose/config.yaml (macOS, Linux), %APPDATA%\Block\goose\config\config.yaml (Windows) | Goose |
| Kiro (IDE and CLI, formerly Amazon Q Developer CLI) | ~/.kiro/settings/mcp.json, or .kiro/settings/mcp.json per workspace | mcpServers |
| JetBrains Junie | ~/.junie/mcp/mcp.json, or .junie/mcp/mcp.json per project | mcpServers |
| JetBrains AI Assistant | Settings \| Tools \| AI Assistant \| Model Context Protocol (MCP) → Add → JSON configuration (Its docs show command and args only. If the key is not picked up, add Ristria to Claude Desktop and use Import from Claude.) | mcpServers |
| LM Studio (0.3.17+) | Program tab → Install → Edit mcp.json | mcpServers |
| Warp | ~/.warp/.mcp.json, .warp/.mcp.json per project, or Settings → Agents → MCP servers | mcpServers |
| Amp | ~/.config/amp/settings.json, or .amp/settings.json per workspace | Amp |

#### Shared mcpServers config

Used by Cursor, Claude Desktop, Devin Desktop, Cline, Gemini CLI, Antigravity CLI, Kiro, Junie, JetBrains AI Assistant, LM Studio, Warp.

```json
{
  "mcpServers": {
    "ristria": {
      "command": "npx",
      "args": ["-y", "@ristria/mcp"],
      "env": {
        "RISTRIA_API_KEY": "rs_live_YOUR_API_KEY",
        "RISTRIA_API_URL": "https://api.ristria.com"
      }
    }
  }
}
```

If the file already has an mcpServers object (or other settings, as in Gemini CLI), add the ristria entry to it instead of replacing the file.

#### Claude Code

`terminal`

```bash
claude mcp add ristria \
  -e RISTRIA_API_KEY=rs_live_YOUR_API_KEY \
  -e RISTRIA_API_URL=https://api.ristria.com \
  -- npx -y @ristria/mcp
```

Adds the server to the current project for you only (local scope). Pass --scope user to use it in every project.

#### OpenCode

`~/.config/opencode/opencode.json`

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "ristria": {
      "type": "local",
      "command": ["npx", "-y", "@ristria/mcp"],
      "enabled": true,
      "environment": {
        "RISTRIA_API_KEY": "rs_live_YOUR_API_KEY",
        "RISTRIA_API_URL": "https://api.ristria.com"
      }
    }
  }
}
```

OpenCode uses its own mcp key, not mcpServers.

OpenCode's tool list shows only short tools: use `web_search` there. It is the same search as `search` with default settings, takes only `query`, `intent` and `limit`, and costs 1 credit.

#### VS Code (GitHub Copilot)

`.vscode/mcp.json`

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "ristria-api-key",
      "description": "Ristria API key",
      "password": true
    }
  ],
  "servers": {
    "ristria": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@ristria/mcp"],
      "env": {
        "RISTRIA_API_KEY": "${input:ristria-api-key}",
        "RISTRIA_API_URL": "https://api.ristria.com"
      }
    }
  }
}
```

VS Code uses servers and needs "type": "stdio". The input prompts for the key once, so it never sits in the file.

#### GitHub Copilot CLI

`~/.copilot/mcp-config.json`

```json
{
  "mcpServers": {
    "ristria": {
      "type": "local",
      "command": "npx",
      "args": ["-y", "@ristria/mcp"],
      "env": {
        "RISTRIA_API_KEY": "rs_live_YOUR_API_KEY",
        "RISTRIA_API_URL": "https://api.ristria.com"
      },
      "tools": ["*"]
    }
  }
}
```

Or from the terminal:

```bash
copilot mcp add ristria --env RISTRIA_API_KEY=rs_live_YOUR_API_KEY --env RISTRIA_API_URL=https://api.ristria.com -- npx -y @ristria/mcp
```

#### Zed

`~/.config/zed/settings.json`

```json
{
  "context_servers": {
    "ristria": {
      "command": "npx",
      "args": ["-y", "@ristria/mcp"],
      "env": {
        "RISTRIA_API_KEY": "rs_live_YOUR_API_KEY",
        "RISTRIA_API_URL": "https://api.ristria.com"
      }
    }
  }
}
```

Zed uses context_servers. Merge it into your existing settings.json.

#### OpenAI Codex CLI

`~/.codex/config.toml`

```toml
[mcp_servers.ristria]
command = "npx"
args = ["-y", "@ristria/mcp"]

[mcp_servers.ristria.env]
RISTRIA_API_KEY = "rs_live_YOUR_API_KEY"
RISTRIA_API_URL = "https://api.ristria.com"
```

Or from the terminal:

```bash
codex mcp add ristria --env RISTRIA_API_KEY=rs_live_YOUR_API_KEY --env RISTRIA_API_URL=https://api.ristria.com -- npx -y @ristria/mcp
```

#### Continue

`.continue/mcpServers/ristria.yaml`

```yaml
name: Ristria
version: 0.0.1
schema: v1
mcpServers:
  - name: ristria
    type: stdio
    command: npx
    args:
      - "-y"
      - "@ristria/mcp"
    env:
      RISTRIA_API_KEY: rs_live_YOUR_API_KEY
      RISTRIA_API_URL: https://api.ristria.com
```

Keep the quotes around "@ristria/mcp": a YAML value cannot start with @.

#### Goose

`~/.config/goose/config.yaml`

```yaml
extensions:
  ristria:
    name: ristria
    cmd: npx
    args: ["-y", "@ristria/mcp"]
    envs:
      RISTRIA_API_KEY: rs_live_YOUR_API_KEY
      RISTRIA_API_URL: https://api.ristria.com
    enabled: true
    type: stdio
    timeout: 300
```

Goose names the fields cmd and envs. goose configure → Add Extension → Command-line Extension does the same interactively.

#### Amp

`~/.config/amp/settings.json`

```json
{
  "amp.mcpServers": {
    "ristria": {
      "command": "npx",
      "args": ["-y", "@ristria/mcp"],
      "env": {
        "RISTRIA_API_KEY": "rs_live_YOUR_API_KEY",
        "RISTRIA_API_URL": "https://api.ristria.com"
      }
    }
  }
}
```

Amp uses the flat key amp.mcpServers.

#### In your own agent

Agent frameworks start the same server over stdio and expose the Ristria tools to your agent.

#### OpenAI Agents SDK

`python`

```python
from agents import Agent
from agents.mcp import MCPServerStdio

async with MCPServerStdio(
    name="ristria",
    params={
        "command": "npx",
        "args": ["-y", "@ristria/mcp"],
        "env": {
            "RISTRIA_API_KEY": "rs_live_YOUR_API_KEY",
            "RISTRIA_API_URL": "https://api.ristria.com",
        },
    },
) as server:
    agent = Agent(name="Assistant", mcp_servers=[server])
```

#### LangChain / LangGraph

`python · langchain-mcp-adapters`

```python
from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient(
    {
        "ristria": {
            "transport": "stdio",
            "command": "npx",
            "args": ["-y", "@ristria/mcp"],
            "env": {
                "RISTRIA_API_KEY": "rs_live_YOUR_API_KEY",
                "RISTRIA_API_URL": "https://api.ristria.com",
            },
        },
    }
)
tools = await client.get_tools()
```

langchain-mcp-adapters is no longer maintained; LangChain points new projects to langchain[mcp].

#### Mastra

`typescript · @mastra/mcp`

```typescript
import { MCPClient } from '@mastra/mcp'

const mcp = new MCPClient({
  servers: {
    ristria: {
      command: 'npx',
      args: ['-y', '@ristria/mcp'],
      env: {
        RISTRIA_API_KEY: 'rs_live_YOUR_API_KEY',
        RISTRIA_API_URL: 'https://api.ristria.com',
      },
    },
  },
})
const tools = await mcp.listTools()
```

#### Vercel AI SDK

`typescript · @ai-sdk/mcp`

```typescript
import { createMCPClient } from '@ai-sdk/mcp'
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'

const mcpClient = await createMCPClient({
  transport: new StdioClientTransport({
    command: 'npx',
    args: ['-y', '@ristria/mcp'],
    env: {
      RISTRIA_API_KEY: 'rs_live_YOUR_API_KEY',
      RISTRIA_API_URL: 'https://api.ristria.com',
    },
  }),
})
const tools = await mcpClient.tools()
```

### Option C: REST API

Call `/v1/search` from any language with a Bearer key (highlights and `max_tokens` packing included for **1 credit**):

```bash
curl -s -X POST https://api.ristria.com/v1/search \
  -H "Authorization: Bearer rs_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Google Search Central robots.txt documentazione italiano",
    "include_highlights": true,
    "max_tokens": 600
  }'
```
