Developers and agents

Connect your agents and systems to OperationsLens.

The MCP connector lets an AI agent work tickets as a member of your team. The REST API lets your own systems read tickets and customers and create new tickets.

01 · MCP connector

For AI agents: the MCP connector

A remote MCP server that any MCP client can connect to if it supports remote servers with OAuth sign-in. The agent signs in as a member of your team and acts with exactly that member's role and access, under the same rules as the OperationsLens app.

Server URL

https://app.operationslens.ai/mcp

Connecting

  1. Add the server URL to your MCP client as a remote server (a custom connector).
  2. Sign in with your OperationsLens account and choose the organization to connect.
  3. Approve read access, or read and write access.

Good to know

  • Write tools have real effects: a reply is emailed to the customer, just as when your team sends it from the app.
  • Text written by customers is marked as customer data in tool results, so the agent can tell it apart from instructions.
  • Up to 120 requests a minute per connection.

Tools

  • whoami Read

    Your organization, your role, and the companies you can work in

  • list_members Read

    Your teammates, for assigning tickets

  • search_tickets Read

    Find tickets by text, status, priority, assignee or company

  • get_ticket Read

    One ticket and its latest messages

  • create_ticket Write

    Open a ticket, and optionally email it to the customer

  • reply_to_customer Write

    Reply to the customer by email or in the portal

  • add_internal_note Write

    Add a note only your team sees

  • update_ticket Write

    Change status, priority or assignee. Resolving a ticket sends the customer a satisfaction survey

02 · REST API

For your systems: the REST API

Server-to-server access for your own systems: read tickets and customers, create tickets, add messages and fetch resolution figures. Requests authenticate with an organization API key.

API keys are issued by our team on request. A key has read access, write access or both, can have an expiry date, and can be limited to one company.

Endpoints

  • GET /api/v1/tickets Read

    List tickets, newest first, optionally filtered by status

  • GET /api/v1/tickets/:id Read

    One ticket with its messages and tags

  • POST /api/v1/tickets Write

    Create a ticket. The customer is found, or created, by email address

  • POST /api/v1/tickets/:id/messages Write

    Add a message or an internal note to a ticket

  • GET /api/v1/customers Read

    List customers, most recently active first

  • GET /api/v1/customers/:id Read

    One customer and their latest tickets

  • GET /api/v1/analytics/resolutions Read

    Resolution figures for a date range

Authentication

Authorization: Bearer sl_live_…

Example: create a ticket

curl -X POST https://app.operationslens.ai/api/v1/tickets \
  -H "Authorization: Bearer $OPERATIONSLENS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subject":"Order 4411 arrived damaged","customerEmail":"ana@example.com","content":"Two of six boxes crushed."}'

Good to know

  • Up to 100 requests a minute per key. Every response reports the remaining quota in X-RateLimit-* headers.
  • A successful response returns the result in data, with paging details in meta on lists. An error returns error and message.
  • There is no idempotency key: retrying a request that creates a ticket creates a second ticket.

What's available today

Today the MCP connector and the REST API work with tickets and customers: the Customer Desk side of OperationsLens.

We're developing them all the time. If you'd like to connect something that isn't here yet, such as Order Intake or Invoice Check data, tell us: your feedback shapes what we build next.

Building an integration, need an API key, or missing something?

Contact us