mcpPaylocity
Allows loading configuration variables from a .env file to connect to the Paylocity API, supporting secure credential management.
Mentions GitHub in the context of security and avoiding accidental credential commits in version control.
Provides specific installation path instructions for Claude Desktop on macOS systems.
Supports publishing the MCP server package to PyPI for distribution and installation.
Click on "Deploy 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., "@mcpPaylocity show me all employees for company 12345"
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.
mcpPaylocity MCP Server
A Model Context Protocol (MCP) server to fetch data from Paylocity API endpoints.
Components
Resources
The server implements Paylocity API resources with:
Custom
paylocity://URI scheme for accessing Paylocity dataThe following resources are available:
paylocity://employees/{company_id}- List all employees for a companypaylocity://employees/{company_id}/{employee_id}- Get details for a specific employeepaylocity://earnings/{company_id}/{employee_id}- Get earnings data for a specific employeepaylocity://codes/{company_id}/{code_resource}- Get company codes for a specific resourcepaylocity://localtaxes/{company_id}/{employee_id}- Get local taxes for a specific employeepaylocity://paystatement/{company_id}/{employee_id}/{year}/{check_date}- Get pay statement details for a specific date
Tools
The server implements the following tools:
fetch_employees- Fetches all employees for a companyTakes optional
company_idparameter
fetch_employee_details- Fetches details for a specific employeeTakes required
employee_idand optionalcompany_idparameters
fetch_employee_earnings- Fetches earnings data for a specific employeeTakes required
employee_idand optionalcompany_idparameters
fetch_company_codes- Fetches company codes for a specific resourceTakes required
code_resourceand optionalcompany_idparameters
fetch_employee_local_taxes- Fetches local taxes for a specific employeeTakes required
employee_idand optionalcompany_idparameters
fetch_employee_paystatement_details- Fetches pay statement details for a specific dateTakes required
employee_id,year,check_dateand optionalcompany_idparameters
Related MCP server: Paylocity MCP Server by CData
Future Implementations
The following endpoints will be implemented in future updates:
Higher level insights (e.g. turnover rate, headcount by department, rate comparison etc.)
Configuration
The server requires the following environment variables to be set:
PAYLOCITY_CLIENT_ID- Your Paylocity API client IDPAYLOCITY_CLIENT_SECRET- Your Paylocity API client secretPAYLOCITY_COMPANY_IDS- Comma-separated list of company IDs to usePAYLOCITY_ENVIRONMENT- API environment to use (productionortesting)MODEL_COST_PRIORITY- Optional cost priority for model selectionMODEL_SPEED_PRIORITY- Optional speed priority for model selectionMODEL_INTELLIGENCE_PRIORITY- Optional intelligence priority for model selectionMODEL_HINTS- Optional comma-separated model name hints
These can be set in a .env file in the project root directory.
MCP Handshake
On startup the server responds to the MCP initialize request with handshake data
containing its capabilities, instructions, protocol version and server info. The
instructions field describes how to use the Paylocity resources and tools.
Security
⚠️ IMPORTANT: This application caches authentication tokens in the src/mcppaylocity/access_token/ directory. These files contain sensitive credentials and should never be committed to version control.
The repository includes these paths in .gitignore, but please verify that token files are not accidentally committed when pushing changes.
If you've accidentally committed token files, follow these steps:
Remove the files from the repository:
git rm --cached src/mcppaylocity/access_token/token.json src/mcppaylocity/access_token/token_info.txtCommit the removal:
git commit -m "Remove accidentally committed token files"Consider rotating your Paylocity API credentials as they may have been compromised
Quickstart
Install
Claude Desktop
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
"mcpServers": {
"mcpPaylocity": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcpPaylocity",
"run",
"mcppaylocity"
]
}
}"mcpServers": {
"mcpPaylocity": {
"command": "uvx",
"args": [
"mcppaylocity"
]
}
}Development
Building and Publishing
To prepare the package for distribution:
Sync dependencies and update lockfile:
uv syncBuild package distributions:
uv buildThis will create source and wheel distributions in the dist/ directory.
Publish to PyPI:
uv publishNote: You'll need to set PyPI credentials via environment variables or command flags:
Token:
--tokenorUV_PUBLISH_TOKENOr username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
npx @modelcontextprotocol/inspector uv --directory /path/to/mcpPaylocity run mcppaylocityUpon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Architecture
The server is built with the following components:
PaylocityClient - Handles communication with the Paylocity API
TokenManager - Manages authentication tokens, including caching and renewal
FastMCP Server - Exposes Paylocity data through MCP resources and tools
License
MIT License
Copyright (c) 2024 MJ Zou (@mjzou)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Available Tools
6 toolsfetch_company_codesB
Fetch company codes for a specific resource.
Args: company_id: Optional company ID (string or integer). If not provided, uses the first company ID from configuration. code_resource: Code resource to fetch (e.g., 'earnings', 'deductions', 'costcenter1', etc.)
Inputs: company_id, code_resource. Returns: result
fetch_employee_detailsB
Fetch details for a specific employee.
Args: company_id: Optional company ID (string or integer). If not provided, uses the first company ID from configuration. employee_id: Employee ID (string or integer) to get details for.
Inputs: company_id, employee_id. Returns: result
fetch_employee_earningsB
Fetch earnings data for a specific employee.
Args: company_id: Optional company ID (string or integer). If not provided, uses the first company ID from configuration. employee_id: Employee ID (string or integer) to get earnings for.
Inputs: company_id, employee_id. Returns: result
fetch_employee_local_taxesB
Fetch local taxes for a specific employee.
Args: company_id: Optional company ID (string or integer). If not provided, uses the first company ID from configuration. employee_id: Employee ID (string or integer) to get local taxes for.
Inputs: company_id, employee_id. Returns: result
fetch_employee_paystatement_detailsB
Fetch pay statement details for a specific employee, year and check date.
Args: company_id: Optional company ID (string or integer). If not provided, uses the first company ID from configuration. employee_id: Employee ID (string or integer) to get pay statement details for. year: The year to get pay statement details for. check_date: The check date to get pay statement details for (format: MM/DD/YYYY).
Inputs: company_id, employee_id, year, check_date. Returns: result
fetch_employeesC
Fetch all employees for a company.
Args: company_id: Optional company ID (string or integer). If not provided, uses the first company ID from configuration.
Inputs: company_id. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose targeting specific resources: company codes, employee details, employee earnings, employee local taxes, employee pay statements, and all employees. No overlap exists between these functions, making tool selection unambiguous.
All tools follow a consistent 'fetch_[resource]_[detail]' snake_case pattern (e.g., fetch_employee_details, fetch_employee_earnings). This predictable naming convention makes the tool set easy to navigate and understand.
With 6 tools, this server is well-scoped for HR/payroll operations. Each tool serves a distinct purpose in the employee and company data domain, providing a focused yet comprehensive surface without being overwhelming.
The tool set covers key read operations for employee and company data, but lacks write/update capabilities (e.g., creating employees, updating details) and broader payroll actions. For a read-only API surface, it's reasonably complete, though agents cannot perform full CRUD workflows.
Maintenance
Related MCP Connectors
MCP server for Arcoro and ExakTime — workforce data, jobs, cost codes and locations.
isolved and ApplicantPro jobs, tenant discovery, and change detection as an MCP server.
MCP server exposing klokin time-tracking operations (employees, time entries, stores) to AI clients.
MCP server for Talenta — read employee, attendance, leave, payroll and recruitment data.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP Server that provides access to Personio's HR and personnel data through the Personnel API, allowing interaction with employee records, HR systems, and personnel management functions.-
- AlicenseNot gradedqualityDmaintenanceThis project builds a read-only MCP server. For full read, write, update, delete, and action capabilities and a simplified setup, check out our free CData MCP Server for Paylocity (beta): https://www.cdata.com/download/download.aspx?sku=KPZK-V&type=betaMIT
- AlicenseAqualityDmaintenanceMCP server for PrismHR, enabling AI agents to automate payroll, benefits, compliance, and billing tasks with verified-schema tools and scope-gated consent.1890 PyPI4MIT
- AlicenseAqualityBmaintenanceAn MCP server that wraps the Check Payroll API, providing 263 tools for managing companies, employees, contractors, payrolls, tax configuration, and more.318MIT