oxagenDocs
Collectors

MCP server

Read work items from any tool that ships an MCP server, write status and comments back, and map its fields and values to Oxagen's.

A support team's Cases live in Salesforce and its Zendesk Support queue holds the rest, and neither has a native Oxagen collector. If the tool ships an MCP server, you can collect from it anyway. Add an MCP server collector in Work setup, under Collectors, and pick a server the workspace registered in Tools.

If the workspace has not registered the server yet, select Find an MCP server under the server field. It opens the same connect step Tools uses: search the verified servers and the official MCP Registry, or type the server's endpoint, then sign in or give its token. Oxagen registers the server in Tools and picks it for the collector. The step offers only servers Oxagen reaches over the network, so a package that runs on a machine is added in Tools instead.

An MCP server collector reads and writes through the server's own tools. You name the tool that lists items, the tool that reads one item, and the tools that update a field, add a comment, and create an item. You also say where each work item field sits in the records the tools answer. Oxagen calls those tools every 15 minutes with the arguments you set, maps each record through the workspace's field mapping, and writes back through the tools you bound.

What the collector needs from the server

  • A listing tool that only reads. It lists items, filtered to those changed since a time and sorted oldest first, or in numbered or token pages.
  • A tool that reads one item by its id. Oxagen reads an item again before it writes to it.
  • Answers in JSON. The tool answers JSON text, or structuredContent. A server that answers in prose, such as "Query returned 3 records", cannot be read.
  • Streamable HTTP. The server is reached over streamable HTTP, with the sign-in or token it was registered with in Tools.

Oxagen reads only through a tool the server marks read-only (readOnlyHint). For a server that leaves the hint out, a person confirms the tool only reads. A tool the server marks destructive never serves a read. A tool whose description or arguments changed since the workspace approved the server stops every collector that calls it until a person reviews the server. A server with no approved tool list gets one the first time a person previews a collector on it, and until then a collector reads nothing through it.

How a call is checked

Preview and save hold the person or key setting up the collector to the per-tool access check an agent's call takes, for every tool the profile binds, write tools included, so a tool you may not call cannot be bound for the collector to call later. A refresh, a comment on the item's source, or a question an agent posts there runs as the person, key or agent that asked, so their own tool access and rules hold. Background reads and writes run as the collector. Every call goes through the same checks an agent's call to that server takes: no kill switch may stop the server, its credential, or the tool, and the workspace's rules must allow mcp.<server>.<tool>. A server turned off in Tools stops the collector at its next read. The credential's use is recorded before the first call of each read. A rule that asks a person to approve each call stops the collector, because no person waits on a background read. Each call has 30 seconds, and less when the write it serves has less left. A 401 asks a person to sign in to the server again, and a 403 fails only that call.

A page that does not read stops the collector without moving its place in the listing. That covers an answer that is not JSON, a record with no id or update time, a listing out of order, or a tool that no longer takes the arguments the profile sends. The next reconcile reads the same page again, so no change is skipped.

Profile

The collector's scope is its profile. Arguments are JSON, and a value written as a placeholder takes a value from the call:

PlaceholderFilled withUsed by
{{since}}The time the last read reached, less one second, in UTCListing
{{page}}, {{offset}}, {{page_size}}, {{token}}The page to read. A listing by time takes {{offset}} too, to page through items that share one update time, one item of overlap a page, so it needs a page size of 2 or moreListing
{{id}}The item's idRead, comments, update, comment
{{field}}, {{value}}The record key to set and its valueUpdate
{{text}}The commentComment
{{title}}, {{body}}, {{labels}}The new itemCreate

{{since}}, {{page}}, {{offset}}, {{page_size}} and a read's {{id}} may sit inside a longer string, such as a query, only when the value holds letters, digits, and _ . : -. An id that would change what a query asks is refused before the call, and a read checks the id it gets back. A write takes {{id}} and {{field}} only as whole values. Every other placeholder must be a whole value too.

