Overview
The Staple MCP server is a stateless Streamable HTTP endpoint. Any MCP client that can send a bearer token can use it, including Claude Code, Claude Desktop, and claude.ai. It exposes 9 tools, all read-only: nothing it does can create, change, approve, or delete anything in Staple.
https://agent.staple.jp/mcpAuthentication
Every request carries a personal token as a standard bearer credential:
Authorization: Bearer stp_mcp_…
Setup happens once per organization, then once per person:
- Organization credentials. An Owner or Accountant saves your organization's Staple API client ID and secret in Settings → MCP. Only read scopes are needed. The secret is checked against Staple, stored encrypted, and never shown again. Everyone in the organization shares it.
- Personal tokens. Each Owner or Accountant creates their own tokens on the same page. A token is shown once, so copy it immediately. Only a hash is stored.
Access is re-checked against Staple on every request. A token stops working as soon as its owner is deactivated, changes to the Standard role, or moves to another organization, with no need to revoke it. You can also revoke a token from Settings at any time, which takes effect immediately.
Connect a client
Claude Code
claude mcp add --transport http --scope user staple https://agent.staple.jp/mcp \ --header "Authorization: Bearer $STAPLE_MCP_TOKEN"
After you create a token, Settings offers a Copy Claude Code command button with this command already filled in.
claude.ai and Claude Desktop
Both use the same custom connector form. In Settings → Connectors:
- Choose Add custom connector. Enter a name such as Staple and the URL
https://agent.staple.jp/mcp, then choose Continue. - Under Authentication, pick No sign-in. Claude may mark Sign in now as detected, but this server has no OAuth sign-in, so that option won't work.
- Under Request headers, set the header name to
authorizationand the value toBearer stp_mcp_…, with your token. Include the wordBearerand a space: the value is sent exactly as entered. - Choose Add. Claude lists the 9 tools, and you can set when each one may run under Tool permissions.
MCP Inspector
npx @modelcontextprotocol/inspector # Transport: Streamable HTTP # URL: https://agent.staple.jp/mcp # Header: Authorization: Bearer <your token>
All tools
9 read-only tools. Each one only sees the organization its token belongs to.
| Tool | Description |
|---|---|
| Expenses | |
expense_list | List expenses across the whole organization, most recently updated first, with server-side filters. Each result has its id, merchant, status, transaction date, amount, submitter, and category. |
expense_timeline | The full activity history of one expense, oldest first: comments, receipt changes, edits, and status transitions, each with its actor and timestamp. |
| Expense groups | |
expense_group_list | List expense groups (expense reports, the containers expenses are submitted and approved in) with their status, submitter, submission date, and expense count. |
expense_group_get | One expense group with its details and every expense inside it. |
expense_group_expenses | The expenses inside one group, paginated. Same data as expense_group_get's expense list, for groups too large to read in one call. |
| People and organization | |
user_list | List the organization's members with name, email, role (Owner, Accountant, Approver, or Standard), and whether the account is active. |
user_get | One user's profile: name, email, role flags, and account status. |
org_get | The organization your token belongs to: name, locale, currency, and active, inactive, and pending user counts. It takes no id, because a token only ever reaches its own organization. |
expense_category_list | The organization's expense categories with their account code and name, and whether each is active. Not paginated. Use a category's id in expense_list's expense_category_ids filter. |
expense_list
List expenses across the whole organization, most recently updated first, with server-side filters. Each result has its id, merchant, status, transaction date, amount, submitter, and category.
| Argument | Type | Notes |
|---|---|---|
page | integer ≥ 1 | 1-based page number. Default 1. |
items | integer 1–500 | Page size. Default 20; Staple caps it at 500. |
search | string | Free text over merchant, comment, group name/description, tag, category, and submitter name/email. |
expense_status | enum | submitted, approved, reimbursed, processed, or rejected. |
date_filter | enum | Which date date_from/date_to apply to: submitted_at, approved_at, reimbursed_at, processed_at, rejected_at, or transaction_date. Required when either bound is set. |
date_from | YYYY-MM-DD | Inclusive lower bound. Requires date_filter. |
date_to | YYYY-MM-DD | Inclusive upper bound. Requires date_filter. |
amount_min | number | In the expense's own currency, not converted to JPY. |
amount_max | number | In the expense's own currency, not converted to JPY. |
payment_method | enum | cash, credit_card, corporate_card, ic_card, or other. |
has_receipt | boolean | true for expenses with a receipt attached, false for those without. |
user_ids | uuid[] | Only these submitters. |
expense_category_ids | uuid[] | Only these categories (ids from expense_category_list). |
expense_group_ids | uuid[] | Only expenses inside these groups. |
response_format | "markdown" | "json" | Default markdown. json also returns structured content. |
Try asking: “Which expenses are missing a receipt?” · “Show rejected expenses this quarter” · “Find the Starbucks expense”
expense_timeline
The full activity history of one expense, oldest first: comments, receipt changes, edits, and status transitions, each with its actor and timestamp.
| Argument | Type | Notes |
|---|---|---|
expense_id | uuid | Required. The expense's id, from expense_list. |
response_format | "markdown" | "json" | Default markdown. json also returns structured content. |
Try asking: “Why is this expense still stuck?” · “Who approved this, and when?”
expense_group_list
List expense groups (expense reports, the containers expenses are submitted and approved in) with their status, submitter, submission date, and expense count.
| Argument | Type | Notes |
|---|---|---|
page | integer ≥ 1 | 1-based page number. Default 1. |
items | integer 1–500 | Page size. Default 20; Staple caps it at 500. |
search | string | Free text over group name/description, merchant, and submitter. |
expense_group_status | enum | requested, drafted, submitted, approved, archived, or rejected. |
user_ids | uuid[] | Only these submitters. |
response_format | "markdown" | "json" | Default markdown. json also returns structured content. |
Try asking: “Which reports are still in draft?” · “What has this person submitted?”
expense_group_get
One expense group with its details and every expense inside it.
| Argument | Type | Notes |
|---|---|---|
id | uuid | Required. The expense group's id. |
response_format | "markdown" | "json" | Default markdown. json also returns structured content. |
expense_group_expenses
The expenses inside one group, paginated. Same data as expense_group_get's expense list, for groups too large to read in one call.
| Argument | Type | Notes |
|---|---|---|
expense_group_id | uuid | Required. |
page | integer ≥ 1 | 1-based page number. Default 1. |
items | integer 1–500 | Page size. Default 20; Staple caps it at 500. |
response_format | "markdown" | "json" | Default markdown. json also returns structured content. |
user_list
List the organization's members with name, email, role (Owner, Accountant, Approver, or Standard), and whether the account is active.
| Argument | Type | Notes |
|---|---|---|
page | integer ≥ 1 | 1-based page number. Default 1. |
items | integer 1–500 | Page size. Default 20; Staple caps it at 500. |
search | string | Free text over name and email. |
is_active | boolean | Only active (true) or inactive (false) accounts. |
response_format | "markdown" | "json" | Default markdown. json also returns structured content. |
Try asking: “Who are the Owners?” · “Find the user with email x@example.com”
user_get
One user's profile: name, email, role flags, and account status.
| Argument | Type | Notes |
|---|---|---|
id | uuid | Required. |
response_format | "markdown" | "json" | Default markdown. json also returns structured content. |
org_get
The organization your token belongs to: name, locale, currency, and active, inactive, and pending user counts. It takes no id, because a token only ever reaches its own organization.
| Argument | Type | Notes |
|---|---|---|
response_format | "markdown" | "json" | Default markdown. json also returns structured content. |
expense_category_list
The organization's expense categories with their account code and name, and whether each is active. Not paginated. Use a category's id in expense_list's expense_category_ids filter.
| Argument | Type | Notes |
|---|---|---|
response_format | "markdown" | "json" | Default markdown. json also returns structured content. |
Try asking: “What's the account code for Travel?”
Pagination and output
List tools page with page (1-based) and items (page size, default 20, maximum 500). Each response reports has_more, which is true when the page came back full. To read everything, call again with the next page until it is false.
Every tool takes response_format. The default, markdown, is compact text for Claude to read. json returns the same data as structured content, which is better when Claude will total, sort, or compare results. Text output is capped at 25,000 characters. Narrow the filters or lower items when a response is truncated.
Amounts are in the expense's own currency. JSON output carries both amount_cents (minor units, so whole yen for JPY) and amount in major units.
Errors
Connection-level failures come back as an HTTP status with a JSON-RPC error body. Once connected, a failed tool call returns a result marked isError with a message starting Error:.
| Status | Cause |
|---|---|
| 401 | The token is missing, malformed, or revoked. |
| 403 | The token's owner no longer has Owner or Accountant access to its organization, or no Staple API credentials are saved for the organization yet. |
| 405 | A GET or DELETE. The server is stateless and only accepts POST. |
| 503 | MCP isn't configured on this deployment, or authentication is temporarily unavailable. |
| Tool error | Cause |
|---|---|
Not found (404) | No record with that id in your organization. |
rejected the request parameters (400) | Usually date_from or date_to without date_filter, or a misspelled enum value. |
rejected the credentials (401) or Permission denied (403) | Staple refused the organization's API credentials or their scopes. An Owner or Accountant can replace them in Settings → MCP. |
Rate limit exceeded (429) | Too many requests to Staple. Wait, then retry. |