mcp-server-trilogo-api
v1.0.0
Published
MCP Server for the Trilogo public API — manage tickets, assets, companies, user groups, access profiles and users
Maintainers
Readme
mcp-server-trilogo-api
An MCP (Model Context Protocol) server that exposes the full Trilogo public API as tools for use with Claude Desktop, Claude Code, and any compatible MCP client.
Features
- 18 tools covering all documented Trilogo API endpoints
- Strongly-typed inputs validated with Zod
- Automatic retries on transient failures (5xx, 429, network errors) with exponential back-off
- Structured logging via Pino to stderr (never pollutes stdio transport)
- Configurable timeout and base URL via environment variables
- Ready to publish to npm
Tools reference
Tickets
| Tool | Method | Endpoint |
|------|--------|----------|
| trilogo_get_ticket | GET | /api/ticket/{id} |
| trilogo_get_tickets | GET | /api/ticket |
| trilogo_get_ticket_changes | GET | /api/ticket/changes |
| trilogo_generate_grid_url | POST | /api/ticket/generate-public-grid-url |
| trilogo_get_ticket_amount_by_company | GET | /api/ticket/ticket-amount-by-company |
| trilogo_edit_ticket | PATCH | /api/ticket/asset-ticket |
| trilogo_execute_ticket | POST | /api/ticket/execute |
| trilogo_add_tag | POST | /api/ticket/add-tag |
Assets
| Tool | Method | Endpoint |
|------|--------|----------|
| trilogo_create_asset | POST | /api/asset |
| trilogo_get_assets | GET | /api/asset |
| trilogo_transfer_assets | PUT | /api/asset/transferasset |
| trilogo_edit_asset | PUT | /api/asset/editAsset |
| trilogo_disable_asset | POST | /api/asset/disable |
| trilogo_get_select_assets | GET | /api/asset/select-assets |
Reference data
| Tool | Method | Endpoint |
|------|--------|----------|
| trilogo_get_select_companies | GET | /api/company/get-select-companies |
| trilogo_get_select_user_groups | GET | /api/user-group/get-select-user-groups |
| trilogo_get_select_access_profiles | GET | /api/access-profile/get-select-access-profiles |
| trilogo_get_user_performance | GET | /api/user/performance |
Requirements
- Node.js >= 20
- A valid Trilogo API key
Installation
From npm (recommended)
npx mcp-server-trilogo-apiFrom source
git clone <repo>
cd mcp-server-trilogo-api
npm install
npm run buildConfiguration
Create a .env file (copy from .env.example):
TRILOGO_BASE_URL=https://public.api.trilogo.app
TRILOGO_API_KEY=your_api_key_here
TRILOGO_TIMEOUT=30000
LOG_LEVEL=infoEnvironment variables can also be injected directly in the Claude Desktop config (see below).
Claude Desktop integration
Edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"trilogo-api": {
"command": "npx",
"args": ["-y", "mcp-server-trilogo-api"],
"env": {
"TRILOGO_BASE_URL": "https://public.api.trilogo.app",
"TRILOGO_API_KEY": "your_api_key_here"
}
}
}
}After saving, restart Claude Desktop. The Trilogo tools will appear in the tool list.
Claude Code integration
claude mcp add trilogo-api npx -y mcp-server-trilogo-api \
-e TRILOGO_API_KEY=your_api_key_hereOr add it to your project's .claude/settings.json:
{
"mcpServers": {
"trilogo-api": {
"command": "npx",
"args": ["-y", "mcp-server-trilogo-api"],
"env": {
"TRILOGO_API_KEY": "your_api_key_here"
}
}
}
}Development
# Install dependencies
npm install
# Run in watch mode
npm run dev
# Build for production
npm run build
# Format code
npm run format
# Lint
npm run lintPublishing to npm
# Make sure you're logged in
npm login
# Build and publish
npm run publish:npmAuthentication
All requests include the token header automatically using the value from TRILOGO_API_KEY. No additional setup is needed per-tool.
Error handling
Every tool returns a structured error message on failure instead of throwing, so Claude can surface the error clearly. Transient errors (network failures, 429 rate limits, 5xx server errors) are automatically retried up to 3 times with exponential back-off.
License
MIT
