# OpenRouter 工作台 Local

> OpenRouter 工作台 Local is an open-source MCP server for analytics and data. Local OpenRouter cost analytics, reports, experiments and routing presets over stdio. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, macOS, Windows, Linux
- **Repository:** https://github.com/cyuanxv/openrouter-analytics-mcp/tree/HEAD/packages/local-mcp
- **MCP Registry name:** io.github.cyuanxv/openrouter-analytics-mcp
- **Categories:** [analytics and data](https://ai-powered.com/categories/analytics-and-data), [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm)
- **Listing updated:** 2026-11-18

## About

This alpha package gives an assistant 28 tools for understanding your own OpenRouter spending. They cover cost analytics, call metadata, anomaly investigation, saved reports, cost experiments and versioned routing presets, with records kept in a local SQLite database that survives restarts and package removal. It is a third-party project, not an OpenRouter product, and its interface text is mainly Chinese.

It needs Node.js 22.22 or newer or 24+, your own OpenRouter management key supplied through client secret settings, and a dedicated private data directory. A doctor command checks the Node version, key permissions and directory access, making at most two fixed read requests, or none with an offline flag.

The local edition has no dashboard, scheduler or automatic Telegram delivery, and it runs no paid inference, top-ups, key changes or production routing switches. It is Apache-2.0 licensed and version 0.6.0-alpha.3.

## Features

- **28 tools:** Cost analytics, reports, experiments and routing presets.
- **Local SQLite storage:** Records stay in a private data directory.
- **Doctor command:** Checks Node, key and directory setup, online or offline.
- **Read-focused safety:** No paid inference, top-ups or key changes.
- **Anomaly investigation:** Looks into cost spikes and call metadata.
- **Versioned presets:** Saves model routing presets with versions.

## Good for

- See where OpenRouter spending goes
- Investigate an unexpected cost spike
- Run a cost experiment between models
- Save a routing preset with version history

## Install

### Claude Code (Terminal)

```sh
claude mcp add openrouter-analytics-mcp --env OPENROUTER_MANAGEMENT_KEY='<OPENROUTER_MANAGEMENT_KEY>' --env OPENROUTER_WORKBENCH_DATA_DIR='<OPENROUTER_WORKBENCH_DATA_DIR>' -- npx -y @cyuanxv/openrouter-analytics-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "openrouter-analytics-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@cyuanxv/openrouter-analytics-mcp"
      ],
      "env": {
        "OPENROUTER_MANAGEMENT_KEY": "<OPENROUTER_MANAGEMENT_KEY>",
        "OPENROUTER_WORKBENCH_DATA_DIR": "<OPENROUTER_WORKBENCH_DATA_DIR>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "openrouter-analytics-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@cyuanxv/openrouter-analytics-mcp"
      ],
      "env": {
        "OPENROUTER_MANAGEMENT_KEY": "<OPENROUTER_MANAGEMENT_KEY>",
        "OPENROUTER_WORKBENCH_DATA_DIR": "<OPENROUTER_WORKBENCH_DATA_DIR>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "openrouter-analytics-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@cyuanxv/openrouter-analytics-mcp"
      ],
      "env": {
        "OPENROUTER_MANAGEMENT_KEY": "<OPENROUTER_MANAGEMENT_KEY>",
        "OPENROUTER_WORKBENCH_DATA_DIR": "<OPENROUTER_WORKBENCH_DATA_DIR>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "openrouter-analytics-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@cyuanxv/openrouter-analytics-mcp"
      ],
      "env": {
        "OPENROUTER_MANAGEMENT_KEY": "<OPENROUTER_MANAGEMENT_KEY>",
        "OPENROUTER_WORKBENCH_DATA_DIR": "<OPENROUTER_WORKBENCH_DATA_DIR>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "openrouter-analytics-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@cyuanxv/openrouter-analytics-mcp"
      ],
      "env": {
        "OPENROUTER_MANAGEMENT_KEY": "<OPENROUTER_MANAGEMENT_KEY>",
        "OPENROUTER_WORKBENCH_DATA_DIR": "<OPENROUTER_WORKBENCH_DATA_DIR>"
      }
    }
  }
}
```

## Tools

- `routerlens_status`: Reports mode, adapter version and what has been verified.

## FAQ

### What do I need?

Node.js 22.22+ or 24+, an OpenRouter management key and a private data directory.

### Does it change my account?

No. It does not modify keys, top up or switch routing.

### Is it official?

No. The README says it is a third-party project.

### What licence?

Apache-2.0.

### Is OpenRouter 工作台 Local free?

Yes. OpenRouter 工作台 Local is open source, so you can use and self-host it for free.

### How do I add OpenRouter 工作台 Local to Claude Code?

Run this command in your terminal: claude mcp add openrouter-analytics-mcp --env OPENROUTER_MANAGEMENT_KEY='<OPENROUTER_MANAGEMENT_KEY>' --env OPENROUTER_WORKBENCH_DATA_DIR='<OPENROUTER_WORKBENCH_DATA_DIR>' -- npx -y @cyuanxv/openrouter-analytics-mcp

### What are the best alternatives to OpenRouter 工作台 Local?

The closest alternatives to OpenRouter 工作台 Local are headroom, omniget, next-ai-draw-io, mcp-for-blender and Agent-Native Analytics.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [headroom](https://ai-powered.com/mcp/headroom-3): headroom is an open-source MCP server for ai models and llm tooling.
- [omniget](https://ai-powered.com/mcp/omniget): omniget is an open-source MCP server for ai models and llm tooling.
- [next-ai-draw-io](https://ai-powered.com/mcp/next-ai-draw-io-2): next-ai-draw-io is an open-source MCP server for ai models and llm tooling.
- [mcp-for-blender](https://ai-powered.com/mcp/mcp-for-blender): mcp-for-blender is an open-source MCP server for design and media.
- [Agent-Native Analytics](https://ai-powered.com/mcp/agent-native-analytics): Agent-Native Analytics is an open-source MCP server for analytics and data.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [unity-mcp](https://ai-powered.com/mcp/unity-mcp-2): unity-mcp is an open-source MCP server for ai models and llm tooling.
- [fastapi_mcp](https://ai-powered.com/mcp/fastapi-mcp): fastapi_mcp is an open-source MCP server for ai models and llm tooling.

---
Source: https://ai-powered.com/mcp/openrouter-local
