Model Context Protocol

Connect AI to Your Live Business Data

The OPC MCP Server gives AI assistants scoped, audited access to your CRM, accounting, inventory, and every other OPC module — via a single Streamable HTTP endpoint.

Endpoint
https://www.myopc.io/api/mcp

Transport: Streamable HTTP · Also available as stdio via @tsa-ai/opc-mcp-server npm package.

Prerequisites

Two Authentication Paths

OAuth 2.1 + PKCE

Preferred for desktop agents. Add a URL-only config — the client handles browser consent automatically. No tokens to copy.

Personal Access Token (PAT)

For Cursor, CLI, and CI/CD. Generate in AI Connections wizard with scoped permissions. Passed as Bearer opc_pat_….

Step-by-step Connection

Codex CLI

  1. Install the plugin:
  2. codex plugin install opc
  3. Start the OAuth login:
  4. codex mcp login opc
  5. Approve access in your browser — done.

Codex Desktop / Claude Desktop

  1. Open Settings → Developer / MCP Servers → Edit Config.
  2. Paste the URL-only config below. Save and restart.
  3. A browser window will open for OAuth consent — approve it.
{
  "mcpServers": {
    "opc": {
      "type": "http",
      "url": "https://www.myopc.io/api/mcp"
    }
  }
}

Cursor

  1. Create .cursor/mcp.json in your project (or ~/.cursor/mcp.json globally).
  2. Generate a PAT from Dashboard → Settings → Developer → AI Connections.
  3. Paste the config below, replacing <YOUR_PAT>.
{
  "mcpServers": {
    "opc": {
      "type": "http",
      "url": "https://www.myopc.io/api/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_PAT>"
      }
    }
  }
}

Claude Code (CLI)

  1. Run the following command:
  2. claude mcp add --transport http opc https://www.myopc.io/api/mcp --header "Authorization: Bearer <YOUR_PAT>"

ChatGPT Desktop

  1. Open Settings → Connectors → Add MCP Server.
  2. Set transport to "Streamable HTTP".
  3. Enter URL: https://www.myopc.io/api/mcp
  4. Authentication: OAuth — a browser window will open for consent.

stdio bridge (CI / scripts)

  1. Set env vars OPC_BASE_URL and OPC_API_TOKEN (your PAT).
  2. Run the bridge:
  3. npx -y @tsa-ai/opc-mcp-server

Scopes & Safety

Each PAT or OAuth grant is scoped to specific modules. Use least-privilege — only grant what the agent needs.

contacts.read / contacts.write
orders.read / orders.write
accounting.read / accounting.write
inventory.read / inventory.write
hrm.read / hrm.write
agent-tasks.*
all (full access)

All tool calls are audit-logged. View usage in Dashboard → Settings → Developer → Usage.

Troubleshooting

401Token expired or missing. Re-authenticate or regenerate PAT.
402No active subscription. Subscribe or start a trial at /pricing.
403Scope insufficient. Check your PAT scopes in AI Connections.