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:
get_clients,get_clientget_appointments,get_appointmentget_offers,get_offerget_webhooks,get_webhookget_userget_posts,get_post,get_post_countsget_organizations
Write tools:
create_client,update_client,update_client_by_email,delete_client,delete_client_by_emailcreate_booking,update_appointment,delete_appointmentcreate_offer,update_offer,delete_offercreate_webhook,update_webhook,delete_webhookcreate_post,update_post,delete_post,duplicate_post,trash_post,republish_post,change_post_status
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
TREFFAS_API_BASE_URL: Treffas API base URL.TREFFAS_API_TIMEOUT_MS: API timeout.TREFFAS_ORGANIZATION_SLUG: Optional default organization slug.TREFFAS_API_ACCESS_TOKEN: Server-side Laravel API token for local API calls.PORTorMCP_PORT: HTTP server port.MCP_PATH: MCP HTTP path. Defaults to/mcp.TREFFAS_MCP_PUBLIC_URL: Public HTTPS origin for the MCP server.MCP_ALLOWED_ORIGINS: Comma-separated additional allowed browser origins.TREFFAS_OAUTH_ISSUER: OAuth issuer URL.TREFFAS_OAUTH_AUTHORIZATION_URL: OAuth authorization endpoint.TREFFAS_OAUTH_TOKEN_URL: OAuth token endpoint.TREFFAS_OAUTH_INTROSPECTION_URL: Optional token introspection endpoint.ALLOW_UNAUTHENTICATED_MCP=true: Development-only bypass for HTTP auth.
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.