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.
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.
Configure the Claude Desktop settings file at:
~/Library/Application\ Support/Claude/claude_desktop_config.json
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"
]
}
}
The server provides access to Paylocity data through the following URI scheme:
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 dateThe server implements these tools for interacting with Paylocity data:
Retrieves all employees for a company
company_id
(optional)Gets detailed information for a specific employee
employee_id
(required)company_id
(optional)Retrieves earnings data for a specific employee
employee_id
(required)company_id
(optional)Gets company codes for a specific resource
code_resource
(required)company_id
(optional)Gets local tax information for a specific employee
employee_id
(required)company_id
(optional)Retrieves pay statement details for a specific date
employee_id
(required)year
(required)check_date
(required)company_id
(optional)⚠️ 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:
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.
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.
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.
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"
]
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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