Skip to content
This page was translated from the Chinese original, which has changed since — it may be out of date. The Chinese version is authoritative. View the Chinese original →
Cross-product tutorial

Unified AI CLI Access for Teams

Consolidate the AI CLI configs, MCP servers, and model keys scattered across every engineer's machine into one central config: Switch handles MCP and sync, Lurus API handles models and billing.

Products involved

Switch (desktop tool management) · Lurus API (unified gateway) · MCP servers (Kova / GitHub / PostgreSQL, etc.). This tutorial only references capabilities already documented for each product.

What you'll get ​

Before (every person on their own)After (unified with Switch)
Everyone hand-writes mcp_servers.json, with inconsistent tool versionsOne central mcp.yaml, with visible_to delivering on demand
Each CLI gets its own set of Provider keysAll traffic goes through Lurus API — one key, one bill
Model costs are invisibleSwitch cost dashboard aggregates by tool / model

Step 1

Install Switch and connect the gateway

  1. Install Switch following the installation guide (macOS / Windows / Linux).

  2. In Settings, enter your Lurus API KeyAPI KeyA secret credential for accessing the API, much like a password. Each Key can have its own quota and permissions.Learn more → (how to get one) so every CLI calls models uniformly through https://hub.lurus.cn/v1 — one key, one bill.

  3. Verify the local proxy is running (default port 19090):

    bash
    curl http://localhost:19090/v1/models

Step 2

Write one central MCP config

Switch manages all MCP servers from a single ~/.lurus-switch/mcp.yaml, and visible_to decides which ones each CLI sees.

yaml
servers:
  github:
    command: npx
    args: [-y, '@modelcontextprotocol/server-github']
    env:
      GITHUB_TOKEN: ${GITHUB_TOKEN}
    visible_to: [claude-code, codex]

  postgres:
    command: docker
    args: [run, -i, --rm, mcp/postgres, 'postgres://localhost/dev']
    visible_to: [claude-code]

  kova:                       # Kova Agent 作为工具暴露
    url: http://localhost:3333
    type: http
    visible_to: [claude-code, codex, gemini]

visible_to drives on-demand delivery

When you switch to any CLI, Switch dynamically generates that CLI's mcp_servers.json based on visible_to, so each tool only sees the servers assigned to it. See the integration catalog for the list of connectable servers, and MCP Servers for management details.

Step 3

See the costs, then sync to the team

  1. Open Switch's cost monitoring to view token consumption by tool / model — since all calls go through the same Lurus API Key, the bill is unified.

  2. Once the config is confirmed correct, use team sync to distribute this mcp.yaml to the team, so new members are ready out of the box with a consistent version.

What you can add next

Connect MemX memory to your CLI (the memory_search / memory_add tools) so the agent remembers project conventions; or connect Lumen for call tracing and cost alerts.

Next steps

Powered by Lurus Technologies