---
title: Connect
url: https://docs.kaltura.com/docs/tools-skills-mcp/conversational-agents-mcp/conversational-agents-mcp-connect
---

## Connect

The server accepts `Authorization: KS <ks>` or `Authorization: Bearer <ks>`.

### Claude Code

```bash
export GENIE_KS="<your KS>"
claude mcp add --transport http genie-search https://genie.nvp1.ovp.kaltura.com/mcp/ \
  --header "Authorization: KS $GENIE_KS"
```

Run `/mcp` in Claude Code to confirm the server shows as connected.

### Shared Config File

To keep the KS out of a file you commit, reference an environment variable. In a Claude Code project `.mcp.json`:

```json
{
  "mcpServers": {
    "genie-search": {
      "type": "http",
      "url": "https://genie.nvp1.ovp.kaltura.com/mcp/",
      "headers": { "Authorization": "KS $\{GENIE_KS\}" }
    }
  }
}
```

Other clients use the same URL and header, but field names vary (for example, VS Code uses `servers` instead of `mcpServers`). Check your client's MCP docs.

### When the KS Expires

The KS is a fixed header. When it expires, every call returns 401, and the client will not prompt you to log in because the server has no OAuth flow. Generate a new KS and update the header or the environment variable.

### Test with curl

```bash
curl -sS -X POST https://genie.nvp1.ovp.kaltura.com/mcp/ \
  -H "Authorization: KS $GENIE_KS" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

The server is stateless, so you can send `tools/list` or `tools/call` directly, without `initialize`. The reply arrives as a server-sent event: an `event: message` line followed by `data: {...}`.
