BambooHR MCP Server for Node.js & TypeScript
Integrate BambooHR with an MCP server using Node.js and TypeScript for a clean, type-safe interface to the BambooHR API.
npx -y @encoreshao/bamboohr-mcpOverview
BambooHR MCP Server for Node.js & TypeScript is a lightweight Model Context Protocol (MCP) integration that wraps the BambooHR REST API with a type-safe, promise-based interface. Built with TypeScript, it exposes typed models and helper functions to make common BambooHR operations (employee directory, time entries, time off, and project/time submissions) straightforward from Node.js applications or serverless functions.
This library is useful when you want predictable TypeScript types for BambooHR responses, a small surface area to call the API, and a simple pattern to extend with additional endpoints. It’s designed to be easy to install, easy to call from server-side code, and easy to expand with new API helpers.
Features
- Complete TypeScript types for models and API responses
- Promise-based API methods suitable for async/await
- High-level helper functions for common BambooHR workflows
- Minimal dependencies and a small code surface for easy extension
- Ready to use in Node.js, TypeScript projects, and serverless environments
Installation / Configuration
Clone the repository and install dependencies:
# Clone the repo
# Install
Build (if using TypeScript locally) and run tests (if provided):
Environment variables
You can pass credentials directly to API calls, but environment variables make local development and CI simpler. Create a .env file or set these in your environment:
BAMBOOHR_TOKEN=your_api_token_here
BAMBOOHR_COMPANY_DOMAIN=yourcompany
BAMBOOHR_EMPLOYEE_ID=123
Table: required environment variables
| Variable | Description |
|---|---|
| BAMBOOHR_TOKEN | Your BambooHR API token (from Account → API Keys) |
| BAMBOOHR_COMPANY_DOMAIN | Company subdomain (the part before .bamboohr.com) |
| BAMBOOHR_EMPLOYEE_ID | Numeric employee ID for actions tied to a user |
Tip: The API token is shown only once when created — store it securely (e.g., secrets manager).
Available Resources
The library exposes:
- BambooHRApi class — a low-level API wrapper that encapsulates authentication and HTTP calls.
- Helper functions — convenience wrappers for common tasks:
- fetchEmployeeDirectory
- fetchWhosOut
- fetchProjects
- fetchTimeEntries
- submitWorkHours
- getMe
All functions return Promises and use types defined in the project’s type definitions (e.g., src/utils/models.d.ts).
Example exports (simplified):
;
Use Cases
- List employee directory (name, email, job title)
;
;
;
- Check who is out today
;
- Submit work hours to a project/task
;
;
;
;
Extending the Library
- Add new endpoints in src/apis/bamboohr.ts using the BambooHRApi class to keep authentication and request patterns consistent.
- Export new helpers from src/index.ts so consumers can import them directly.
- Use the provided TypeScript model definitions (src/utils/models.d.ts) when adding or returning new types.
Directory hints:
- src/apis — API call implementations
- src/utils — model/type definitions and helpers
- src/index.ts — public exports
Notes, Contributing & License
- All methods are asynchronous and return Promises; use try/catch or .catch for error handling.
- Contributions are welcome — open an issue or a pull request on the repository.
- This project uses the MIT License. See the LICENSE file in the repo for details.
Repository: https://github.com/encoreshao/bamboohr-mcp