Arguments never hold a credential. Oxagen refuses a value that looks like a password, a token or a key, or any text or number under a key such as password, token, key or api_key, unless the value is a placeholder, because everyone who reads the collector sees its profile. The item's link takes no credential either: no user and password, and no query or fragment value such as access_token=…. Oxagen signs in to the server with the credential set for it in Tools.

Selectors say where a value sits: $.Subject, $.Owner.Name, $.records, $.tags[0], $["odd key"], and $.items[*].id. A selector walks keys and array positions and runs no code.

Oxagen stores each item as mcp:<collector name>:<id>, such as mcp:zendesk-support:3, and fills {{id}} and the item's link with the id alone. Two collectors whose servers both hold a ticket 3 make two work items, and each writes back only to its own server. The name stays when you move a collector to another server, so its items stay with it. The same id on the new server can name another item, so a move drops the status, label and text writes, the creates and the send-back notes still queued for the old server. Each item records the server Oxagen last read it through. After a move, Oxagen reads an item by id, as a refresh does, or writes to it only once the new server's listing finds it, and that read links the item to the new server. That read drops any write or send-back note made on the item since the move, and the item takes the new server's status and text. Send the dropped writes again once the move is right. The same holds when you change the collector's listing, its read tool or its id field on the same server, since the listing may no longer reach an item, and when the server's address changes in Tools or in steering. A page size or a paging setting changes how the collector reads, not which item an id names, so it keeps the links. Signing in to the server again, or storing a new secret for it, unlinks its items the same way, because a hosted server answers every account at one address and the sign-in picks the account. That holds even when you sign in again as the same account after a token expired: the writes queued at that moment are dropped, and the collector's next read starts from the beginning and links each item again. A token refresh unlinks nothing. A read already under way when any of these lands keeps nothing it read, and the collector's next read starts again. So does one under way when you change the page size or a paging setting, since the read starts again from the beginning. A write to an item that is under way when someone signs in again either goes out before the sign-in completes or sends nothing.

Before you save, Preview reads one page through the profile and shows the items Oxagen would make, every field the records carry with sample values, suggested status and priority mappings, and anything wrong. Saving runs the same read and refuses a profile that reads no items.

stella draft

On the Setup step, Draft the read tools asks stella to fill the read side of the profile from the server alone. You write no description. stella reads the server's tools and their input schemas, picks the listing and read tools, writes their arguments, and says how the listing pages. Oxagen then reads up to five records through the listing, and stella says where each work item field sits in them. Each tool argument sits next to the tool's input schema, so you can check every argument against what the tool takes.

With the name field empty, the draft also names the collector, from the server's name and its tools. The name keys the collector's field mapping and its items, so Oxagen keeps stella's name only when it is a valid collector name that no collector in the workspace holds, a removed one included. Otherwise the draft names the collector after the server, such as zendesk-support-work, with -2 and on when that name is taken. A name you typed stays.

The draft keeps the tools you already picked, and the arguments you typed for them when stella writes none, and leaves the write tools, the page size, and the repositories as you set them. It shows stella no tool the server marks destructive or writing, and it reads records only through a tool the server marks read-only or one you confirmed. The id, the update time, the title, and a closed flag stay only when every record read holds them, and any other field stays when one record holds it. Oxagen reads the item link from the records itself, from a field that holds each item's own id, so a link written inside an item never becomes every item's link. Anything stella could not settle shows as a question under the button. Every value is yours to edit, and Preview checks the result. The draft is two Stella chat calls on the workspace's budget and takes at most 50 seconds. Through the API or MCP it is draft_work_collector.

Field mapping

