← Back

Python MCP Server Connecting Claude to a Field-Service CRM

A hosted, OAuth-protected MCP server in Python that lets a home-services business ask Claude about customers, jobs, invoices and leads, with write actions hidden unless allowed.

Python Automation
Works with
  • Python
  • FastMCP
  • OAuth 2.0
  • REST API
  • Railway
  • Claude

The Problem

A home-services business wanted to ask Claude questions about customers, jobs, invoices and leads, and to take safe actions, without giving it raw database access.

The Solution

A Model Context Protocol server that exposes the full REST API of the business’s field-service software (Housecall Pro) as about 20 domain modules: customers, jobs, estimates, invoices, leads, employees, scheduling, webhooks and more. They are all mounted under one FastMCP app. It is deployed on Railway and connects straight into claude.ai.

Notable details

  • OAuth login sits in front of the server (GitHub provider, redirecting back to claude.ai), so no shared API keys are handed to users.
  • A read-only enforcer middleware hides every tool whose name contains create, update, delete, send, void or dispatch from the tool list, unless it is explicitly allowed. This is per-agent permission control at the protocol level.
  • Tools are namespaced (customers_*, jobs_*, invoices_*), so the model cannot confuse one domain with another.
The server entry point: GitHub OAuth in front, one FastMCP app, and each domain module (customers, jobs, estimates, invoices, leads, employees) mounted under its own namespace.
The repository: one Python module for each area of the field-service API, plus a Procfile for deployment on Railway. The commit messages are blurred.

Python, FastMCP, OAuth 2.0, REST and Railway.