benepass-mcp
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., "@benepass-mcp What's my HSA balance?"
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.
benepass-mcp
Unofficial, read-only MCP server for the Benepass employee-web API.
This project is not affiliated with, endorsed by, or supported by Benepass. It reverse-engineers the public employee-web client. Do not contact Benepass support about this server, login issues, missing endpoints, or anything else related to this unofficial tool.
The package name on the public registry is already taken. This repo sets private: true and is not published there.
Layout
src/index.ts— stdio entry (serveStdio)src/server.ts—McpServerfactorysrc/tools.ts— thin MCP adapters (TOOL_NAMES)src/app.ts— composition rootsrc/accounts.ts— benefits derivation, HSA account selectionsrc/hsa.ts— investment GET path walksrc/api.ts— GET-only Benepass HTTP clientsrc/http.ts— ky + host allowlistsrc/cognito.ts— Cognito OTP + token refreshsrc/session.ts— local session filesrc/schemas.ts— Zod models for Benepass JSONsrc/errors.ts— typed errorstest/— Vitest (in-process MCP client + unit tests)
Related MCP server: mcp-nightscout
Security model
Read-only. The ky client for
api.benefitsapi.comthrows if the method is not GET. There are no tools for deposits, withdrawals, expense submit/update/delete, cards/PIN, payouts, or genericcall_api.Tokens stay on your machine. After OTP login, the Cognito refresh token is stored at
~/.config/benepass-mcp/session.json(XDG viaenv-paths), mode0600. Override withBENEPASS_SESSION_PATH(two P's). Tools never return refresh or access tokens. Tokens are never logged. Session files are gitignored.Outbound hosts only:
cognito-idp.us-east-1.amazonaws.com,cognito.benefitsapi.com,api.benefitsapi.com.Cognito app client id
6l7jeu4r44kgndgeab4aot355mis a public client id (not a secret); it is baked into the employee-web app.
Login flow
Call
start_loginwith your Benepass email. Cognito InitiateAuth CUSTOM_AUTH sends an OTP.Call
complete_loginwith the email, OTP, andchallenge_session. Cognito RespondToAuthChallenge CUSTOM_CHALLENGE yields a refresh token that is written to the local session file. The tool returns only{ ok, email }.Later API calls POST
grant_type=refresh_tokento the token URL and send the access token as Authorization Bearer. Expiry is honored (expires_inand JWTexp).If
workspace_idis omitted, GET/v2/me/workspaces/and persist the firsttype=employmentworkspace.
Tools
Auth: start_login, complete_login, auth_status, logout.
Reads: list_workspaces, list_accounts, list_benefits (derived from accounts enrollment.benefit + available balance), list_transactions, get_hsa_account_details, get_hsa_investments, list_documents, get_document, get_current_user.
list_benefits: Benepass has no /v2/me/benefits/. Benefits are derived from each account enrollment.benefit and the balance key ending in /available.
get_hsa_investments: tries GET only, first 2xx wins:
/v2/me/accounts/{id}/hsa-investments//v2/me/accounts/{id}/hsa-investments/portfolio//v2/me/accounts/{id}/hsa-investments/portfolio/allocation//v2/me/accounts/{id}/hsa-investments/asset-links/
If account_id is omitted, HSA accounts are selected from Zod-parsed fields (enrollment.benefit.benefit_type, enrollment.benefit.key, account.key, account.account_type, account.type) matching hsa / health_savings / health_savings_account. Account names are not searched. If those fields are absent, the tool falls back to an account id on GET /v2/me/hsa-account-details/. If every candidate 404s, the tool errors and includes that get_hsa_account_details payload. Those investment GET paths are reverse-engineered and may not exist for every account.
License
MIT
Stdio
This server speaks MCP on stdout and writes logs to stderr. Use the start script after build, or the dev script during development.
Cursor
Add a benepass entry to MCP settings (mcp.json) that launches this package's compiled entry. Authenticate with start_login then complete_login.
Example Cursor config is in cursor-mcp.example.json.
Available Tools
13 toolsauth_statusAuth statusARead-only
Show whether a local Benepass session exists, and the logged-in email. Never returns secrets.
Inputs: no named parameters. Returns: object
complete_loginComplete loginARead-only
Complete Benepass login with the email OTP and challenge session from start_login. Persists a local session; never returns tokens.
Inputs: otp (required), email (required), challenge_session (required). Returns: ok, email
get_current_userGet current userARead-only
Fetch the current Benepass user profile (GET /v2/me/).
Inputs: no named parameters. Returns: object
get_documentGet documentARead-only
Fetch a single document by id.
Inputs: document_id (required), workspace_id. Returns: object
get_hsa_account_detailsGet HSA account detailsARead-only
Fetch Health Savings Account details (US HSA). May 404 for non-US users.
Inputs: workspace_id. Returns: object
get_hsa_investmentsGet HSA investmentsARead-only
Read HSA investment data by trying known GET paths on an HSA account. First 2xx wins. Reverse-engineered; paths may 404.
Inputs: account_id, workspace_id. Returns: body, path, account_id
list_accountsList accountsARead-only
List benefit accounts and balances for the current workspace.
Inputs: workspace_id. Returns: data
list_benefitsList benefitsARead-only
List enrolled benefits derived from accounts (Benepass has no /v2/me/benefits/ endpoint). Includes available balance.
Inputs: workspace_id. Returns: data
list_documentsList documentsARead-only
List documents available in the current workspace (statements, plan docs, tax forms).
Inputs: workspace_id. Returns: object
list_transactionsList transactionsBRead-only
List transactions for the current workspace. Paginate with limit/offset; optionally filter by benefit_id.
Inputs: limit, offset, benefit_id, workspace_id. Returns: object
list_workspacesList workspacesARead-only
List Benepass workspaces for the logged-in user (employment and personal). Does not require a workspace header.
Inputs: no named parameters. Returns: object
logoutLog outBRead-only
Delete the local Benepass session file.
Inputs: no named parameters. Returns: ok
start_loginStart loginBRead-only
Start Benepass email OTP login. Sends a one-time code to the email and returns a short-lived challenge session.
Inputs: email (required). Returns: challenge_name, challenge_session
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct operation (auth, list, get) on distinct resources (user, workspaces, accounts, benefits, transactions, HSA, documents). No two tools appear to overlap in purpose, making selection unambiguous.
Most tools follow a verb_noun pattern (list_*, get_*, start_login, complete_login). Minor deviations include auth_status (noun-like) and logout (single verb), but overall the convention is clear and predictable.
13 tools is within the ideal 3-15 range and aligns well with the server's scope of accessing Benepass data. Each tool serves a clear purpose without redundancy, making the set well-proportioned.
The surface covers core read operations (auth, lists, details) with no obvious dead ends. Minor gaps include the lack of individual transaction detail fetch and potential reverse-engineering fragility of HSA investments, but the main workflows are supported.
Related MCP Connectors
Read Spruce Health contacts, conversations, messages, phone lines and team members (read-only).
Read-only, permission-scoped PIO team workflows for payments, payroll and employee onboarding.
Read PaySpace employees, organization, payroll runs, payslips and leave records. Read-only.
Read-only access to Genie accounts, transactions, investments, and financial summaries.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables read-only access to Bity cryptocurrency account balances, market data (ticker, order book, trades), and order history via the official API.MIT
- AlicenseNot gradedqualityCmaintenanceEnables read-only access to a Nightscout instance for glucose readings, treatments, and deterministic server-side aggregates, allowing users to discuss their diabetes data with an AI assistant without write permissions.1MIT
- AlicenseAqualityBmaintenanceEnables read-only access to Klaviyo marketing data, including campaigns, flows, segments, metrics, reports, and customer profiles, across multiple Klaviyo accounts.2434 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables inspecting customer-data sources, destinations, connections, and warehouses through Segment's Public API with read-only access.299 npmMIT