@zenixsolutions/streamlined-mcp
v0.8.0
Published
MCP server (stdio or Streamable HTTP) for the Streamlined Record Retrieval order queue: list new orders, record types, and add order notes.
Downloads
392
Maintainers
Readme
@zenixsolutions/streamlined-mcp
An MCP server (stdio) that lets an AI agent work the Streamlined Record Retrieval order queue: list New orders that have a reference number and no contact yet, see each order's provider, matching contacts and latest notes, add notes, and update order status, assignee, providers and contacts.
It runs in one of two modes:
- stdio (default): a subprocess of a local MCP client. Opens no ports; the token comes from
STREAMLINED_TOKEN. - HTTP (
--http): a Streamable HTTP server for a reverse proxy, at/mcpon127.0.0.1:3100. It holds no token: every request must send the caller's own API token asAuthorization: Bearer <token>.
Install / run
npx -y @zenixsolutions/[email protected] # stdio
npx -y @zenixsolutions/[email protected] --http --port 3100 # HTTP, behind NginxRequires Node.js 20.3 or later. Pin the version.
Configuration
| Variable | Mode | Required | Description |
|---|---|---|---|
| STREAMLINED_BASE_URL | both | yes | Base URL of the app, https:// only, e.g. https://admin.example.com |
| STREAMLINED_TOKEN | stdio | yes | API token for the integration's service user. Reading needs no special permission; notes:write is needed to add notes. Refused in HTTP mode |
| STREAMLINED_ENABLE_WRITES | both | no | true to register the note tool. Default: read-only |
| STREAMLINED_EXTRA_HEADER_NAME / STREAMLINED_EXTRA_HEADER_VALUE | stdio | no | An extra header sent to the app on every request, e.g. a secret that a Cloudflare rule checks. Refused in HTTP mode |
| STREAMLINED_HTTP_PORT / STREAMLINED_HTTP_HOST | HTTP | no | Default 3100 / 127.0.0.1. --port and --host take precedence |
| STREAMLINED_HTTP_ALLOW_REMOTE_BIND | HTTP | no | true to allow a non-loopback host. Only for a private network: the server speaks plain HTTP |
The server exits with a clear message if the configuration is invalid. Secrets are never printed.
HTTP mode
POST /mcp(MCP Streamable HTTP, stateless; 2025-era and 2026-07-28 clients) andGET /healthz. Everything else returns 404.- Every
/mcprequest needsAuthorization: Bearer <API token>. Any token may connect: it is checked with the app (GET /api/order_types), which accepts or rejects it, and the result is cached for 5 minutes, as a hash only. The tools then call the app with that same token, for that request only. - Rejected: requests with an
Originheader (browsers) with 403; missing or malformed tokens with 401, without contacting the app; tokens the app refuses with 401; more than 30 checks a minute of tokens the app hasn't accepted in the last 24 hours with 429 (tokens accepted in that time are exempt; the exemption is in memory, so it resets on restart); more than 32 requests in flight with 503; non-JSON bodies with 415; bodies over 128 KB with 413;subscriptions/listenwith 400. - Logs: one line per request (method, route, status, duration). No headers, bodies, tokens or IP addresses.
See docs/DEPLOYMENT.md in the repository for the Forge, Nginx and Cloudflare setup.
Tools
| Tool | Kind | What it does |
|---|---|---|
| streamlined_list_record_types | read | The record types (Medical, Billing, Radiology Images, …) and their IDs |
| streamlined_list_new_orders | read | One page of the queue, oldest first: limit 1–25 (default 10), cursor from the previous page, optional verified filter. Returns total, showing, next_cursor, orders[] (each with contact_verified) |
| streamlined_add_order_note | write | Adds an internal note: order_id, that order's reference_num, text, optional format ("text" or "html"). Only registered when STREAMLINED_ENABLE_WRITES=true |
| streamlined_get_order | read | One order by number (any status): record type, authorization, status, assignee, client firm (demo flag), client note subscribers, reference_num, provider, dates, 10 newest notes |
| streamlined_list_order_statuses | read | Every status with its ID, in dropdown order; invoicing statuses are marked |
| streamlined_list_assignees | read | Everyone the Assigned To dropdown offers, with user IDs and active flag |
| streamlined_update_order_workflow | write | Set an order's Status and/or Assigned To (order_id + reference_num; optional expected values give a 409 if the order changed). Invoicing statuses (5, 7, 9, 11) are refused |
| streamlined_add_client_note | write | Adds a client-visible note, same inputs and guards; it emails the order's subscribed clients. Separate tool so it can be approved separately. Only with writes enabled |
| streamlined_get_order_provider | read | An order's provider, authorization and contacts (one per record type), with warnings for merged/deleted providers and duplicate contacts |
| streamlined_get_provider | read | One provider by ID with its contacts (up to 20), including merged and deleted providers |
| streamlined_search_providers | read | Search providers by name, ID, address, city, state, zip, phone or fax (paged) |
| streamlined_list_provider_orders | read | A provider's past orders, newest first, with their latest notes (paged) |
| streamlined_save_provider_contact | write | Create or update a provider's contact for a record type, by order_id or provider_id. Shared by every order with that provider and record type. Refused for merged/deleted providers or duplicate contacts |
| streamlined_list_employees | read | Active employees (Employees page): roles, order counts and limit, start date, firms |
| streamlined_report_order_interactions | read | Order Interaction Report for any range: orders each employee noted per day, grouped by day/week/month/total |
| streamlined_report_completed_orders | read | Orders completed per rep, as the app lists them (Impact Score source), with the known caveats; up to 366 days |
| streamlined_update_provider | write | Update a provider's details, status (1 only) or note. Applies to every order using the provider. Refused for merged/deleted providers |
Provider and contact notes are appended with a date unless notes_mode is "replace". The write tools never clear a field.
Each order looks like this:
{
"order_id": 200000001,
"reference_num": "REF0000001",
"record_type": "Billing",
"created": "2026-10-07",
"provider": { "name": "Example Imaging", "phone": "(555) 010-2991" },
"contacts": [{ "phone": "(555) 010-2992", "email": "[email protected]" }],
"contacts_source": "record_type",
"notes": [{ "id": 6000001, "date": "2026-10-09", "internal": false, "text": "Called the records desk…" }]
}contactscontains only provider contacts for the order's record type that have a phone, fax or email (at most 5). If there are none,contacts_sourceis"provider_fallback"; use the provider's own details.notescontains the 4 newest, as plain text, each shortened to 600 characters.internalmarks staff-only notes.- Dates are UTC calendar dates.
See docs/TOOLS.md in the repository for full behaviour.
Safety
- Note text and provider/contact fields are written by third parties. The tool descriptions tell the model to treat them as data, never as instructions.
- Invisible Unicode (zero-width, bidi, tag characters), control characters and markup are removed before anything reaches the model.
- Writes need both
order_idand the matchingreference_num. The app rejects a mismatch. - Order notes are internal unless written with
streamlined_add_client_note. In plain-text mode, anything that could start an HTML tag (<followed by a letter,/,!or?) is replaced with‹, and entity-shaped text like<gets a space after the&. Withformat: "html", the app's HTMLPurifier allowlist cleans the note. - After a timeout or server error on a write, the agent is told the note may already be saved and to check before retrying.
- Payloads are never logged or written to disk. Upstream error bodies are not passed to the model, except the app's validation messages with any secrets redacted.
License
Proprietary (UNLICENSED). © Zenix Solutions LLC. Published for installation convenience only. No licence to use, copy or modify is granted.
