Access BambooHR Employee and Time Data
Query BambooHR from your AI assistant: employee directory, who's out today, projects and tasks, and work-hour submission via a typed API.
Maintainer of this project? Claim this page to edit the listing.
1.0.0Add to Favorites
Why it matters
Integrate your applications with BambooHR to programmatically access employee data, time tracking, and project management information. Streamline HR processes by fetching employee directories, checking absences, and managing work hours.
Outcomes
What it gets done
Fetch employee directory with name, email, and job title
Retrieve 'Who's out today' information
Submit and retrieve time entries and work hours
Access project and task management details
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-bamboohr-mcp | bash Capabilities
Tools your agent gets
Retrieve employee directory with name, email, and job title information.
Check who is out of office today.
Retrieve list of projects for project management.
Submit work hours for specific projects and tasks.
Retrieve current employee profile information.
Retrieve time entries for work hour tracking.
Overview
BambooHR MCP Server
A typed Node.js/TypeScript MCP library for BambooHR, covering employee directory lookups, time-off status, project/task browsing, and work-hour submission. Reach for this when an AI assistant or internal tool needs typed access to BambooHR's employee directory, time-off, or time-tracking data.
What it does
This is a Model Context Protocol library for BambooHR, built with Node.js and TypeScript, providing a type-safe interface to the BambooHR API. It exposes a BambooHRApi class plus standalone helper functions: fetchEmployeeDirectory (name, email, job title for all employees), fetchWhosOut (who is out and for what date range), fetchProjects (projects and their tasks for an employee), submitWorkHours (log hours against a specific project and task with a date, duration, and note), getMe (the authenticated employee's own profile), and fetchTimeEntries. All methods return Promises and use TypeScript types defined in src/utils/models.d.ts.
When to use - and when NOT to
Use this when you want an AI assistant or Node.js/TypeScript application to look up employee directory information, check who's out today, browse projects and tasks, or submit work hours against a BambooHR project/task - all through a typed API instead of calling BambooHR's REST API directly.
Do NOT use this without a BambooHR API token, your company domain, and your employee ID configured - all three are required. Generate the token from your BambooHR profile's API Keys page; it is shown only once at creation.
Capabilities
fetchEmployeeDirectory(token, companyDomain): list all employees with name, email, and job title.fetchWhosOut(token, companyDomain): list who is out and their start/end dates.fetchProjects(token, companyDomain, employeeID): list projects and their tasks for an employee.submitWorkHours(token, companyDomain, employeeID, projectId, taskId, date, hours, note): log work hours against a project/task.getMe: get the authenticated employee's own profile.fetchTimeEntries: retrieve logged time entries.
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}`);
});
How to install
git clone https://github.com/encoreshao/bamboohr-mcp.git
cd bamboohr-mcp
npm install
Create a BambooHR API token from your BambooHR account: click your profile picture in the bottom-left corner, select "API Keys", click "Add New Key", name it (e.g. "MCP Server"), and click "Generate Key" - copy it immediately since it's only shown once. Your company domain is the subdomain in your BambooHR URL (e.g. yourcompany for https://yourcompany.bamboohr.com). Your employee ID can be read from your profile URL, e.g. https://yourcompany.bamboohr.com/employees/employee.php?id=123. Configure via a .env file:
BAMBOOHR_TOKEN=your_api_token_here
BAMBOOHR_COMPANY_DOMAIN=yourcompany
BAMBOOHR_EMPLOYEE_ID=123
Credentials can also be passed directly to each method instead of via environment variables. To extend the library, add new methods in src/apis/bamboohr.ts and export them from src/index.ts.
Who it's for
HR teams and developers building internal tools who want typed, promise-based access to BambooHR's employee directory, time-off, projects, and time-tracking data from Node.js/TypeScript or an AI assistant.
Source README
BambooHR 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.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.