whoami
ReadsWho am I
Your WorkBeaver account and the teams you belong to, with your role in each. Call this first to learn your user id and team ids.
No parameters.
Docs / MCP serverCreate an access tokenWorkBeaver docs
Connect with OAuth in ChatGPT or Codex, or use an access token from Settings → AI assistants. The examples below write the address as https://your-workbeaver.example/api/mcp.
WorkBeaver is an MCP (Model Context Protocol) server. Connect an AI assistant such as Claude, Cursor or VS Code to it and the assistant can plan, update and report on your work in plain language: "move the launch tasks to In progress", "turn these meeting notes into tasks", "what's overdue for me this week?".
The assistant works as you. It sees exactly what you can see, can only change what you can change, and everything it does appears in WorkBeaver's activity history under your name.
About 55 tools cover almost everything people do in WorkBeaver:
[[Note title]], @task[…] and @meeting[…] become links, and #words become tags, just as in the editor.Some ways to use it:
ChatGPT and OAuth clients: add your WorkBeaver /api/mcp URL as a custom MCP connection and choose OAuth. Leave Client ID and Client Secret empty: registration is automatic (CIMD or dynamic registration). Sign in to WorkBeaver, complete two-factor verification if enabled, and approve the consent screen. Your assistant receives short-lived, resource-bound access tokens and can refresh its connection. Revoke it in Settings → AI assistants → Connected assistants.
Clients with custom headers:
whoami and list_projects and answers.https://your-workbeaver.example/api/mcp
Use the address you open WorkBeaver at, followed by /api/mcp. Settings → AI assistants and the top of the manual page show yours.
POST with a JSON-RPC body. The server is stateless and answers in plain JSON, so GET (an event stream) and DELETE (ending a session) return 405, which clients handle on their own.Authorization: Bearer wb_…. Browser cookies alone never authorize MCP calls.http://localhost:3000/api/mcp while npm run dev is running.A token is a personal key that lets an assistant act as you through the MCP server. Tokens start with wb_ and are 46 characters long.
Creating. Settings → AI assistants → name, expiry, Create token. Choose an expiry of 30, 90 (the default) or 365 days, or Never for an assistant that runs all the time. You can hold up to 20 tokens.
Seeing them. The list under the form shows each token's name, its first few characters, when it was created, when it was last used (updated at most once a minute) and when it expires or expired.
Revoking. Select Revoke next to a token. It stops working on the very next request. Revoke a token as soon as a laptop is lost, an assistant is no longer needed, or a token may have been shared.
Good practice
What a token can't do
/api/mcp: it can't open pages, call the app's forms, or reach any other address.Replace https://your-workbeaver.example with your address and wb_… with your token in the examples below.
In the custom MCP connection settings, set the server URL to https://your-workbeaver.example/api/mcp, select OAuth, and connect. WorkBeaver publishes discovery metadata, supports Client ID Metadata Documents (CIMD), and offers dynamic registration for clients that require it. No Google Client ID or personal token belongs in the OAuth Client ID field. The consent screen shows the assistant, account, permissions and destination before you approve it.
Add the same URL as an HTTP MCP server using OAuth, then sign in through the browser. Personal tokens also work in clients that let you configure the Authorization header. Never commit tokens to a repository.
claude mcp add --transport http workbeaver https://your-workbeaver.example/api/mcp --header "Authorization: Bearer wb_…"
Add --scope user to use WorkBeaver from every project on your computer instead of only the current folder. Check the connection with claude mcp list, or run /mcp inside a Claude Code session.
Claude Desktop starts local servers from its config file, so it connects through mcp-remote, which forwards to WorkBeaver. You need Node.js installed for npx.
Open Settings → Developer → Edit Config (or the file directly: %APPDATA%\Claude\claude_desktop_config.json on Windows, ~/Library/Application Support/Claude/claude_desktop_config.json on macOS) and add:
{
"mcpServers": {
"workbeaver": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://your-workbeaver.example/api/mcp", "--header", "Authorization:${WORKBEAVER_AUTH}"],
"env": { "WORKBEAVER_AUTH": "Bearer wb_…" }
}
}
}
Restart Claude Desktop. Keep the header written as Authorization:${WORKBEAVER_AUTH} with no space: Claude Desktop on Windows doesn't escape spaces inside args, so the space lives in the environment variable instead.
Add WorkBeaver to ~/.cursor/mcp.json (every project) or .cursor/mcp.json (one project; keep it out of git if it holds a token):
{
"mcpServers": {
"workbeaver": {
"url": "https://your-workbeaver.example/api/mcp",
"headers": { "Authorization": "Bearer wb_…" }
}
}
}
Add this to .vscode/mcp.json, or to your user mcp.json with MCP: Open User Configuration. VS Code asks for the token the first time and stores it for you, so it never sits in the file:
{
"inputs": [
{ "type": "promptString", "id": "workbeaver-token", "description": "WorkBeaver access token (wb_…)", "password": true }
],
"servers": {
"workbeaver": {
"type": "http",
"url": "https://your-workbeaver.example/api/mcp",
"headers": { "Authorization": "Bearer ${input:workbeaver-token}" }
}
}
}
Any MCP client that speaks Streamable HTTP and can send a custom header works with the same URL and header. To call a tool by hand:
curl -X POST https://your-workbeaver.example/api/mcp \
-H "Authorization: Bearer wb_…" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"whoami","arguments":{}}}'
Use "method":"tools/list" to list the tools. The Accept header must name both types, as the MCP specification requires. No initialize handshake is needed first, though clients may send one.
Every call runs with your account and your role, through the same checks as the app. If you couldn't do something by clicking, the assistant can't either, and it gets the same explanation you would see ("Only owners and admins manage templates."). Comments, tasks and notes it creates are authored by you, and activity reads "Olive created task …", never "an assistant".
If you belong to several teams, whoami lists them with their ids and your role in each. Team-wide tools (lists, search, reports, creating projects, managing members and workflows) take an optional teamId; without it they use your first team. Tools that act on a specific project, task, note or meeting work out the team from that item.
Items are addressed by id. Assistants get ids from list_…, get_…, search and whoami. Statuses can be given by name, case-insensitively ("in progress"), as well as by id. Results include a url back into WorkBeaver where it helps, so an assistant can hand you a link. Those links use the app address set in BETTER_AUTH_URL.
yyyy-mm-dd. Due dates are whole days.HH:mm, always with an IANA time zone such as Asia/Kolkata, Europe/London or America/New_York. Meetings keep the zone they were booked in. Results show times in UTC (startsAt) along with a readable when in the meeting's own zone.Long lists come a page at a time with hasMore: projects 10 per page, tasks 25, discussions 25. Pass offset (10, 20, …) for the next page. Notes return up to 100, meetings and calendar events up to 200 in the chosen range, activity 30 by default (up to 100), and search 20 of each kind.
Results are JSON. A refused or impossible request comes back as a tool error with a sentence the assistant can act on, for example "This project has no status “Shipped”. Choose one of: Backlog, To Do, Doing, Done." update_task saves changes one at a time, as the task view does. If one is refused, the error says which changes were already saved.
Each tool is marked as reading, changing, deleting, or reaching outside WorkBeaver (Google Calendar invitations, Meet links, invitation emails). Clients show these marks and can use them to decide when to ask you first. Most clients, Claude included, ask before running a tool until you allow it.
| What | Owner | Admin | Member |
|---|---|---|---|
| See projects | All in the team | All in the team | Only projects they belong to |
| Create projects | ✓ | ✓ | ✓ |
| Tasks, comments, subtasks, notes, discussions, whiteboards, meetings in projects they can see | ✓ | ✓ | ✓ |
| Edit project details, add or remove project members | ✓ | ✓ | – |
| Create and update workflows, rename statuses | ✓ | ✓ | – |
| Invite members | ✓ | ✓ (members only) | – |
| Invite admins, change roles | ✓ | – | – |
| Remove someone from the team (never the owner) | ✓ | ✓ | – |
| Reschedule, cancel or re-sync a meeting | The meeting's organizer | The meeting's organizer | The meeting's organizer |
| Team Reports | Whole team | Whole team | Their own projects |
| Personal calendar events | Their own | Their own | Their own |
Morning check-in. "What's due for me this week, and what changed in my projects since yesterday?" uses list_tasks (scope mine, status open, sorted by due) and get_activity.
Meeting notes to tasks. Paste the notes and ask for them to be saved and turned into tasks. The assistant uses create_note in the project, create_task for each action item with an owner and due date, and link_items to link each task to the note.
Sprint planning. "Move the High priority tasks in Backlog to To Do and break each into subtasks." The assistant uses list_tasks and get_task, then update_task with the status To Do and add_subtask.
Weekly update. "Write a weekly update for the team from the last 7 days." The assistant runs get_team_report with range 7d, which returns KPIs, highlights, workload and per-project progress, then writes the summary. It can save the summary with create_note or post it with create_discussion.
Scheduling. "Set up a launch review next Tuesday 15:00 London time with the Launch team and a Meet link." The assistant uses get_project for the members, then create_meeting. If Google rejects it, the meeting is still saved and googleSync shows FAILED. sync_meeting retries it.
/api/mcp, and the endpoint ignores browser cookies. A web page you visit therefore can't use your signed-in session to drive WorkBeaver through it.mcp:tools grants the existing MCP tools with the signed-in user's permissions; it does not expose the Vault or account security controls. OIDC openid, profile and email scopes describe identity access. offline_access allows refresh tokens.| What you see | Why | What to do |
|---|---|---|
| "Couldn't register with the sign-in service" | Discovery/registration is unavailable, the database migration is missing, or the edge firewall blocks an OAuth route | Deploy the OAuth release and migration, verify BETTER_AUTH_URL, and allow public requests to discovery, registration, authorization, token and JWKS endpoints. |
| OAuth connection no longer works | The browser session expired, access was revoked, or the client was disabled | Connect again and approve a new sign-in request. |
401, "Send a WorkBeaver access token…" | The header is missing or mistyped, or the token is unknown, expired or revoked | Check the header reads exactly Authorization: Bearer wb_…. Create a new token if it expired. |
406, "Not Acceptable" | A hand-written request is missing the Accept header | Send Accept: application/json, text/event-stream. |
405 on GET | The server is stateless and has no event stream | Nothing: clients carry on over POST. |
| The tools don't show up | The client didn't reload its config | Restart the client. In Claude Code run claude mcp list and /mcp. |
| "You are not a member of that team." | Wrong teamId | Ask the assistant to call whoami and use one of the listed team ids. |
| "You do not have permission for this project." | You're a member who isn't in that project | Ask an owner or admin to add you to the project. |
| "Only owners and admins…" or "Only the owner…" | Your role doesn't allow it | See Permissions at a glance. |
| "Choose a project member to assign this task to." | Tasks are assigned to you by default, and you aren't in that project | Pass assigneeId with a project member's id from get_project. |
Google Calendar errors, or googleSync: "FAILED" | Google isn't connected, or it rejected the change | Connect Google Calendar in Settings, then run sync_meeting. |
| Links point to the wrong address | BETTER_AUTH_URL is set to another address | Set BETTER_AUTH_URL to the address people open WorkBeaver at. |
All 58 tools, listed from the server exactly as assistants see them. Team-wide tools also take an optional teamId.
Who you are, your teams, and finding things.
whoamiWho am I
Your WorkBeaver account and the teams you belong to, with your role in each. Call this first to learn your user id and team ids.
No parameters.
searchSearch
Finds projects, tasks, notes and discussions by text across the projects you can see. Vault credentials are never searched.
| Parameter | Type | Description |
|---|---|---|
qrequired | string | |
teamId | string | Team to work in (see whoami). Defaults to your first team. |
Kanban tasks across your projects.
list_tasksList tasks
Tasks across the projects you can see, 25 per page. Filter to your own (scope: mine), one project, open or done; sort by due date to see what's next.
| Parameter | Type | Description |
|---|---|---|
q | string | Matches the title or description. |
scope | all | mine | created | mine = assigned to you; created = created by you. |
projectId | string | The project's id. |
status | open | done | |
sort | newest | due | priority | updated | |
offset | integer | How many results to skip, for the next page. |
teamId | string | Team to work in (see whoami). Defaults to your first team. |
get_taskGet a task
Everything about one task: description, status, assignee, due date, custom fields, subtasks, comments, files, linked items and its change history.
| Parameter | Type | Description |
|---|---|---|
taskIdrequired | string | The task's id. |
create_taskCreate a task
Adds a task to a project. It is assigned to you unless you name a project member, and starts in the board's To Do status unless you name another. Goes on the project's main board unless you name another board (see get_project).
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
boardId | string | A board id from get_project. Defaults to the main board. |
titlerequired | string | |
description | string | |
assigneeId | string | The person's id. Must be a project member. Defaults to you. |
dueDate | date (yyyy-mm-dd) | |
priority | Low | Medium | High | Defaults to Medium. |
status | string | A status name or id from get_project. |
fields | object | Values for the project's extra task fields, by key (see get_project). |
update_taskUpdate a task
Changes any of a task's title, description, status, priority, assignee, due date or custom fields. Only what you pass changes. Moving it to the last status completes it.
| Parameter | Type | Description |
|---|---|---|
taskIdrequired | string | The task's id. |
title | string | |
description | string | |
status | string | A status name or id from get_task or get_project. |
priority | Low | Medium | High | Urgent | |
assigneeId | string | The person's id. Must be a project member. |
dueDate | date (yyyy-mm-dd) | null | yyyy-mm-dd, or null to remove the due date. |
fields | object | Custom field values by key; an empty string clears one. |
comment_on_taskComment on a task
Adds a comment to a task, as you.
| Parameter | Type | Description |
|---|---|---|
taskIdrequired | string | The task's id. |
bodyrequired | string |
add_subtaskAdd a subtask
Adds a checklist item to a task (up to 100 per task).
| Parameter | Type | Description |
|---|---|---|
taskIdrequired | string | The task's id. |
titlerequired | string |
set_subtask_doneTick or untick a subtask
Marks a subtask done, or reopens it.
| Parameter | Type | Description |
|---|---|---|
subtaskIdrequired | string | The subtask's id. |
donerequired | boolean |
remove_subtaskRemove a subtask
Deletes a subtask from its task.
| Parameter | Type | Description |
|---|---|---|
subtaskIdrequired | string | The subtask's id. |
remove_task_fileRemove a file from a task
Deletes a photo, video, audio clip or file attached to a task (ids from get_task).
| Parameter | Type | Description |
|---|---|---|
fileIdrequired | string | The file's id. |
link_itemsLink two work items
Links a task, note, meeting or whiteboard to another one in the same project, so each shows the other.
| Parameter | Type | Description |
|---|---|---|
sourceTyperequired | task | note | meeting | whiteboard | |
sourceIdrequired | string | The first item's id. |
targetTyperequired | task | note | meeting | whiteboard | |
targetIdrequired | string | The second item's id. |
Projects, their statuses and members.
list_projectsList projects
Projects you can see in the team, 10 per page, with progress, members, due date and each stage's task count.
| Parameter | Type | Description |
|---|---|---|
q | string | Matches the name or description. |
sort | updated | newest | oldest | name | |
mine | boolean | Only projects you created. |
offset | integer | How many results to skip, for the next page. |
teamId | string | Team to work in (see whoami). Defaults to your first team. |
get_projectGet a project
One project's details: its statuses (workflow columns, the last one means finished) with task counts, members, and the extra task fields its template adds.
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
list_project_templatesList project templates and workflows
Templates (Scrum, bug tracking, content calendar…) and saved workflows a new project can start from.
| Parameter | Type | Description |
|---|---|---|
teamId | string | Team to work in (see whoami). Defaults to your first team. |
create_projectCreate a project
Creates a project with you as its first member. Its stages come from `stages`, else the template's or workflow's, else To Do → In Progress → Done.
| Parameter | Type | Description |
|---|---|---|
namerequired | string | |
description | string | |
startDate | date (yyyy-mm-dd) | |
endDate | date (yyyy-mm-dd) | |
templateId | string | A template id from list_project_templates. |
workflowId | string | A saved workflow id from list_project_templates. |
stages | list of string | Stage names in order; the last one means finished. |
teamId | string | Team to work in (see whoami). Defaults to your first team. |
update_projectUpdate a project
Changes a project's name, description, dates or cover. Only what you pass changes; pass null to clear a date. Owners, admins and project managers only.
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
name | string | |
description | string | |
startDate | date (yyyy-mm-dd) | null | |
endDate | date (yyyy-mm-dd) | null | |
cover | sunrise | coral | berry | grape | ocean | lagoon | aurora | midnight |
add_project_memberAdd someone to a project
Adds a team member to a project so they can see it and be assigned its tasks.
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
userIdrequired | string | The person's id. They must already be in the team (see list_team_members). |
remove_project_memberRemove someone from a project
Removes a person from a project, along with their access to its vaults.
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
userIdrequired | string | The person's id. |
Markdown notes with links, tags and revisions.
list_notesList notes
A project's knowledge notes, most recently edited first (up to 100). Filter by folder, #tag or text.
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
folder | string | |
tag | string | Without the #. |
q | string | Matches the title or body. |
get_noteRead a note
A note's Markdown body, the items it links to and that link to it, and its saved revisions (restore one with restore_note_revision).
| Parameter | Type | Description |
|---|---|---|
noteIdrequired | string | The note's id. |
create_noteCreate a note
Creates a Markdown note in a project's knowledge base. [[Note title]], @task[Task title] and @meeting[Meeting title] in the body become links; #words become tags.
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
title | string | Defaults to “Untitled”. |
folder | string | Defaults to General. |
body | string | Markdown. |
update_noteEdit a note
Changes a note's title, folder or body. Pass `body` to replace the text, or `append` to add to the end. The previous version is kept as a revision.
| Parameter | Type | Description |
|---|---|---|
noteIdrequired | string | The note's id. |
title | string | |
folder | string | |
body | string | Markdown that replaces the whole body. |
append | string | Markdown added after the current body. |
delete_noteDelete a note
Permanently deletes a note, its revisions and its links.
| Parameter | Type | Description |
|---|---|---|
noteIdrequired | string | The note's id. |
restore_note_revisionRestore a note revision
Puts a note back to a saved revision (ids from get_note). The current text is kept as a revision first.
| Parameter | Type | Description |
|---|---|---|
revisionIdrequired | string | The revision's id. |
Project threads, replies and reactions.
list_discussionsList discussions
A project's discussion threads, most recently active first, 25 per page.
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
offset | integer | How many results to skip, for the next page. |
get_discussionRead a discussion
A discussion thread with all its replies and emoji reactions.
| Parameter | Type | Description |
|---|---|---|
discussionIdrequired | string | The discussion's id. |
create_discussionStart a discussion
Starts a discussion thread in a project, as you.
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
titlerequired | string | |
bodyrequired | string |
reply_to_discussionReply to a discussion
Posts a reply in a discussion thread, as you.
| Parameter | Type | Description |
|---|---|---|
discussionIdrequired | string | The discussion's id. |
bodyrequired | string |
toggle_reactionReact to a post
Adds your emoji reaction to a discussion or reply, or takes it back if you already reacted with it.
| Parameter | Type | Description |
|---|---|---|
targetTyperequired | discussion | reply | |
targetIdrequired | string | The discussion or reply's id. |
emojirequired | 👍 | ❤️ | 🎉 | 😂 | 🤔 | 👀 |
Excalidraw boards.
list_whiteboardsList whiteboards
A project's Excalidraw whiteboards.
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
get_whiteboardRead a whiteboard
What is on a whiteboard: how many shapes of each kind, and all of its text.
| Parameter | Type | Description |
|---|---|---|
whiteboardIdrequired | string | The whiteboard's id. |
create_whiteboardCreate a whiteboard
Creates an empty whiteboard in a project.
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
title | string |
rename_whiteboardRename a whiteboard
Changes a whiteboard's title.
| Parameter | Type | Description |
|---|---|---|
whiteboardIdrequired | string | The whiteboard's id. |
titlerequired | string |
Project meetings, with Google Calendar and Meet when connected.
list_meetingsList meetings
Project meetings in a date range (default: yesterday through the next month), in one project or all you can see, with attendees and Meet links.
| Parameter | Type | Description |
|---|---|---|
projectId | string | The project's id. |
from | date (yyyy-mm-dd) | |
to | date (yyyy-mm-dd) | |
includeCancelled | boolean | |
teamId | string | Team to work in (see whoami). Defaults to your first team. |
create_meetingSchedule a meeting
Schedules a project meeting. When you have connected Google Calendar in WorkBeaver it also goes on your Google Calendar, invites everyone and (by default) adds a Meet link. The meeting is saved even if Google fails; see googleSync.
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
titlerequired | string | |
daterequired | date (yyyy-mm-dd) | |
startTimerequired | time (HH:mm) | |
endTimerequired | time (HH:mm) | |
timeZonerequired | string | |
description | string | |
attendeeIds | list of string | Project members to invite. |
guests | list of email | Email addresses of people outside WorkBeaver. |
addMeet | boolean | Add a Google Meet link. Defaults to yes when Google Calendar is connected. |
reschedule_meetingReschedule a meeting
Moves a meeting to a new date and time and updates the Google Calendar invite. Organizer only.
| Parameter | Type | Description |
|---|---|---|
meetingIdrequired | string | The meeting's id. |
daterequired | date (yyyy-mm-dd) | |
startTimerequired | time (HH:mm) | |
endTimerequired | time (HH:mm) | |
timeZone | string | Defaults to the meeting's own time zone. |
cancel_meetingCancel a meeting
Cancels a meeting and its Google Calendar event, which notifies the attendees. Organizer only.
| Parameter | Type | Description |
|---|---|---|
meetingIdrequired | string | The meeting's id. |
sync_meetingRetry a meeting's Google sync
Sends a meeting to Google Calendar again after a failure, or adds a Meet link to it. Organizer only.
| Parameter | Type | Description |
|---|---|---|
meetingIdrequired | string | The meeting's id. |
addMeet | boolean | Also add a Google Meet link. |
Your own connected Google Calendar.
list_calendar_eventsList my calendar events
Events on your connected Google Calendar in a date range (default: yesterday through the next month), as last synced. Run sync_google_calendar first for the latest.
| Parameter | Type | Description |
|---|---|---|
from | date (yyyy-mm-dd) | |
to | date (yyyy-mm-dd) |
create_calendar_eventAdd a calendar event
Creates an event on your Google Calendar (connect it in WorkBeaver → Settings first) and invites any attendees.
| Parameter | Type | Description |
|---|---|---|
titlerequired | string | |
daterequired | date (yyyy-mm-dd) | |
startTimerequired | time (HH:mm) | |
endTimerequired | time (HH:mm) | |
timeZonerequired | string | |
description | string | |
location | string | |
attendees | list of email | Email addresses to invite. |
addMeet | boolean | Add a Google Meet link. |
update_calendar_eventChange a calendar event
Changes an event on your Google Calendar. Only what you pass changes.
| Parameter | Type | Description |
|---|---|---|
eventIdrequired | string | The event's id. |
title | string | |
date | date (yyyy-mm-dd) | |
startTime | time (HH:mm) | |
endTime | time (HH:mm) | |
timeZone | string | |
description | string | |
location | string | |
attendees | list of email | Email addresses to invite. |
addMeet | boolean | Add a Google Meet link. |
delete_calendar_eventDelete a calendar event
Deletes an event from your Google Calendar.
| Parameter | Type | Description |
|---|---|---|
eventIdrequired | string | The event's id. |
sync_google_calendarSync my Google Calendar
Pulls the latest events from your connected Google Calendar into WorkBeaver.
No parameters.
Members, roles, invitations, and reusable workflows.
list_team_membersList team members
Everyone in the team with their id, email and role (OWNER, ADMIN or MEMBER).
| Parameter | Type | Description |
|---|---|---|
teamId | string | Team to work in (see whoami). Defaults to your first team. |
invite_memberInvite someone to the team
Creates an invitation link (valid 7 days). With an email, WorkBeaver also emails it. Owners and admins only; only the owner can invite admins.
| Parameter | Type | Description |
|---|---|---|
email | Who to invite. Leave out for a link anyone can use. | |
role | MEMBER | ADMIN | Defaults to MEMBER. |
projectId | string | The project's id. Also adds them to this project when they join. |
teamId | string | Team to work in (see whoami). Defaults to your first team. |
update_member_roleChange a member's role
Makes a team member an ADMIN or a MEMBER. Owner only.
| Parameter | Type | Description |
|---|---|---|
userIdrequired | string | The person's id. |
rolerequired | ADMIN | MEMBER | |
teamId | string | Team to work in (see whoami). Defaults to your first team. |
remove_team_memberRemove someone from the team
Removes a person from the team, its projects and their vault access. Owners and admins only; the owner can't be removed.
| Parameter | Type | Description |
|---|---|---|
userIdrequired | string | The person's id. |
teamId | string | Team to work in (see whoami). Defaults to your first team. |
create_teamCreate a team
Creates a new team with you as its owner.
| Parameter | Type | Description |
|---|---|---|
namerequired | string |
create_workflowCreate a workflow
Saves a reusable list of stages new projects can start from. Owners and admins only.
| Parameter | Type | Description |
|---|---|---|
namerequired | string | |
stagesrequired | list of string | |
teamId | string | Team to work in (see whoami). Defaults to your first team. |
update_workflowUpdate a workflow
Publishes a new version of a saved workflow's stages, or saves them as a draft. Projects already using it keep their own stages. Owners and admins only.
| Parameter | Type | Description |
|---|---|---|
workflowIdrequired | string | The workflow's id. |
stagesrequired | list of string | |
draft | boolean | Save as a draft instead of publishing. |
teamId | string | Team to work in (see whoami). Defaults to your first team. |
duplicate_workflowDuplicate a workflow
Copies a saved or built-in workflow into the team as “<name> copy”. Owners and admins only.
| Parameter | Type | Description |
|---|---|---|
workflowIdrequired | string | The workflow's id. |
teamId | string | Team to work in (see whoami). Defaults to your first team. |
rename_stageRename a status
Renames a status (workflow column) in every project you can see that has it, or in one project. Owners and admins only.
| Parameter | Type | Description |
|---|---|---|
fromrequired | string | The current status name. |
torequired | string | The new name. |
projectId | string | The project's id. Limit the rename to this project. |
teamId | string | Team to work in (see whoami). Defaults to your first team. |
What changed, and the Team Reports numbers.
get_activityRecent activity
What changed recently, newest first: across the team's projects you can see, or in one project.
| Parameter | Type | Description |
|---|---|---|
projectId | string | The project's id. |
limit | integer | Defaults to 30. |
teamId | string | Team to work in (see whoami). Defaults to your first team. |
get_team_reportTeam report
The Team → Reports numbers: KPIs with change against the previous period, highlights, workload, per-person and per-project tables, status and priority breakdowns, lead time and overdue age. Members only see their own projects.
| Parameter | Type | Description |
|---|---|---|
range | 7d | 30d | 90d | quarter | custom | 7d, 30d (default), 90d or quarter. Ignored when from and to are given. |
from | date (yyyy-mm-dd) | |
to | date (yyyy-mm-dd) | |
projectIds | list of string | |
memberIds | list of string | People to include; "unassigned" means tasks with no assignee. |
priorities | list of Urgent | High | Medium | Low | |
teamId | string | Team to work in (see whoami). Defaults to your first team. |
get_project_costsGet a project's costs
A project's budget against what is spent (expenses and finished tasks) and planned (open tasks' estimates at each assignee's hourly rate), with the remaining budget and where the money goes. Team owners and admins only, on projects with cost tracking on.
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
set_project_budgetSet a project's budget
Turns cost tracking on or off for a project and sets its budget and currency. Owners and admins only.
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
enabled | boolean | Whether the project tracks costs. |
budgetrequired | number | The total budget. |
currency | USD | EUR | GBP | INR | CAD | AUD | JPY | CHF | SGD | AED |
add_expenseRecord a project expense
Records money spent on a project (a tool, travel, a vendor). The project must have cost tracking on. Owners and admins only.
| Parameter | Type | Description |
|---|---|---|
projectIdrequired | string | The project's id. |
titlerequired | string | |
amountrequired | number | |
category | Software | Travel | Vendor | Equipment | Marketing | Other | |
vendor | string | |
day | date (yyyy-mm-dd) | The day it was spent; defaults to today. |
taskId | string | The task's id. A task in this project it was for. |
Where things live
src/app/api/mcp/route.ts is the endpoint: it checks the token, then runs the request as its owner.src/lib/mcp/server.ts builds the server and holds the instructions every assistant receives.src/lib/mcp/work-tools.ts and src/lib/mcp/content-tools.ts define the tools, and src/lib/mcp/tool.ts holds the shared helpers (addTool, unwrap, form, argument shapes).src/lib/mcp/groups.ts sorts the tools into the sections of the tool reference.src/lib/api-tokens.ts handles token creation, lookup and the request-scoped caller. src/app/actions/api-tokens.ts and src/components/api-tokens.tsx are the Settings side.ApiToken model lives in prisma/schema.prisma.src/lib/auth.ts configures Better Auth's MCP, JWT and CIMD plugins. src/app/.well-known/[...path]/route.ts forwards public discovery to the auth handler; /api/auth/oauth2/* handles registration, authorization, consent, token, introspection and revocation.src/app/oauth/signin/page.tsx and src/app/oauth/consent/page.tsx connect the existing sign-in/2FA flow to verified consent requests. src/lib/mcp/oauth-access.ts validates OAuth callers and revokes connections.20261010120000_mcp_oauth adds OAuth resource/client/consent/token/assertion records and encrypted signing keys. It must run before serving this release.How a request is handled. The route resolves the token to its owner and runs the request inside asApiCaller. currentUser() in src/lib/session.ts returns that caller first, so every existing helper (requireProject, requireTask, activeTeam) and server action works unchanged. A tool's optional teamId replaces the team cookie the browser uses.
Adding a tool
addTool(server, "archive_note", {
title: "Archive a note", kind: "write", // read | write | delete | external | external-delete
description: "What it does, in one or two sentences an assistant can act on.",
input: { noteId: id("note") },
run: async ({ noteId }) => { /* reuse a server action; throw new Error("A sentence for people") to refuse */ },
});
attempt() results with unwrap(), and build FormData with form().team: true if the tool uses activeTeam().src/lib/mcp/groups.ts. The end-to-end test fails if a tool is missing from the reference.Testing
npm test runs tests/api-tokens.test.ts, which covers token format, lookup, expiry, revocation and the caller scope.npm run dev running, npx playwright test tests/mcp.spec.ts drives the endpoint through the official MCP client. It covers token checks, a full project run as an owner, a member's permission boundaries, and the tool reference's coverage.tests/mcp-oauth.spec.ts drives discovery, registration, signed consent, login/2FA, PKCE, refresh rotation, revocation, resource/scope validation, user permissions and the desktop/mobile browser flow. Use a separate local database and set BETTER_AUTH_URL=http://localhost:3000 for the local server and test process.@modelcontextprotocol/sdk is pinned. src/lib/mcp/tool.ts imports two Next.js internals (isRedirectError, getURLFromRedirectError), so re-check them when upgrading next.