mcp-servicefusion
Enables AI-assisted field service management through the Service Fusion API, including job lookup, customer management, dispatch, invoicing, and equipment tracking.
README
mcp-servicefusion
A Model Context Protocol (MCP) server exposing the Service Fusion REST API to AI agents. Enables AI-assisted field service management: job lookup, customer management, dispatch, invoicing, equipment tracking, and more.
Disclaimer: This is an unofficial, community-built integration. Not affiliated with or endorsed by Service Fusion.
Features
Read tools:
get_todays_jobs— today's scheduled jobs with assigned techssearch_jobs— flexible search with filters (status, customer, date range, etc.)get_job_details— full job record with expanded relationsget_customer_jobs— all jobs for a given customersearch_customers— by name, phone, email, or addressget_equipment— customer equipment with custom fieldsget_open_invoices— outstanding invoicesget_techs— technician listget_job_statuses,get_job_categories,get_sources— reference dataget_me— current authenticated user
Create tools:
create_job,create_customer,create_estimate
API documentation:
get_api_docs— look up the Service Fusion API reference directly from the MCP connection. Sections:index,jobs,customers,estimates,invoices,techs,data-types,authentication,known-issues,full
Prerequisites
- Node.js ≥ 18
- Service Fusion API credentials (My Office → Developer Settings → API Credentials)
Setup (local / stdio transport)
git clone https://github.com/commair-tools/mcp-servicefusion-public.git mcp-servicefusion
cd mcp-servicefusion
npm install
npm run build
cp .env.example .env
# Edit .env and add SF_CLIENT_ID and SF_CLIENT_SECRET
Claude Desktop
Add to your claude_desktop_config.json (see claude_desktop_config.example.json):
{
"mcpServers": {
"service-fusion": {
"command": "node",
"args": ["/absolute/path/to/mcp-servicefusion/build/index.js"],
"env": {
"SF_CLIENT_ID": "your_client_id_here",
"SF_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}
Claude Code CLI
claude mcp add service-fusion node /absolute/path/to/mcp-servicefusion/build/index.js \
-e SF_CLIENT_ID=your_client_id -e SF_CLIENT_SECRET=your_client_secret
Setup (remote / HTTP transport)
The server also supports Streamable HTTP transport for hosted deployments (Railway, Fly.io, Cloud Run, etc.) with OAuth 2.1 authentication.
Environment variables
| Variable | Required | Description |
|---|---|---|
SF_CLIENT_ID |
Yes | Service Fusion OAuth client ID |
SF_CLIENT_SECRET |
Yes | Service Fusion OAuth client secret |
TRANSPORT |
Yes (for HTTP) | Set to http to enable HTTP transport |
PORT |
No | HTTP port (default: 3000) |
BASE_URL |
Yes (for HTTP) | Public URL of your server, e.g. https://mcp.example.com — required for OAuth discovery |
MCP_OAUTH_PIN |
Recommended | PIN for browser-based OAuth approval (required by Claude.ai web) |
MCP_AUTH_TOKEN |
Optional | Static Bearer token for non-OAuth clients (e.g., Claude Code CLI) |
SF_API_BASE_URL |
No | Defaults to https://api.servicefusion.com/v1 |
SF_TOKEN_URL |
No | Defaults to https://api.servicefusion.com/oauth/access_token |
Deploying to Railway
- Fork or import this repo on Railway
- Set the environment variables listed above
- Railway auto-builds via
railway.tomland exposes a public URL - Use that URL as your
BASE_URL
Authentication
Claude.ai web (OAuth flow): add the server URL (without trailing slash, e.g., https://mcp.example.com/mcp) as a remote MCP connector in Settings. Leave OAuth client ID/secret fields blank — the server advertises discovery metadata so Claude.ai handles the full OAuth handshake automatically. On first connect, you'll be redirected to a browser page to enter your MCP_OAUTH_PIN. After that, tokens auto-refresh for 30 days.
Claude Code / CLI clients: use the static token via the Authorization: Bearer <MCP_AUTH_TOKEN> header.
No authentication: if neither MCP_OAUTH_PIN nor MCP_AUTH_TOKEN is set, the server runs unauthenticated (not recommended for public-facing deployments).
API Reference
The repo includes a complete Service Fusion API reference in service-fusion-api-reference.md, auto-generated from the official RAML spec at docs.servicefusion.com. Agents can access it through the get_api_docs tool at runtime.
To regenerate it after Service Fusion updates their spec:
node scripts/update-api-docs.mjs
Known Issues
/jobs endpoint hangs without sort parameter
As of 2026-04-09, Service Fusion's /jobs list endpoint hangs indefinitely when queried without a sort parameter. This server works around it by defaulting all /jobs list queries to sort=-start_date in src/client.ts. If you see hangs on other endpoints in the future, check whether they require a sort param too.
Equipment is a nested resource
There is no top-level /equipment endpoint. Equipment must be fetched via GET /customers/{customer-id}/equipment. The get_equipment tool handles this by resolving customer_name to customer_id internally.
API Limitations
Confirmed by Service Fusion support:
- No PUT, PATCH, or DELETE on any endpoint (read and create only)
- No native webhook/callback support
- No sandbox/test environment
- Rate limit: 60 requests/minute (server enforces backoff automatically)
Tech Stack
- TypeScript + Node.js
@modelcontextprotocol/sdkfor MCP protocol- Express for HTTP transport
- OAuth 2.1 with PKCE, Dynamic Client Registration, and resource indicators
License
Business Source License 1.1 — see LICENSE
TL;DR: Free to use, modify, and redistribute (including internally at HVAC businesses to manage your own operations). You may not resell it or offer it as a paid hosted service to third parties. On April 10, 2036 it automatically converts to the Apache License 2.0 (fully permissive).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。