Treffas API MCP Server

Model Context Protocol (MCP) server for Treffas public API routes. The server supports Streamable HTTP for Claude connectors and local stdio usage for development.

Tools

Read-only tools:

Write tools:

Most organization-scoped tools accept organization_slug; it is optional when TREFFAS_ORGANIZATION_SLUG is configured. Bearer tokens are read from MCP connection auth info or local environment, not from tool arguments.

Local Setup

Install dependencies:

npm install

Set local environment variables:

set TREFFAS_API_BASE_URL=http://localhost:8000
set TREFFAS_ORGANIZATION_SLUG=your-org-slug
set TREFFAS_API_ACCESS_TOKEN=your-laravel-api-token

Run local stdio mode:

npm start

Inspect local MCP tools:

npm run inspect

Remote Claude Setup

Run Streamable HTTP mode:

set TREFFAS_MCP_PUBLIC_URL=https://mcp.yourdomain.com
set TREFFAS_API_BASE_URL=https://api.yourdomain.com
set TREFFAS_OAUTH_ISSUER=https://auth.yourdomain.com
set TREFFAS_OAUTH_AUTHORIZATION_URL=https://auth.yourdomain.com/oauth/authorize
set TREFFAS_OAUTH_TOKEN_URL=https://auth.yourdomain.com/oauth/token
set TREFFAS_OAUTH_INTROSPECTION_URL=https://auth.yourdomain.com/oauth/introspect
npm run start:http

Claude should connect to the MCP endpoint at /mcp on the public server.

Environment Variables

Testing

Run syntax checks:

npm test

Privacy

This connector sends user-provided API inputs and Treffas organization identifiers to the configured Treffas API to manage clients, appointments, offers, webhooks, users, posts, and organizations. The MCP server does not intentionally store conversation content or API payloads.