Zoho FSM MCP Server
Exposes the Zoho FSM (Field Service Management) REST API, providing tools for managing service requests, work orders, appointments, contacts, companies, estimates, invoices, assets, and users, along with intelligent workflow tools and cached resources.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Zoho FSM MCP ServerShow me all open work orders"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Zoho FSM MCP Server
A production-ready Model Context Protocol server that exposes the Zoho FSM (Field Service Management) REST API as AI-friendly tools, resources, and prompts.
It is modular and extensible: thin API-wrapper tools, higher-level "intelligent" workflow tools, cached read-only resources, and a dedicated extension point for tools auto-generated from an OpenAPI spec.
Features
π OAuth with automatic access-token refresh (refresh-token grant), multi-region.
π Single API client (
FSMClient) with retries, backoff, timeouts, 401 recovery, and typed responses.π§° Tools for Requests, Work Orders, Appointments, Contacts, Companies, Estimates, Invoices, Assets, and Users.
π€ Intelligent workflow tools that orchestrate multiple API calls (
create_service_request,assign_best_technician,complete_job).π Resources (
fsm://modules,fsm://statuses,fsm://territories,fsm://users,fsm://services,fsm://parts,fsm://metadata) with TTL caching.π¬ Prompt templates (
dispatch-summary,job-summary,invoice-summary,technician-brief,customer-history).πͺ΅ Structured logging to stderr (never logs secrets) and centralized error handling.
π§© Extensible:
src/tools/generated/is reserved for OpenAPI-generated tools.
Related MCP server: ServiceTitan MCP Server
Project structure
zoho-fsm-mcp/
βββ src/
β βββ auth/oauth.ts # OAuth token manager (refresh + caching)
β βββ client/
β β βββ fsmClient.ts # The only place HTTP happens
β β βββ types.ts # Shared FSM/response types
β βββ tools/
β β βββ requests.ts workOrders.ts appointments.ts contacts.ts
β β βββ companies.ts invoices.ts estimates.ts assets.ts users.ts
β β βββ intelligent.ts # Multi-step workflow tools
β β βββ generated/ # Reserved for OpenAPI-generated tools
β β βββ shared.ts # Shared Zod shapes + context type
β β βββ index.ts # registerAllTools()
β βββ resources/ # modules, statuses, metadata (+ live)
β βββ prompts/ # Reusable prompt templates
β βββ utils/ # config, logger, errors, cache, mcp helpers
β βββ server.ts # Wires everything together
β βββ index.ts # stdio entry point
βββ .env.example
βββ package.json tsconfig.json eslint.config.js .prettierrc
βββ README.mdInstallation
git clone <this-repo>
cd zoho-fsm-mcp
npm install
npm run buildRequires Node.js β₯ 18.
OAuth setup
Go to the Zoho API Console and create a Self Client (or Server-based Application).
Note the Client ID and Client Secret.
Generate a grant token with the FSM scopes, e.g.:
ZohoFSM.modules.ALL,ZohoFSM.settings.ALL,ZohoFSM.users.READExchange the grant token for a refresh token (one-time), using the accounts endpoint for your region:
curl -X POST "https://accounts.zoho.com/oauth/v2/token" \ -d "grant_type=authorization_code" \ -d "client_id=YOUR_CLIENT_ID" \ -d "client_secret=YOUR_CLIENT_SECRET" \ -d "code=YOUR_GRANT_TOKEN"Save the
refresh_tokenfrom the response.Copy
.env.exampleto.envand fill in:ZOHO_CLIENT_ID=... ZOHO_CLIENT_SECRET=... ZOHO_REFRESH_TOKEN=... ZOHO_REGION=com # com | eu | in | au | jp
The server refreshes access tokens automatically and picks the correct base URL from ZOHO_REGION:
Region | Accounts endpoint | FSM API base |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Running locally
# Development (auto-reload)
npm run dev
# Type-check / lint / format
npm run typecheck
npm run lint
npm run format
# Production
npm run build
npm startInspect the tools interactively with the MCP Inspector:
npm run inspectConfiguring Claude Desktop
Edit claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"zoho-fsm": {
"command": "node",
"args": ["/absolute/path/to/zoho-fsm-mcp/dist/index.js"],
"env": {
"ZOHO_CLIENT_ID": "...",
"ZOHO_CLIENT_SECRET": "...",
"ZOHO_REFRESH_TOKEN": "...",
"ZOHO_REGION": "com"
}
}
}
}Restart Claude Desktop. The zoho-fsm tools appear in the tools menu.
Configuring ChatGPT / other MCP clients
Any MCP-compatible client that supports stdio servers can launch it the same way:
node /absolute/path/to/zoho-fsm-mcp/dist/index.jsFor ChatGPT's MCP support, register a connector pointing at this command (or wrap it behind an HTTP/SSE bridge if your client requires a URL). Environment variables are supplied the same way as above.
Available tools
Category | Tools |
Requests |
|
Work Orders |
|
Appointments |
|
Contacts |
|
Companies |
|
Estimates |
|
Invoices |
|
Assets |
|
Users |
|
Workflows |
|
Every tool validates input with Zod, calls FSMClient, and returns a structured MCP response. Errors are converted into a consistent payload with status, code, retryable, message, and details.
Adding a new tool
Create (or extend) a file in
src/tools/, e.g.parts.ts.Export a
registerXTools(ctx: ServerContext)function.Inside it, call
server.registerTool(name, { title, description, inputSchema }, handler).Define
inputSchemaas a Zod raw shape.Wrap the handler with
withToolLogging(name, ...)for logging + error handling.Build the API payload with
buildRecord(...)and call aFSMClientmethod.Return via
ok(data, summary).
Register your function in
src/tools/index.ts.
Example skeleton:
export function registerPartTools({ server, client }: ServerContext): void {
server.registerTool(
'create_part',
{ title: 'Create Part', description: '...', inputSchema: { name: z.string() } },
withToolLogging('create_part', async (args) => {
const created = await client.create('Parts', buildRecord({ Name: args.name }));
return ok(created, `Created part "${args.name}".`);
}),
);
}New REST calls should go through FSMClient (add a method there) β never call axios directly from a tool.
Future: OpenAPI-generated tools
src/tools/generated/ is reserved for tools generated from the Zoho FSM OpenAPI spec. A codegen step will emit *.generated.ts files there, each exporting a registerβ¦GeneratedTools(ctx) function called from generated/index.ts. Generated code stays separate from the hand-written intelligent tools and is safe to regenerate wholesale.
License
MIT
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/LogeshR15/zoho-fsm-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server