About BambooHR MCP
BambooHR MCP is a Node.js and TypeScript library for typed access to BambooHR APIs. It helps developers call major endpoints through promise-based methods and extend the library with additional methods.
Key features
- 01TypeScript models and response types
- 02Promise-based methods for major endpoints
- 03BambooHR API wrapper class
- 04Exported helper functions
- 05Extendable API methods
Use cases
- 01Access BambooHR from Node.js applications
- 02Use BambooHR API methods in TypeScript projects
- 03Fetch employee, project, and time-entry data
- 04Submit employee work hours
MCP support
The project describes itself as an MCP library for BambooHR, providing an interface to BambooHR API operations for applications. The README does not detail MCP protocol tools or transport behavior.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEBambooHR MCP
A Model Context Protocol (MCP) library for BambooHR, built with Node.js and TypeScript. This library provides a clean, type-safe interface to interact with the BambooHR API from your Node.js or TypeScript applications.
Features
- TypeScript types for all models and API responses
- Simple, promise-based API for all major BambooHR endpoints
- Easy to extend and integrate into your own projects
Installation
# Clone the repository
git clone https://github.com/encoreshao/bamboohr-mcp.git
# Navigate to the project directory
cd bamboohr-mcp
# Install dependencies
npm install
Usage
import {
BambooHRApi,
fetchWhosOut,
fetchProjects,
submitWorkHours,
getMe,
fetchEmployeeDirectory,
fetchTimeEntries,
} from "bamboohr-mcp";
const token = process.env.BAMBOOHR_TOKEN!;
const companyDomain = process.env.BAMBOOHR_COMPANY_DOMAIN!;
const employeeID = process.env.BAMBOOHR_EMPLOYEE_ID!;
// List all employees with name, email, and job title
const directory = await fetchEmployeeDirectory(token, companyDomain);
directory.employees.forEach((emp) => {
console.log(`${emp.displayName} — ${emp.workEmail} — ${emp.jobTitle}`);
});
// Fetch "who's out today"
const whosOut = await fetchWhosOut(token, companyDomain);
whosOut.forEach((out) => {
console.log(`${out.employeeName}: ${out.startDate} to ${out.endDate}`);
});
// Submit work hours (find project/task IDs first)
const projects = await fetchProjects(token, companyDomain, employeeID);
const bambooHR = projects.find((p) => p.name.includes("BambooHR"));
const devTask = bambooHR?.tasks.find((t) => t.name.includes("Development"));
if (bambooHR && devTask) {
await submitWorkHours(
token,
companyDomain,
employeeID,
bambooHR.id,
devTask.id,
"2024-06-01",
1,
"Development work on BambooHR"
);
}
API
All methods return Promises and use the types defined in src/utils/models.d.ts.
BambooHRApiclass: Encapsulates all API methods.- Helper functions:
fetchWhosOut,fetchProjects,submitWorkHours,getMe,fetchEmployeeDirectory,fetchTimeEntries.
Environment Variables
You can pass your BambooHR API token and company domain directly to the methods, or use environment variables:
Required:
BAMBOOHR_TOKEN— Your BambooHR API tokenBAMBOOHR_COMPANY_DOMAIN— Your BambooHR company domain (the part before .bamboohr.com)BAMBOOHR_EMPLOYEE_ID— Your BambooHR employee ID
Creating a BambooHR API Token
To use this library, you'll need to create a BambooHR API token:
- Log in to your BambooHR account
- Click on your profile picture in the bottom-left corner
- Select "API Keys" from the dropdown menu
- Click "Add New Key"
- Enter a API Key Name for your key (e.g., "MCP Server"), and click "Generate Key"
- Copy the generated token immediately (it will only be shown once)
Finding Your Company Domain
Your company domain is the subdomain used in your BambooHR URL:
- If you access BambooHR at
https://yourcompany.bamboohr.com, then your company domain isyourcompany - This value should be used for the
BAMBOOHR_COMPANY_DOMAINenvironment variable or passed directly to the API methods
Getting Your Employee ID
You can find your employee ID in several ways:
- From your profile URL: When viewing your profile, the URL will contain your employee ID (e.g.,
https://yourcompany.bamboohr.com/employees/employee.php?id=123)
Example .env file:
BAMBOOHR_TOKEN=your_api_token_here
BAMBOOHR_COMPANY_DOMAIN=yourcompany
BAMBOOHR_EMPLOYEE_ID=123
Extending
Add new methods in src/apis/bamboohr.ts and export them from src/index.ts.
Contributors
- Encore Shao (github.com/encoreshao)
License
This project is licensed under the MIT License. See the LICENSE file for details.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.