Paylocity MCP server

Integrates with Paylocity's HR and payroll API to enable secure access to employee data and payroll information directly within conversations, eliminating the need to switch to the Paylocity platform.
Back to servers
Setup instructions
Provider
MJ Zou
Release date
Mar 05, 2025
Language
Python

The mcpPaylocity MCP Server provides a streamlined interface to access Paylocity API data through the Model Context Protocol (MCP). It enables Claude AI to fetch employee information, earnings data, company codes, local taxes, and pay statements directly from Paylocity.

Installation and Setup

Environment Configuration

Before using the server, set up the following required environment variables:

PAYLOCITY_CLIENT_ID=your_client_id
PAYLOCITY_CLIENT_SECRET=your_client_secret
PAYLOCITY_COMPANY_IDS=12345,67890
PAYLOCITY_ENVIRONMENT=production

Optional model selection variables:

MODEL_COST_PRIORITY=value
MODEL_SPEED_PRIORITY=value
MODEL_INTELLIGENCE_PRIORITY=value
MODEL_HINTS=model1,model2

These variables can be set in a .env file in the project root directory.

Installation in Claude Desktop

On MacOS:

Configure the Claude Desktop settings file at: ~/Library/Application\ Support/Claude/claude_desktop_config.json

On Windows:

Configure the Claude Desktop settings file at: %APPDATA%/Claude/claude_desktop_config.json

Add the following configuration to the settings file:

For published servers:

"mcpServers": {
  "mcpPaylocity": {
    "command": "uvx",
    "args": [
      "mcppaylocity"
    ]
  }
}

Available Resources

The server provides access to Paylocity data through the following URI scheme:

  • paylocity://employees/{company_id} - List all employees for a company
  • paylocity://employees/{company_id}/{employee_id} - Get details for a specific employee
  • paylocity://earnings/{company_id}/{employee_id} - Get earnings data for a specific employee
  • paylocity://codes/{company_id}/{code_resource} - Get company codes for a specific resource
  • paylocity://localtaxes/{company_id}/{employee_id} - Get local taxes for a specific employee
  • paylocity://paystatement/{company_id}/{employee_id}/{year}/{check_date} - Get pay statement details for a specific date

Available Tools

The server implements these tools for interacting with Paylocity data:

fetch_employees

Retrieves all employees for a company

  • Parameters:
    • company_id (optional)

fetch_employee_details

Gets detailed information for a specific employee

  • Parameters:
    • employee_id (required)
    • company_id (optional)

fetch_employee_earnings

Retrieves earnings data for a specific employee

  • Parameters:
    • employee_id (required)
    • company_id (optional)

fetch_company_codes

Gets company codes for a specific resource

  • Parameters:
    • code_resource (required)
    • company_id (optional)

fetch_employee_local_taxes

Gets local tax information for a specific employee

  • Parameters:
    • employee_id (required)
    • company_id (optional)

fetch_employee_paystatement_details

Retrieves pay statement details for a specific date

  • Parameters:
    • employee_id (required)
    • year (required)
    • check_date (required)
    • company_id (optional)

Security Considerations

⚠️ Important: The application caches authentication tokens in the src/mcppaylocity/access_token/ directory. These files contain sensitive credentials and should never be committed to version control or shared.

If token files are accidentally committed, immediately:

  1. Remove them from the repository
  2. Rotate your Paylocity API credentials

Using MCP Inspector for Debugging

For debugging the server, you can use the MCP Inspector:

npx @modelcontextprotocol/inspector uv --directory /path/to/mcpPaylocity run mcppaylocity

The Inspector will provide a URL to access in your browser for debugging.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "mcpPaylocity" '{"command":"uvx","args":["mcppaylocity"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "mcpPaylocity": {
            "command": "uvx",
            "args": [
                "mcppaylocity"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "mcpPaylocity": {
            "command": "uvx",
            "args": [
                "mcppaylocity"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later