# Jobber MCP Server

A comprehensive Model Context Protocol (MCP) server for Jobber, the field service management platform. This server provides tools to interact with jobs, clients, quotes, invoices, scheduling, team management, expenses, products, and reporting.

## Features

### 🔧 Tools (48 total)

#### Jobs (8 tools)
- `list_jobs` - List all jobs with filtering
- `get_job` - Get job details
- `create_job` - Create a new job
- `update_job` - Update job information
- `close_job` - Mark job as completed
- `list_job_visits` - List visits for a job
- `create_job_visit` - Schedule a visit for a job
- `list_job_line_items` - List job line items

#### Clients (7 tools)
- `list_clients` - List all clients
- `get_client` - Get client details
- `create_client` - Create a new client
- `update_client` - Update client information
- `archive_client` - Archive a client
- `search_clients` - Search clients by name/email/company
- `list_client_properties` - List client properties

#### Quotes (8 tools)
- `list_quotes` - List all quotes
- `get_quote` - Get quote details
- `create_quote` - Create a new quote
- `update_quote` - Update quote information
- `send_quote` - Send quote to client
- `approve_quote` - Approve a quote
- `convert_quote_to_job` - Convert approved quote to job
- `list_quote_line_items` - List quote line items

#### Invoices (7 tools)
- `list_invoices` - List all invoices
- `get_invoice` - Get invoice details
- `create_invoice` - Create a new invoice
- `send_invoice` - Send invoice to client
- `mark_invoice_paid` - Mark invoice as paid
- `list_invoice_payments` - List invoice payments
- `create_payment` - Record a payment

#### Scheduling (6 tools)
- `list_visits` - List all visits
- `get_visit` - Get visit details
- `create_visit` - Schedule a new visit
- `update_visit` - Update visit information
- `complete_visit` - Mark visit as completed
- `list_visit_assignments` - List assigned users for a visit

#### Team (4 tools)
- `list_users` - List team members
- `get_user` - Get user details
- `list_time_entries` - List time entries
- `create_time_entry` - Create a time entry

#### Expenses (5 tools)
- `list_expenses` - List all expenses
- `get_expense` - Get expense details
- `create_expense` - Create a new expense
- `update_expense` - Update expense information
- `delete_expense` - Delete an expense

#### Products (5 tools)
- `list_products` - List products and services
- `get_product` - Get product/service details
- `create_product` - Create a new product/service
- `update_product` - Update product/service
- `delete_product` - Archive a product/service

#### Requests (6 tools)
- `list_requests` - List client requests
- `get_request` - Get request details
- `create_request` - Create a new request
- `update_request` - Update request information
- `convert_request_to_quote` - Convert request to quote
- `convert_request_to_job` - Convert request to job

#### Reporting (3 tools)
- `get_revenue_report` - Revenue analytics
- `get_job_profit_report` - Job profitability analysis
- `get_team_utilization_report` - Team utilization metrics

### 🎨 MCP Apps (18 total)

1. **job-dashboard** - Overview of all jobs with status breakdown
2. **job-detail** - Detailed view of a single job
3. **job-grid** - Searchable, filterable table of all jobs
4. **client-detail** - Detailed view of a single client
5. **client-grid** - Searchable table of all clients
6. **quote-builder** - Create and edit quotes with line items
7. **quote-grid** - List of all quotes with filtering
8. **invoice-dashboard** - Overview of invoicing metrics
9. **invoice-detail** - Detailed view of a single invoice
10. **schedule-calendar** - Calendar view of visits and appointments
11. **team-dashboard** - Overview of team members and activity
12. **team-schedule** - View schedules for all team members
13. **expense-tracker** - Track and manage expenses
14. **product-catalog** - Manage products and services
15. **request-inbox** - Manage client requests
16. **revenue-dashboard** - Revenue reporting and analytics
17. **job-profit-report** - Profitability analysis by job
18. **utilization-chart** - Team utilization analytics

## Installation

```bash
npm install
npm run build
```

## Configuration

Set your Jobber API token as an environment variable:

```bash
export JOBBER_API_TOKEN=your_api_token_here
```

## Usage

### With Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "jobber": {
      "command": "node",
      "args": ["/path/to/jobber-server/dist/index.js"],
      "env": {
        "JOBBER_API_TOKEN": "your_api_token_here"
      }
    }
  }
}
```

### Standalone

```bash
JOBBER_API_TOKEN=your_token node dist/index.js
```

## API

This server uses the Jobber GraphQL API (https://api.getjobber.com/api/graphql) with OAuth2 Bearer token authentication.

### Authentication

Get your API token from Jobber:
1. Log in to your Jobber account
2. Go to Settings → API → Developer
3. Create an API token with appropriate permissions

## Development

```bash
# Install dependencies
npm install

# Build TypeScript
npm run build

# Watch mode for development
npm run dev
```

## Project Structure

```
jobber/
├── src/
│   ├── clients/
│   │   └── jobber.ts          # GraphQL API client
│   ├── tools/
│   │   ├── jobs-tools.ts      # Job management tools
│   │   ├── clients-tools.ts   # Client management tools
│   │   ├── quotes-tools.ts    # Quote management tools
│   │   ├── invoices-tools.ts  # Invoice management tools
│   │   ├── scheduling-tools.ts # Scheduling tools
│   │   ├── team-tools.ts      # Team management tools
│   │   ├── expenses-tools.ts  # Expense tracking tools
│   │   ├── products-tools.ts  # Product/service catalog tools
│   │   ├── requests-tools.ts  # Client request tools
│   │   └── reporting-tools.ts # Reporting and analytics tools
│   ├── types/
│   │   └── jobber.ts          # TypeScript type definitions
│   ├── ui/
│   │   └── react-app/         # 18 React MCP apps
│   ├── server.ts              # MCP server implementation
│   └── index.ts               # Entry point
├── package.json
├── tsconfig.json
└── README.md
```

## License

MIT

## Contributing

Contributions are welcome! Please open an issue or submit a pull request.

## Support

For issues related to:
- **This MCP server**: Open a GitHub issue
- **Jobber API**: Contact Jobber support
- **MCP protocol**: See https://modelcontextprotocol.io

## Links

- [Jobber API Documentation](https://developer.getjobber.com/)
- [Model Context Protocol](https://modelcontextprotocol.io)
- [MCP SDK](https://github.com/modelcontextprotocol/sdk)