Each MCP server collector maps its own values, under its own name as the mapping's tenant. Oxagen must be able to tell whether every item is open or closed. Either the profile names a closed field that holds true or false, or it names a status field and every status the collector reads has a mapping. A profile that names neither reads no item. A page with a status that has neither stops the collector, and nothing is skipped: map the status under Fields, then sync the collector. An item whose closed field is missing or holds anything else, such as 1, stops the collector too, and Preview lists it as a problem. So does an item with no value at the status field when the profile names no closed field, and Preview suggests no status mapping from it. The first save fills mappings for the status and priority values it can read without doubt, such as solved and urgent, and leaves the rest for a person. A status that holds both open and closed items by the closed field gets no mapping, so each item keeps its own flag. Every write goes through the update tool, so a profile that binds none gets read mappings only. A read row names a work item field (status, priority, kind, assignee, label) or any record key by its path, such as Origin or Owner.Name. A write row names the record key the update tool sets. A label written to label replaces the item's labels at the key its labels selector reads.

Salesforce Cases

Salesforce's hosted MCP server (platform/sobject-all) answers SOQL through soqlQuery and writes through updateSobjectRecord and createSobjectRecord.

json
{
  "list": {
    "tool": "soqlQuery",
    "arguments": {
      "query": "SELECT Id, Subject, Description, Status, Priority, IsClosed, Type, Owner.Name, CreatedDate, LastModifiedDate FROM Case WHERE LastModifiedDate >= {{since}} ORDER BY LastModifiedDate ASC LIMIT {{page_size}}"
    },
    "items": "$.records",
    "page_size": 100,
    "paging": { "mode": "since" }
  },
  "get": {
    "tool": "soqlQuery",
    "arguments": { "query": "SELECT Id, Subject, Description, Status, Priority, IsClosed, Type, Owner.Name, CreatedDate, LastModifiedDate FROM Case WHERE Id = '{{id}}'" },
    "item": "$.records"
  },
  "comments": {
    "tool": "soqlQuery",
    "arguments": { "query": "SELECT Id, CommentBody FROM CaseComment WHERE ParentId = '{{id}}'" },
    "items": "$.records",
    "body": "$.CommentBody"
  },
  "fields": {
    "id": "$.Id",
    "updated_at": "$.LastModifiedDate",
    "title": "$.Subject",
    "description": "$.Description",
    "status": "$.Status",
    "closed": "$.IsClosed",
    "priority": "$.Priority",
    "assignee": "$.Owner.Name",
    "kind": "$.Type",
    "url": "https://acme.my.salesforce.com/lightning/r/Case/{{id}}/view"
  },
  "write": {
    "update": {
      "tool": "updateSobjectRecord",
      "arguments": { "sobject-name": "Case", "id": "{{id}}", "body": { "{{field}}": "{{value}}" } }
    },
    "comment": {
      "tool": "createSobjectRecord",
      "arguments": { "sobject-name": "CaseComment", "body": { "ParentId": "{{id}}", "CommentBody": "{{text}}", "IsPublished": false } },
      "internal": true
    }
  }
}

A typical mapping reads New and Working as Open, Escalated as Blocked, and Closed as Closed, and writes Working and Closed. Priorities High, Medium, and Low read as P1, P2, and P3.

Zendesk Support

A Zendesk server that lists the newest changes first, and leaves tags out of its list, reads each listed item again in full with read_each:

json
{
  "list": {
    "tool": "get_tickets",
    "arguments": { "page": "{{page}}", "per_page": "{{page_size}}", "sort_by": "updated_at", "sort_order": "desc" },
    "items": "$.tickets",
    "page_size": 100,
    "paging": { "mode": "pages", "next": "$.next_page", "more": "$.has_more", "newest_first": true },
    "read_each": true
  },
  "get": { "tool": "get_ticket", "arguments": { "ticket_id": "{{id}}" } },
  "comments": {
    "tool": "get_ticket_comments",
    "arguments": { "ticket_id": "{{id}}" },
    "items": "$",
    "body": "$.body"
  },
  "fields": {
    "id": "$.id",
    "updated_at": "$.updated_at",
    "title": "$.subject",
    "description": "$.description",
    "status": "$.status",
    "priority": "$.priority",
    "kind": "$.type",
    "labels": "$.tags",
    "url": "https://acme.zendesk.com/agent/tickets/{{id}}"
  },
  "write": {
    "update": { "tool": "update_ticket", "arguments": { "ticket_id": "{{id}}", "{{field}}": "{{value}}" } },
    "comment": {
      "tool": "create_ticket_comment",
      "arguments": { "ticket_id": "{{id}}", "comment": "{{text}}", "public": false },
      "result": "any",
      "internal": true
    }
  }
}

