# webmcpx MCP server

> Enables AI agents to call specific tools on websites instead of parsing DOM content, significantly reducing token usage.

- Repository: https://github.com/webmcpx/webmcpx
- Page: https://hostedmcp.org/servers/webmcpx/webmcpx
- Transport: stdio
- Stars: 5
- License: MIT

## Install

### Claude Code

```sh
claude mcp add webmcpx -- npx -y webmcpx
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "webmcpx": {
      "command": "npx",
      "args": [
        "-y",
        "webmcpx"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "webmcpx": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "webmcpx"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"webmcpx","type":"stdio","command":"npx","args":["-y","webmcpx"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "webmcpx": {
      "command": "npx",
      "args": [
        "-y",
        "webmcpx"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add webmcpx -- npx -y webmcpx
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.webmcpx]
command = "npx"
args = ["-y", "webmcpx"]
```

### Gemini CLI

```sh
gemini mcp add -s user webmcpx npx -- -y webmcpx
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "webmcpx": {
      "command": "npx",
      "args": [
        "-y",
        "webmcpx"
      ]
    }
  }
}
```

## FAQ

### How does WebMCP reduce token usage?

Instead of an agent reading and clicking through a full page, it calls specific tools registered on the site, which can use up to 62x fewer tokens in best-case scenarios.

### How do I make my website agent-ready?

You can add a single script tag before the closing body tag of your site to register standard tools like search and page context.

### Does it work on browsers that don't natively support WebMCP?

Yes, the script includes a W3C WebMCP polyfill that is fetched for browsers like Firefox, Safari, or Chrome without the required flag.

### Can I create my own custom tools for my site?

Yes, you can define custom tools using the webmcpx library or via a declarative HTML form API.
