Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions docs/integrations/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

CatalogIT includes an **MCP server** for AI clients that support local stdio or hosted Streamable HTTP. The MCP process calls CatalogIT's REST API using an API token; it does not connect directly to PostgreSQL. Every API request is authorized as the CatalogIT user who owns the token.

The first release provides tools to search/list services, fetch a service by ID, search vendors and hardware, read service cost records, read the change history of a record, and (for admins) read the global audit log. Hardware and financial tools require the corresponding CatalogIT visibility permissions. A small set of write tools can create and update vendors, tags, and services; the MCP server cannot delete or archive records.
The MCP server provides tools to search/list services, fetch a service by ID, search vendors, hardware, and payment methods, read service and hardware cost records, read the change history of a record, and (for admins) read the global audit log. Hardware and financial tools require the corresponding CatalogIT visibility permissions. A small set of write tools can create and update vendors, tags, and services, and create, update, and delete cost records. The MCP server cannot delete or archive services, hardware, vendors, or tags.

## Requirements

Expand All @@ -16,7 +16,7 @@ The first release provides tools to search/list services, fetch a service by ID,

Create a dedicated CatalogIT user for the assistant, then create an API token while signed in as that user. Tokens inherit the user's role and feature permissions. Start with a viewer account and grant financial or hardware visibility only if the workflow needs it. Store the token as a secret in your AI client's MCP configuration; treat it like a password and revoke it in **Settings → API Tokens** if exposed.

What the assistant can change depends on the token owner's role: with a viewer account every write tool fails with `403`, so the connection is effectively read-only. Editors can create tags and create or update services; vendor writes and tag updates need an admin. Do not reuse an admin token when a lower-privilege account is sufficient.
What the assistant can change depends on the token owner's role: with a viewer account every write tool fails with `403`, so the connection is effectively read-only. Editors can create tags, create or update services, and change cost records if they also have financial visibility; vendor writes and tag updates need an admin. Do not reuse an admin token when a lower-privilege account is sufficient.

## Configure a local MCP client

Expand Down Expand Up @@ -55,7 +55,9 @@ Restart or reload the AI client, then confirm that the CatalogIT tools appear in
| `list_vendors` | List or search vendors by name | Catalog access |
| `list_hardware_assets` | Search assets by model, serial, status, or location; optionally filter by hardware type or archive state | Hardware visibility |
| `get_service_cost_records` | Read costs for a service | Financial visibility |
| `get_record_history` | Read the change history of a service, hardware asset, vendor, or tag by UUID, newest first; service and hardware history include attachment changes | Catalog access; hardware history requires hardware visibility |
| `get_hardware_cost` | Read the purchase cost of a hardware asset | Financial and hardware visibility |
| `list_payment_methods` | List or search payment methods by name | Catalog access |
| `get_record_history` | Read the change history of a service, hardware asset, vendor, tag, or cost record by UUID, newest first; service and hardware history include attachment changes | Catalog access; hardware history requires hardware visibility; cost record history requires financial visibility (and hardware visibility for hardware costs) |
| `list_audit_events` | Read the global audit log, newest first; optionally filter by category (`data_change`, `security`, `notification`, `error`) | Admin |

List tools default to 50 results and accept `limit` from 1 to 100. `get_record_history` and `list_audit_events` are paginated instead: they accept `page` (from 1) and `per_page` (from 1 to 100) and return `total_pages`. Searching filters the API's current list response, so large catalogs may still require the API to return the complete list before the MCP server narrows the result.
Expand All @@ -81,16 +83,23 @@ Write tools change CatalogIT data. They call the same API endpoints as the web U
| `update_tag` | Rename a tag or change its color | Admin |
| `create_service` | Create a service with name, description, status, vendor, category, classification, environment, criticality, renewal date, seats, SSO/SCIM flags, and tags | Editor or admin |
| `update_service` | Change any of those fields on one service by UUID; add or remove individual tags | Editor or admin |
| `create_service_cost_record` | Add a cost record to a service: fiscal year, amount, record type (`actual`, `estimated`, `budget`), and optional purchase year and payment method | Editor or admin with financial visibility |
| `update_service_cost_record` | Change any of those fields on one service cost record | Editor or admin with financial visibility |
| `delete_service_cost_record` | Permanently delete one service cost record | Editor or admin with financial visibility |
| `set_hardware_cost` | Set the purchase cost of a hardware asset; each asset has one cost record of type `actual` | Editor or admin with financial and hardware visibility |
| `delete_hardware_cost` | Permanently remove the purchase cost of a hardware asset | Editor or admin with financial and hardware visibility |

Update tools change only the fields passed and cannot clear a field. Write tools do not set notes, points of contact, owners, assignees, notification recipients, cost centers, payment methods, contracts, or renewal schedules; use the web UI for those. Archived services accept only description and status changes.
Update tools change only the fields passed and cannot clear a field; `set_hardware_cost` keeps the current purchase and fiscal year when they are omitted. Write tools do not set notes (including cost-record notes), points of contact, owners, assignees, notification recipients, a service's cost center, payment method, or contract, or renewal schedules; use the web UI for those. Archived services accept only description and status changes. Cost records of archived services and archived hardware are read-only. Delete tools are annotated as destructive; the MCP server instructs assistants to confirm with the user before running them.

Examples:

- “Create a vendor called Acme with website acme.example.”
- “Tag [service name] as SaaS and remove the Legacy tag.”
- “Set the criticality of [service name] to High.”
- “Add a 2027 budget of 12,000 for [service name].” (Requires financial visibility.)
- “Set the purchase cost of laptop [serial] to 1,850.” (Requires financial and hardware visibility.)

The MCP server excludes service notes, personal contact details, hardware notes and cellular identifiers, vendor notes, and cost-record notes from its results. History values also omit hardware assignees, cost centers, payment methods, and attachment storage keys. History and audit results name the person who made a change but not their email address. `list_audit_events` returns each event's summary and, for data changes, only the names of changed fields; use `get_record_history` to see values. It does not offer arbitrary SQL, bulk changes, archiving, or record deletion.
The MCP server excludes service notes, personal contact details, hardware notes and cellular identifiers, vendor notes, and cost-record notes from its results. History values also omit hardware assignees, cost centers, payment methods, and attachment storage keys. History and audit results name the person who made a change but not their email address. `list_audit_events` returns each event's summary and, for data changes, only the names of changed fields; use `get_record_history` to see values. It does not offer arbitrary SQL, bulk changes, archiving, or deletion of records other than cost records.

## Troubleshooting

Expand Down
6 changes: 5 additions & 1 deletion docs/releases/next.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Next release

No unreleased changes yet. Released notes: [v1.6.x](v1.6.md), [v1.5.2](v1.5.2.md).
Released notes: [v1.6.x](v1.6.md), [v1.5.2](v1.5.2.md).

## MCP cost record tools

The MCP server can now change cost records. `create_service_cost_record`, `update_service_cost_record`, and `delete_service_cost_record` manage a service's costs; `set_hardware_cost` and `delete_hardware_cost` set or remove a hardware asset's purchase cost. New read tools `get_hardware_cost` and `list_payment_methods` support them, and `get_record_history` accepts `record_type="cost_record"`. Each tool calls the existing API, so writes need an editor or admin with financial visibility (plus hardware visibility for hardware costs), cost records of archived services and hardware stay read-only, and every change is recorded in history under the token owner. Delete tools are annotated as destructive, and cost-record notes are neither returned nor set. The MCP server still cannot delete or archive services, hardware, vendors, or tags. See [MCP and AI assistants](../integrations/mcp.md).
Loading
Loading