An id that is all digits is sent as a number when the tool's schema asks for an integer, as ticket_id does. A newest-first walk stops at the first item older than the last read. The mapping reads new and open as Open, pending and hold as Blocked, and solved and closed as Closed.

Limits

  • No webhooks. An MCP server has no webhook Oxagen can check, so a change shows within 15 minutes. A change the 15-minute read finds never counts as one a webhook missed, so it does not mark the collector lagging.
  • Create sends title, body, and labels. It runs for a work item saved in a repository the profile names in repos. The create binding must send {{body}}, because the body ends with the mark a retried create finds the item by. A priority or type that maps to a field of its own, such as Zendesk's priority, is set through the update tool as soon as the item exists. Before it makes anything, the create checks that the update tool takes each such field, and refuses when it does not, as it does when the profile binds no update tool. A field write that fails once the item exists leaves the item linked to its work item, never made twice. The labels write sets the field later, and the work item shows why it is not set yet. A create binding that leaves out {{labels}} makes the item with none, and the update tool adds every label right after, keeping any the item already holds. When the profile binds no update tool or labels field, or that write fails, the work item shows the labels as not set. The labels write then sets the Priority label and one other label later, and the work item names any others for a person to set at the source.
  • No badge. An MCP server collector puts no Oxagen badge on the item.
  • One session per call. Each call opens one MCP session and closes it, so a page that reads every item again costs one session per item.
  • Bounded walks. A walk reads at most 500 pages, and one answer may hold at most five pages' worth of records. An empty page ends a walk, unless the walk pages by {{token}} and the answer names a next token or says more pages follow.
  • Walks by page number. A walk by {{offset}} reads each page from the last record of the one before, so it needs a page size of 2 or more. It checks that each page starts where the last one ended, and starts again when the list moved, at most three times. A walk by {{page}} cannot overlap its pages, so after each page it reads the page before again and picks up an item a deletion moved onto it. When the last item it read is on neither page, it cannot tell how far the list moved, and starts again, at most three times. That costs one more listing call for each page after the first. A list must still sort newest first or in an order that never changes. A walk by {{token}} has neither limit.
  • Notes need a comments tool. Oxagen posts a send-back note only when the profile binds comments, the tool that reads an item's comments, so a retry finds a note that already landed and never posts it twice. Oxagen records the note as sent once a read of the comments finds it, by the id the comment holds at comments.id. Left out, comments.id reads where the profile's fields.id does, such as $.id for Zendesk or $.Id for Salesforce. A note whose comment holds no id there stops with a reason, and Oxagen never posts it twice.
  • Creates need a listing that finds them. A profile that creates items lists by time or newest first, and names a description field, so a retried create finds the item an earlier try made. Only a retry searches, and it reads what changed since the earlier try, at most 20 pages, up to the latest change. A listed item whose record leaves out the description is read again through the read tool, so the mark is never missed. When more remain, the create stops, makes nothing, and the work item says why. Filter the listing to fewer items or raise page_size, then retry the create. A reconcile that reads the new item before the create links it gives it to the work item, by its mark, only while the create is under way: the create was tried, and the item was made no earlier than a minute before the work item was entered. At any other time a mark in the item's text links nothing, since anyone who can edit the text could type one.
  • Set up in Work setup. A collector file of type mcp in the steering repo is not applied yet. Set the collector up in Work setup.
  • Not metered. A collector's calls are Oxagen's own reads of your work, like a native collector's API calls. They are not governed agent actions and are not billed.

On this page