@tsa-ai/opc-mcp-server

Local stdio MCP bridge for the OPC Suite. Connects Claude Desktop, Claude
Code, Codex CLI, Cursor, Cline and any other Model Context Protocol client to
a user's OPC workspace using a personal access token (PAT).
The bridge is a thin pipe — every JSON-RPC frame is forwarded over HTTPS to
the OPC instance's hosted MCP endpoint at /api/mcp, which holds the actual
tool catalog. Upgrading the toolset on the server immediately benefits every
connected agent without users having to update this package.
Setup
- Sign in to your OPC instance and open
Dashboard → Settings → Developer API → AI Connections.
- Pick the AI tool you want to connect, choose the scopes it needs, and
generate a token.
- Add the snippet below to that tool's MCP config (the in-app wizard prints
the exact config for each tool).
{
"mcpServers": {
"opc": {
"command": "npx",
"args": ["-y", "@tsa-ai/opc-mcp-server"],
"env": {
"OPC_BASE_URL": "https://app.your-opc.com",
"OPC_API_TOKEN": "opc_pat_xxxxxxxxxxxxxxxx",
"OPC_AGENT_KIND": "claude"
}
}
}
}
Environment variables
OPC_BASE_URL | yes | — | Base URL of the OPC instance (no trailing slash) |
OPC_API_TOKEN | yes | — | opc_pat_… token issued via the AI Connections wizard |
OPC_AGENT_KIND | no | stdio | Used in audit logs to identify the calling agent |
Tools exposed
The catalog lives on the server side (single source of truth) and currently
includes:
- Contacts —
list_contacts, get_contact, create_contact, update_contact
- Products & inventory —
list_products, get_product, list_inventory,
adjust_inventory
- Sales —
list_sales_orders, create_sales_order, list_quotations,
create_quotation
- Accounting —
get_profit_and_loss, get_balance_sheet, get_aging_report,
get_accounting_summary
- AI Advisor —
ask_opc_advisor
- Agent cowork board —
create_agent_task, list_agent_tasks,
claim_agent_task, append_agent_task_note, complete_agent_task
Each tool is gated by an OAuth-style scope on the user's PAT, so users grant
only the permissions a given AI tool needs. The current scope on the token
also constrains the result of tools/list, so agents only see tools they can
actually call.
Audit & retention
Every tool call is logged on the server with the calling agent, latency, and
status (ok / denied / error). Users can review activity in the Usage tab
of Developer API settings. Audit rows are retained for 90 days; completed
agent tasks for 180 days.
Local development
cd packages/opc-mcp
npm install
npm run build
OPC_BASE_URL=http://localhost:3000 OPC_API_TOKEN=opc_pat_... node dist/index.js
The bridge only forwards traffic — to add or modify tools, edit
lib/mcp/registry.ts in the OPC repo, not this package.
License
MIT