npm package: @selanet/mcp-server
Description: MCP Server for SelaNet - HTTP proxy to API Server
Author: Sela Labs
Latest version: 1.0.4

# @selanet/mcp-server

MCP (Model Context Protocol) server for the [SelaNet](https://selanet.ai). Enables AI assistants like Claude to browse the web through Sela's distributed agent network.

## Prerequisites

- **Node.js** >= 18
- **Sela API Key** — get one at [selanet.ai](https://selanet.ai)

## Setup

### Claude Desktop

Add to your Claude Desktop config:

- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "sela": {
      "command": "npx",
      "args": ["-y", "@selanet/mcp-server"],
      "env": {
        "SELA_API_KEY": "sk_live_your_api_key"
      }
    }
  }
}
```

### Claude Code

Add to your project's `.mcp.json`:

```json
{
  "mcpServers": {
    "sela": {
      "command": "npx",
      "args": ["-y", "@selanet/mcp-server"],
      "env": {
        "SELA_API_KEY": "sk_live_your_api_key"
      }
    }
  }
}
```

### Cursor

Add to Cursor's MCP settings (`Settings > MCP Servers > Add`):

```json
{
  "mcpServers": {
    "sela": {
      "command": "npx",
      "args": ["-y", "@selanet/mcp-server"],
      "env": {
        "SELA_API_KEY": "sk_live_your_api_key"
      }
    }
  }
}
```

> **pnpm users**: Replace `"command": "npx"` and `"args": ["-y", "@selanet/mcp-server"]` with `"command": "pnpm"` and `"args": ["dlx", "@selanet/mcp-server"]`.

After adding the config, restart your AI assistant. The `sela_browse` and `sela_browse_parallel` tools will be available automatically.

## Tools

### `sela_browse`

Browse a URL and extract page content as Markdown or HTML.

```
"Browse https://example.com and summarize the page"
```

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | URL to browse |
| `extract_format` | `"markdown"` \| `"html"` | No | Output format (default: `"markdown"`) |
| `query` | string | No | Semantic extraction hint |
| `session_id` | string | No | Reuse an existing browser session |
| `parse_only` | boolean | No | Extract content without LLM planning |
| `include_html` | boolean | No | Include raw HTML in response |
| `count` | number | No | Number of items to collect (pagination) |
| `timeout_ms` | number | No | Request timeout in ms |
| `wait_for_agent` | boolean | No | Wait for an agent to become available |

### `sela_browse_parallel`

Browse multiple URLs in parallel.

```
"Browse these 3 URLs and compare their content"
```

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `requests` | array | Yes | List of browse requests (same shape as `sela_browse`) |
| `max_concurrent_per_agent` | number | No | Max concurrent requests per agent (default: 1) |

## Environment Variables

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `SELA_API_KEY` | Yes | — | API key from [selanet.ai](https://selanet.ai) |
| `SELA_API_URL` | No | `https://api.selanet.ai` | API Server URL |
| `SELA_TIMEOUT` | No | `120000` | Request timeout in ms |

## How It Works

```
AI Assistant (Claude, Cursor, etc.)
        │ MCP (stdio)
        ▼
  @selanet/mcp-server
        │ HTTP
        ▼
  Sela API Server
        │ P2P
        ▼
  Agent Network → Browser (CDP)
```

This package is a thin HTTP proxy — it forwards tool calls to the Sela API Server, which routes requests to available agents in the distributed network. Real browsers with authenticated sessions handle the actual browsing.

## License

MIT