* chore: remove core and WAB feature flags shipping in v3
* docs: drop stale feature flag mentions from invitation link comments
* docs: add missing changelogs for released core features
* docs: mark identities ADR as accepted
* chore: remove the identities feature flag
* docs: add changelog for workspace identities
* test: remove obsolete identity feature flag test
* docs: remove stale identities feature flag references
---------
Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
* chore: add changelog entry for the MCP shared tools
The tools PRs left it for when the milestone was done.
* feat(mcp): always turn on OAuth sign-in
BASEROW_MCP_OAUTH_ENABLED is removed before it ships, so OAuth sign-in is
on everywhere. The settings page opens the endpoint tab when the OAuth
connections fail to load.
* feat: show application integrations in one grouped table
* feat: show application integrations in one grouped table
* test: open the integration menu to promote in the automation settings spec
* refactor: share one integration row between both integrations tables
* feat: list every invitation link of a workspace in the workspace settings modal
* fix: show the table of view invite links, keep the list steady while searching and wrap its header
* Add ADR-013 for workspace level integrations
* Add implementation
* Improve context section and remove technical points
* Move bulk replacement point to v2
* Remove workspace-level ownership on import since manual promotion should handle this.
* Add a glossary section
* Do Lazy creation + Celery migration
* Remove demotion
* Tighten the Options considered section
* Add Decision describing where the integrations are managed
* Update implementation plan after changes to ADR
* Sync plan and adr
* Rename adr and implementation
* Add the shared application that owns workspace integrations
* Create the shared application of every workspace
* Let only workspace admins manage workspace integrations
* Let applications use the integrations of their workspace.
* Trash workspace integrations in their workspace.
* Copy workspace integrations into exports and keep them in duplicates.
* Workspace admins can share integrations with every application in the workspace.
* Load the shared application of each workspace in the frontend and keep it out of application lists.
* Manage workspace integrations from an Integrations page in workspace settings.
* Offer workspace integrations in the integration dropdowns of every application.
* Move promoted integrations to the workspace list in other open tabs.
* Let admins make an app's integration available to the whole workspace from its integration settings.
* Preselect a workspace integration for new nodes and data sources when the app has none of its own.
* fix tests
* Delete implementation file
* More fixes after rebase
* Fix tests
* Let builders of an application see and use the workspace integrations from it.
* Show the workspace integrations, read-only, in the integration settings of applications.
* Keep a dashboard's integration out of promotion to the workspace.
* Leave the shared applications out of the admin dashboard's application count.
* Create the shared application of the workspaces made by the fill commands.
* Say in the promotion modal that an integration nobody authorized will run as the promoting admin.
* Say in the promotion modal that undoing it won't make the integration run as the previous person again.
* Ignore integration ids in sample data when publishing copies the workspace integrations an app uses.
* Let only undoing a promotion move an integration out of the workspace.
* Let the shared application backfill stop itself after 5 minutes and skip workspaces another transaction has locked.
* Say in the workspace integrations settings that published applications and workflows keep their own copy until they're published again.
* Leave the shared application out of the assistant evals' application counts.
* Refresh the workspace integrations when the Builder's data, events, users and integrations panels open.
* Say that anything new using a promoted integration blocks undoing the promotion, even from its own application.
* Warn when a database button sends through a workspace integration with no host or token.
* Refuse roles and invitations on the shared application.
* Fix tests
* Show an application only the workspace integrations of types it can use.
* Say in the promotion modal what builders of other applications can do as the integration.
* Leave the shared application type out of the API docs for creating and updating applications.
* Check who receives a workspace integration event in one permission call.
* Say which workspaces have a shared application and who creates it.
* Let a redone promotion record what uses the integration again.
* Update docstrings
* Stop template visitors from listing the integrations of the template's workspace.
* Let database buttons find their own copy of a workspace integration after an import.
* Say what holds the workspace row lock while a shared application is created.
* Fix tests
* Stop the workspace integration form component from being made reactive.
* Make test runs use a new copy of the workflow after an integration it uses changes.
* Hide the Members settings tab from members who can't list the workspace members.
* Add changelog
* Fix migration conflict
* Fix migration conflict
* Fix test
* Update comments and ADR number
* Link to the workspace integrations from the sidebar's Settings menu.
* fix: refresh agent action errors when workspace integrations change
* fix: move workspace integrations into workspace settings
* fix: use share icon for workspace integration promotion
* refactor: use explicit shared application relations
* feat: centralize default integration selection
* refactor: share integration change notifications
* refactor: prepare integration mappings before import
* refactor: collect integration references during export
* refactor: prepare integration ownership changes without a new hook
* test: restore registered service model after mocking
* test: cover shared integration defaults in Builder
* test: include Slack in Agent workspace integration choices
* Fix migrations
* Stop template visitors from listing the workspace integrations through an application of the template.
* Only offer integrations of the user source's integration type when updating a user source.
* Say the workspace integration copy means published Application Builder apps and automation workflows.
* Use the same spacing under both integration settings sections and enlarge their headings.
* Keep the shared application out of automatic snapshot schedules.
* Fix test after rebase
---------
Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
* feat(agent): create agents with a two-step setup wizard
The create modal asks for a name and what the agent should do, then reviews
instructions, how it starts, the identity it acts as, permissions and extras.
The choices are applied through the endpoints Configuration uses; a choice
that can't be applied is reported and the agent still opens.
The Run as dropdown can also create an identity. Application types supply
their create modal through getCreateModalComponent.
* feat(agent): add tools, model and identity choices to the create wizard
The wizard gains a third screen for the provider, model, reasoning effort and
web search. Review can create an identity and pick tools one by one. Each
suggestion now fills the whole setup: how the agent starts, its schedule,
permissions, web search and actions.
A new endpoint lists the tools an agent created in a workspace can be given,
so they can be picked before the agent exists. The provider, model and effort
fields are one component shared by Configuration and the wizard.
* fix(agent): choose the wizard identity role from workspace tools
* fix(agent): address create wizard review
Skip locked tools in the permission presets, create the identity before
the agent so a rejected name stops the wizard, number suggestion names,
select the prefilled name, report models that can't search the web, show
a failed tools request and fix the Read only icon.
* fix(agent): address second create wizard review
Give a new identity Builder when the agent may change data, reuse the
identity a failed create made, explain why web search stays off and pass
the workspace to the tool picker.
* fix(mcp): show the old endpoint's tools when signing in with its URL
Clients given the old /mcp/<key>/sse URL signed in for /mcp and offered every
tool, but kept connecting with the key's tools. Also brings back the ChatGPT tab.
* fix(mcp): keep an existing grant's tools when signing in with the old URL
Signing in with the old endpoint URL replaced the tools of a grant the app
already had in that workspace through /mcp.
* fix(mcp): complete the old endpoint URL sign-in at the token endpoint
Clients send the old URL as the resource of the token and refresh requests,
which were rejected because the grant is bound to /mcp. Also stop disabled or
missing tools from blocking or emptying the grant.
* test(mcp): give the mocked consent request a query
* feat: record and show the identity kind in history and pickers
- Snapshot the user type of the actor on row history, workflow history
and audit log entries, and return it from their APIs.
- Show the identity icon in row and workflow history, list identities in
their own section of the audit log actor filter and count them per role
in inherited access.
- Load every identity in the team and access pickers through the
paginated subjects endpoint, which now returns the workspace role.
- Give identities premium features from the workspace or instance
licence instead of a seat.
* feat: record identity management in the audit log
Creating, updating and deleting an identity go through registered
actions, so the audit log shows who did it, with the identity's name and
role before and after an update. The actions are not undoable.
* fix: export an identity by its name in created by and last modified by
* fix: record the values an identity update replaced from the locked row
* fix: check the owner of an imported personal view without a query
* fix: show an identity with the avatar and icon of its subject type
* fix: audit an identity update by what it changed
* feat: include the actor's user type in the audit log export and tool
* test: cover a row history actor of an unregistered type
* test: name the history migration test after what it checks
* feat: introduce User-backed workspace identities
Replaces workspace core.Agent subjects with identities stored as Django
Users, so permissions, execution and attribution use the same record.
- User.objects and WorkspaceUser.objects are human-only; permission and
identity code opts in through objects_and_identities. is_human and
is_identity classify a user at runtime.
- Login, tokens, seats, notification recipients, personal views and
last-admin checks stay human-only. Roles, teams and field grants work
for identities unchanged.
- Agent applications run as an identity, never as a person. Every shared
tool rechecks the identity's authority on each call, and MCP refuses a
tool that skips that boundary.
- Migrations add the profile metadata and index, remove the Agent model
and delete or clear legacy Agent data: trash entries, role assignments,
team memberships, integration authorizations and run-as bindings.
- Rename the management API, UI, events and feature flag to identity.
Squashed and rebased onto develop; the previous history is kept on
backup/6556-before-develop-rebase.
* refactor: remove generic subject options endpoint
* refactor: simplify identity selection and Agent run-as options
* feat: distinguish identity notification senders
* fix: restrict identity bindings to identity managers
* docs: record users and identities verification
* fix: restore snapshots as the person restoring
A restore checked the snapshot creator's permission and used the creator
to decide whether an Agent keeps its identity binding. It now checks the
person restoring, passed to the import as `restored_by`. `copied_by` stays
unset on restore, so credential checks keyed on it behave as on develop.
Restoring a snapshot whose creator was deleted works again. The copy rule
for identity bindings covers Agent run-as only; a copied Local Baserow
integration keeps its authorized subject.
* fix: leave settings pages the user may not open
A settings route without a permitted tab rendered an empty page, as the
Identities page did with its feature flag off. It now opens the first
page the user may see.
* fix: renumber the legacy Agent cleanup migrations
Develop added agent 0016 and integrations 0043, so the migrations that
clear legacy Agent run-as bindings and integration authorizations move to
agent 0017 and integrations 0044.
* test(agent): run the trigger self-event test as an identity
The test added on develop created a `core.Agent`, which this branch
removes. It now uses an identity user as the Agent's run-as subject.
* perf: load user types once per batched permission check
* refactor: state the stored subjects in each subject type
* fix: give every user a profile
* fix: keep identity attribution on rows copied in their workspace
* refactor: give people and identities their own subject type
UserSubjectType stays the type both are registered and stored under. It forwards what differs to HumanSubjectType and IdentitySubjectType, so get_specific_type is the only place in subject code that inspects the user type. The registry returns the specific type on request and get_by_model keeps returning the stored type, which never reads the profile.
An identity's membership is checked in one query instead of two.
* fix: keep the roles of identities when a database is duplicated
The role import read subjects through the model's default manager, which only returns people, so duplicating or restoring a database failed when an identity held a role on it. It now resolves the subject through the subject registry.
A subject that no longer exists is skipped instead of failing the whole duplicate or restore.
* refactor: look up a subject type from its content type in one place
* fix: reload a cached token whose profile is incomplete
A token cached by the previous release has a profile without the user type, which reads as not a person, so its requests were refused until the entry expired. The token cache now treats it as a miss, with the check the user cache already used.
* refactor: check the user type once where the check was repeated
The MCP endpoint loader, the personal view permission manager and the identity trash type each asked the same question several times. The rule that an identity is never selected by email moves from the team handler to the identity subject type.
* refactor: leave trashed workspaces out of the identity membership manager
WorkspaceUser.objects_and_identities was named after objects but also returned memberships of trashed workspaces, so callers filtered them by hand. It now follows the existing pair: it leaves trashed workspaces out, and objects_and_identities_and_trash includes them, as objects_and_trash does for people.
* test: state the behaviour of every user type
The table fails when a user type is added and says what has to be decided first. An unknown type is checked to be denied.
* refactor: refuse to say whether a stored user subject is interactive
The answer differs between a person and an identity, so reading it from the stored type would be wrong for one of them. It now raises and points to the specific type.
* refactor: lock the person in membership writes instead of checking the type
Leaving a workspace, removing a member and adding a user lock the user through the people manager, which refuses an identity or an unknown type in the same query. Nothing adds an identity through add_user_to_workspace, so its branch for identities goes. The last admin check compares the membership with the people who are admin, which needs no type check.
* test: leave no rows behind in the legacy authorization migration test
The test left an integration that pointed at a user that didn't exist and a workspace, in the database the migration tests share. Tests that ran after it then failed on the foreign key or on the workspace id. It now uses a real user and empties the two tables.
* docs: describe the subject types and compare the Subject table alternative
ADR 013 is shorter and states that people and identities each have a specific subject type under the stored auth.User type. It compares shared User storage with a Subject table that users and identities would both point to.
* chore: run the legacy run-as cleanup after the agent actions migration
Develop added agent migration 0017, so the cleanup becomes 0018 and depends on it.
* test: leave no rows behind in the legacy agent migration tests
Like the legacy authorization test, these left a workspace in the database the migration tests share, which a later test that creates workspaces with fixed ids collides with.
* fix: write and read the workspace role of an identity in one place
The role assignment API wrote the role of an identity through the membership update of people, which told every member of the workspace about it and stored Builder as MEMBER, while the identities API stored BUILDER and returned the stored value. Both now write through the identity handler, which stores the role like the role of a person, and the role is read with the resolver the workspace members use.
* fix: take no row lock in the membership writes of a person
Leaving a workspace locked the user before the membership while removing or updating a member locks the membership first, so the two could deadlock. The user type never changes and these operations refuse an identity, so the lock protected nothing: they now only check that the user is a person. Leaving no longer locks the admin memberships and removing a member no longer checks for the last admin, as before identities.
* fix: find an identity by its name only in the subject options
The search also matched the email and username, which for an identity hold an internal key, so searching a part of that key returned every identity.
* chore: run the identity migrations after the new ones on develop
Develop added core 0138, integrations 0044 and enterprise 0073, so the identity migrations become core 0139 and 0140, integrations 0045 and enterprise 0074 and depend on them.
* fix: keep the identity of a copied integration only for identity managers
A duplicated application or a restored snapshot kept the identity its Local Baserow integration acts as, without checking the person who made the copy. Restoring a snapshot could so bring back a binding an admin had removed. The copy now keeps the identity only when that person may bind identities, as the Agent application already did, and is otherwise authorized as that person.
* docs: follow the renumbered migrations and the copy rule in the test plan
The test plan named the identity migrations and their tests by their old numbers and still said a copied integration keeps its subject.
* test(agent): run the row trigger tests as an identity
The row trigger tests added on develop created a `core.Agent`, which this
branch removes. They now use an identity user as the Agent's run-as
subject, and the e2e fixture creates it through the identities endpoint.
* fix(mcp): let members with only a database role connect MCP apps
Members with No role or No access on the workspace but a role on a database or
table couldn't create or manage MCP connections, so admins had to give them
Viewer on the whole workspace.
* fix(mcp): drop the unused MCP endpoint scope type
No operation uses it since the endpoint checks moved to the workspace, which
fails the registered scope types test.
* fix(mcp): count only visible databases on the consent page
Members with a role on one database saw the count of every database in the workspace.
* fix(mcp): keep setup snippets and tabs inside the settings modal
Long commands ran past the code box and tab labels wrapped in a narrow modal.
* feat(mcp): link to the docs for per-app OAuth setup steps
Claude and ChatGPT change their connector UI often; the docs can follow without a release.
* feat(mcp): plugin-first setup and one-click installs on the MCP settings page
Point Claude Code users at the plugin, build Cursor and VS Code install links from the instance URL, and add Codex, Gemini CLI and add-mcp commands so self-hosted users get copy-ready setup.
* fix(mcp): handle non-Latin instance URLs in the editor install links
btoa() threw on a non-Latin hostname and blanked the Cursor tab, including the config fallback.
* fix: sign users out of existing sessions when an admin changes their password
* fix: keep admins signed in after changing their own password in the admin panel
* fix: send other tabs to the login page after a password change instead of crashing
* chore: add changelog entry for the password change tab crash fix
* fix: send users with two-factor auth to the login page after changing their own password
* feat: rename Agent to Identity in the interface
* refactor: rename identity locale keys from agent to identity
* fix: show identity instead of agent when restoring an identity in the audit log
* show each member's, team's and agent's roles on databases, tables and views
* Adding a loading state to the role assignment role selector. Also ensure that the parent row's highest role is correctly refreshed.
* fix: give CRUD row expansion its own column
* fix: stabilize management table columns with configurable layouts
---------
Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
* show who effectively has access in the share dialog
* optimise the effective access query
* add a loading spinner for the effective access too
* fix: navigate inherited access within the sharing modal
* fix: restore invitation popup and scrollable access lists
* fix: return accurate team counts in scope access lists
* refactor: centralize subject avatar rendering and styling
* fix: keep team counts in field permissions and restore template icons
---------
Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
* fix(backend): validate frontend base URL in emailed links
The hostname check used urlparse, which disagrees with browsers on URLs
containing backslashes, so links could point at another host.
* fix(backend): build emailed frontend links from settings
The client base_url only selects the embedded share URL now, so its host
and path never reach the link and the endpoints no longer return an error.
* fix: drop base_url from emailed links and use the embedded share URL
The client value no longer influences links, so the API stops accepting it.
Row edit and MCP OAuth links now also honour BASEROW_EMBEDDED_SHARE_URL.
* fix: keep MCP OAuth on the web frontend and share the embed URL helper
The consent page is part of the app and SSO only accepts the web frontend URL.
Notification and abuse report links dropped the embed URL path through urljoin.
* test: cover deceptive base_url and embed URL links on every email endpoint
The new attack tests fail on develop with the link pointing at evil.com.
* feat: align management pages with the refreshed table design
* feat: refresh agent dialogs using shared UI components
* test: cover refreshed management pages and agent dialogs
* fix: use the standard UI modal for agent management
* feat: expand member rows with available role details
* Revert "feat: expand member rows with available role details"
This reverts commit e0516c6ce43896508b918db10b028f1cdf88c29b.
* docs: show scoped member roles in CrudTable stories
* fix: align tab labels with badges
* fix: define management role icons in the role registry
* fix: reuse shared name abbreviations in management tables
* style: format management tables and tabs for CI
* test: preserve agent totals and tab badges after rebase
* test: add CrudTable Storybook states
* feat: refresh shared CrudTable design and empty states
* feat: add expandable CrudTable rows with scoped details
* fix: center CrudTable pagination and improve empty state actions
* feat: add helpful empty states for teams members and invites
* fix: isolate CrudTable cell bindings and distinguish empty pages
* test: update view admin assertions for CrudTable row groups
* docs: demonstrate scoped member roles in CrudTable stories
* docs: simplify expandable CrudTable stories
* docs: consolidate narrow CrudTable stories
* docs: remove CrudTable development guide
* feat: demonstrate role removal in CrudTable stories
* Implementing the new invite-to-scope design and functionality.
* Simplifying the invitation acceptance, we don't need the redirect.
* Fix the action type description
* Addressing my own review feedback, and making sure the workspace invitation form behaves like the scoped one.
* Further tweaks after testing edge cases manually
* Lint fix
* Taking a DRYer approach to validating the subject chips.
* Lint fix
* Addressing feedback
* fix: block invitation batches containing invalid emails
Malformed addresses could be silently cleared after a partial batch send.
Keep them visible and block submission until corrected or removed.
* fix: respect workspace invitation permission in scope sharing
Scoped Admins could attempt email invites denied by workspace permissions.
Gate new-email invitations while keeping existing subjects assignable.
* feat: unify workspace and scoped access lists
Workspace and scope lists duplicated markup and lacked consistent controls.
Share rows, add workspace edit/cancel actions, and cap lists at six rows.
* fix: reconcile invitation branch with develop
Develop enables agents and adds an Enterprise migration at the same number.
Align invitation subjects and renumber the branch migration after develop.
* refactor: resolve workspace user roles in the backend
The frontend duplicated the backend mapping from basic roles to RBAC roles.
Expose role_uid in user payloads and reuse it for inherited access counts.
* fix: validate invitation emails before submission
The permissive database validator let malformed invitation addresses reach the API.
Use the existing strict validator for email suggestions, chips, and batch submission.
* fix: align invitation input focus styling
The invite input used a gray border tied to whether suggestions were open.
Use the standard blue border with focus-within so Escape preserves the focus highlight.
* feat: limit email invitation batches
Large invitation batches can exhaust the sending allowance partway through.
Default to five new emails per batch, configurable, with a message before submission.
* feat: let roles declare the invitation default
RBAC invitations should default to Viewer without Enterprise-specific logic in core.
Let role types declare the default: Member for basic workspaces and Viewer for RBAC.
* refactor: keep invitation role semantics in their owning modules
Core invitation UI should not interpret Enterprise role IDs or depend on Database roles.
Move basic roles to core and let Enterprise supply invitation subtitles through role metadata.
---------
Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
* feat(assistant): add MCP metadata decorator for Kuma tools
* feat(mcp): offer Kuma's read tools over MCP from the same definition
Builder page lookups are now scoped to the chat workspace so a read can't cross workspaces.
* fix(mcp): keep endpoints without an allow-list on today's tools
A null allow-list now means the tools enabled on 2026-10-19, so new tools need an explicit grant. Cross-workspace tests assert the exact exception.
* fix(assistant): treat a workflow in another workspace as missing
A different error for a foreign workflow let a client probe workflow IDs across workspaces.
* feat(mcp): return tool errors as MCP error results
Expected errors reach the client as readable error results without an ERROR log, only unexpected ones are logged.
* chore: add changelog entry for Kuma read tools over MCP
* fix(mcp): keep null grants on legacy tools in the consent screen
A null allowed_tools made the consent screen tick every tool on reconnect.
* chore(mcp): tidy tests and validation error handling
Only argument validation maps pydantic errors to client errors; one raised in a tool body is now an internal error.
* chore(mcp): rewrap get_allowed_tools docstring
* chore(mcp): drop null grant handling from the consent page
The consent API now sends the legacy tool list for a grant with no saved tools, so the page never receives null.
* fix(mcp): keep client errors readable and server errors logged
Row tool errors on develop reached the client verbatim; the new mapping hid some behind "Internal error.".
* fix(mcp): map remaining field errors and document the legacy allow-list
* feat(mcp): keep existing connections on the tools they had
Fill every null allow-list with the legacy tools, so tools added later never reach an existing endpoint. New endpoint keys store their tools explicitly.
* feat(mcp): group tools by area
The consent page lists tools by group and offers presets built from them. It also gets the tools each workspace can't use.
* feat(mcp): read-only and full-access presets on the consent page
The tool list moves into McpToolPicker so Settings can reuse it.
* feat(mcp): change a connection's tools without reconnecting
PATCH on an OAuth connection or an endpoint key replaces its tools, checked against what the endpoint can use, and logs the change in the audit log.
* feat(mcp): edit tools from Settings
Each connected app gets an Edit tools modal and a hint for the tools it has off, since new tools never turn on by themselves.
* chore(mcp): changelog for tool groups and Settings
* test(mcp): point the OAuth e2e test at the tool picker checkboxes
* fix(mcp): keep stored tools on edit and check availability at consent
Sending back a connection's own list failed when one of its tools was unavailable, and
consent stored tools the workspace can't use. Removing tools now needs no permission.
* fix(mcp): keep hidden tools when editing a connection's tools
Ticking any box in Settings dropped granted tools that are only unavailable for now, and a
slow save for one app could close the modal opened for another.
* refactor(mcp): share list_views from core and expose database tools only
Tool definitions live in contrib and know nothing about MCP or Kuma, so the Agent Builder can reuse them. Builder and automation tools ship later with their write tools.
* fix(mcp): reuse REST errors, validate row values and name blocked fields
Bad row values and field-level denials now read like the REST API's errors instead of "Internal error." or a generic denial.
* refactor(mcp): drop tool availability until a tool needs it
No tool overrides is_available since the Kuma tools left this PR. Also loads form field options in one query in list_views and logs stored tool names.
* feat(mcp): add django-oauth-toolkit metadata and scopes for MCP OAuth POC
Adds the OAuth provider settings, endpoint scope validator and discovery URLs behind BASEROW_MCP_OAUTH_ENABLED.
* feat(mcp): redirect OAuth authorize to Baserow consent and issue endpoint-bound codes
The consent API validates the authorization query, binds the code to an MCP endpoint, and returns the client redirect URL.
* fix(mcp): reject non-S256 and foreign-resource OAuth requests and read consent client from credentials
Shared validation backs both authorize and consent; the token audience is pinned to the MCP resource.
* test(mcp): cover CIMD host allowlist for MCP OAuth
* feat(mcp): serve Streamable HTTP /mcp with OAuth or endpoint-key bearer auth
MCP clients doing OAuth need a single resource URL; endpoint keys keep working as bearers.
* feat(mcp): revoke OAuth tokens when their MCP endpoint is deleted
Scope is matched as a whole word so endpoint:1 never hits endpoint:12.
* feat(mcp): add title and read-only/destructive annotations to MCP tools
MCP directories require a title and readOnlyHint/destructiveHint on every tool.
* feat(mcp): add consent page for MCP OAuth sign-in
* fix(mcp): only issue OAuth tokens through the consent flow
Open DCR let a client register for the password grant and request an endpoint scope,
skipping consent. DCR and the token endpoint now allow only authorization_code and
refresh_token, and only the consent view can add an endpoint scope.
* fix(mcp): strip trailing slash from the OAuth issuer and resource URL
A PUBLIC_BACKEND_URL ending in / produced a //mcp audience and a mismatched issuer.
* fix(mcp): add iss to OAuth deny and error redirects
The metadata advertises RFC 9207 support, so every redirect back to the client carries iss.
* fix(mcp): pass the authorize query to /mcp-authorize as base64url
The login redirect re-encoded the plain query, so the consent request failed after
signing in. /mcp-authorize also stays clear of the backend /mcp/* route.
* feat(mcp): limit an endpoint to its allowed tools
Null keeps every enabled tool, so existing endpoints and keys are unchanged.
tools/call now also refuses disabled tools, which match_by_name let through.
* feat(mcp): consent picks a workspace and tools
Users never see the endpoint row behind an OAuth connection; consent creates
or reuses it per client and workspace and stores the chosen tools.
* feat(mcp): pick a workspace and tools on the consent page
Replaces the MCP endpoint picker; the backend manages the endpoint row now.
* fix(mcp): reuse a consent grant only for the same OAuth client
Keying on the client name let manual endpoints and same-named clients share a grant.
* feat(mcp): drop dynamic client registration, keep CIMD only
Clients without CIMD use the endpoint key in the Authorization header.
* feat(mcp): redesign the consent page
Card with client avatar pair, verified badge, database counts and tool badges.
* feat(mcp): list and disconnect OAuth connections, refuse grant keys
Endpoints created by OAuth consent only accept their OAuth tokens, so their key
is refused on SSE and as a bearer, and they move from the endpoint list to a
connected apps API.
* feat(mcp): connect URL and connected apps in MCP server settings
Shows the one OAuth URL with per-client setup steps and lets users disconnect
apps they granted. Endpoint keys stay below under their own title.
* fix(mcp): hide OAuth grants from endpoint routes and left workspaces
The legacy endpoint routes no longer return grant rows or their key, and the
connections list skips grants in workspaces the user left, which can't be used
or disconnected.
* fix(mcp): load consent on the client so tool checkboxes render ticked
Server-rendered checkboxes lacked the checked class, which hydration kept while the state was ticked.
* fix(mcp): define django-oauth-toolkit swappable model settings
migrate resolves them when checking for model changes on an already migrated DB, which broke CI.
* fix(mcp): reset the SSE endpoint key when the key is unknown
The early 401 left current_key set, leaking it into later work in the same context.
* feat(mcp): give OAuth grants no key and one row per client and workspace
* fix(mcp): resolve the /mcp endpoint once and drop the /mcp/ route
* feat(mcp): hash OAuth tokens, expire refresh tokens and accept offline_access
Resource metadata lists only mcp; the CIMD host allowlist is now BASEROW_MCP_OAUTH_CIMD_ALLOWED_HOSTS.
* test(mcp): assert offline_access reaches the token and add refresh expiry control
* feat(mcp): rate-limit the OAuth token endpoint per client IP
* fix(mcp): validate consent once and only keep a grant when a code is issued
* fix(mcp): roll back the grant when the library answers consent with an error
oauthlib re-validates while issuing and returns non-fatal errors as a redirect, which committed the grant.
* fix(mcp): revoke OAuth grants when a user leaves the workspace
* fix(mcp): count only usable tools on connected apps
* fix(mcp): start reconnects from the existing grant's tools on the consent page
* fix(mcp): give the connections section its own BEM elements
* feat(mcp): send mcp_connected for Streamable HTTP clients
* fix(mcp): route /mcp, /oauth and OAuth metadata to the backend
* fix(mcp): route /mcp-authorize to frontend before /mcp to prevent 404
* feat(mcp): let MCP clients without CIMD register with DCR
Registration is anonymous, limited to public code-grant clients with https or loopback redirects, and unused clients are removed after a day.
* fix(mcp): reject DCR redirect URIs containing whitespace
DOT splits stored redirect URIs on whitespace, so one URI could smuggle in a second.
* docs(mcp): document OAuth sign-in for MCP clients
* test(mcp): load the URLconf before tests turn OAuth off
The OAuth routes are only mounted if the flag is on at URLconf import, so a test
that turned it off first left later tests in the worker with 404s.
* feat(mcp): periodically clear expired OAuth tokens
Rotation and reuse protection leave revoked refresh tokens, used codes and
expired access tokens behind. DCR registration tokens now expire so they're cleared too.
* style(mcp): drop dead and invalid rules in the OAuth SCSS
* fix(mcp): keep unnamed library metadata routes instead of crashing
* refactor(mcp): remove unused MCPEndpointHandler.get_by_key
* fix(mcp): only accept an OAuth token for its own client's grant
* fix(mcp): leave resource_metadata out of the 401 when OAuth is off
The metadata route isn't mounted then, so the hint pointed at a 404.
* fix(mcp): rate-limit the OAuth authorize redirect per client IP
Each anonymous authorize request can fetch and store a CIMD client.
* fix(mcp): delete CIMD clients that have no grant
Anonymous authorize requests store CIMD clients and nothing removed them.
* fix(mcp): say a CIMD host published the client, not that it verified it
With the default * allowlist the host is not vouched for.
* fix(mcp): name a DCR client without client_name by its redirect host
The consent title read "Connect " and the grant had an empty name.
* fix(mcp): route MCP and OAuth paths to the backend in the no-caddy nginx config
* fix(mcp): reject an access token that has no application
It crashed the /mcp request instead of returning invalid_token.
* fix(mcp): return the 404 JSON for RFC 7592 PUT and DELETE
Django's CSRF check answered them with a 403 page first.
* refactor(mcp): move the shared client avatar placeholder out of mcp_authorize
The connections list extended a placeholder defined in another component.
* fix(mcp): issue a refresh token only for offline_access
ADR 009 decision 6 ties refresh tokens to the offline_access scope.
* fix(mcp): stop the consent page from being framed
The consent page grants a client access, so it is a clickjacking target.
* fix(mcp): make the consent page tool toggles keyboard reachable
* docs(mcp): say the CIMD host allowlist only covers CIMD clients
* docs(mcp): route MCP and OAuth paths in the k8s and AWS examples
/mcp is only served by the ASGI app, so the examples sent it to a 404.
* fix(mcp): refuse to show the consent form inside a frame
Logging in inside a frame reaches the consent page by client-side navigation, which skips the frame headers.
* fix(mcp): always issue OAuth refresh tokens
Users stay signed in until they disconnect or the app goes unused for 30 days,
whether or not the client asks for offline_access.
* fix(mcp): keep the endpoint scope when a refresh narrows scopes
A refresh asking for scope=mcp issued a token without endpoint:<id>, which
failed on /mcp and escaped revocation on Disconnect.
* fix(mcp): keep OAuth clients that are still in use after a disconnect
Cleanup deleted a disconnected client the next day while the app kept using
its client_id. Clients now go after 30 days without a token, and an unknown
client on authorize tells the user to re-add the server.
* fix(mcp): serve the SSE route with a trailing slash
Turning off redirect_slashes made /mcp/<key>/sse/ a 404 instead of a redirect.
* fix(mcp): drop the error code from the 401 when no token was sent
RFC 6750 section 3.1 says no error code when the request has no credentials.
* fix(mcp): delete grantless CIMD clients a day after creation
Any anonymous authorize re-fetch bumps a CIMD client's updated, so it can't
mark use. CIMD clients are fetched again on demand anyway.
* fix(mcp): mark the OAuth client as used after saving its tokens
Matches the cleanup's lock order, tokens before the application row.
* style(mcp): rewrap the OAuth validator docstring
* fix(mcp): describe offline_access as it now behaves
Refresh tokens are issued whether or not it is requested.
* feat(mcp): audit log MCP OAuth connect and disconnect
ADR 009 decision 6: connecting and disconnecting are recorded in the audit log.
* test(mcp): give the OAuth action tests a unique module name
test_actions.py clashed with other test modules of the same name and broke collection in CI.
* fix(mcp): let users disconnect their OAuth grants without endpoint permissions
Listing grants and using them only needs membership, so disconnecting must not need the MCP endpoint operations either.
* fix(mcp): require the mcp scope on OAuth tokens used at /mcp
A refresh asking only for offline_access issued a token without mcp that /mcp still accepted. Refreshes now keep mcp, and /mcp rejects tokens without it.
* fix(mcp): ignore the redirect URI's own query when checking for an issued code
A client registered with a redirect URI like https://app.example/cb?error=0 never got a code.
* fix(mcp): send the OAuth connect PostHog event only after consent commits
The consent transaction rolls back when no code is issued, and the event was already sent by then. The audit log entry stays in the transaction.
* fix(mcp): keep OAuth grants out of the key endpoint lookup
Callers had to remember to pass a key-only queryset; grants have their own lookup.
* fix(mcp): show a CIMD client's host in a neutral badge
Any host can publish a client metadata document, so a green check made lookalike hosts look trusted.
* fix(mcp): show the readable reason when the consent request is rejected
* style(mcp): tidy an import and an outdated comment
* fix(mcp): name every client on the consent page by its client name
Matches Settings, which shows the client name with the host as a badge. A nameless CIMD client falls back to the host that published its metadata.
* fix(mcp): show fatal authorize errors on the styled consent page
The authorize endpoint answered unknown clients and bad redirect URIs with a bare text 400.
* test(mcp): add an e2e spec for the OAuth connect and disconnect flow
Enables BASEROW_MCP_OAUTH_ENABLED on the e2e and CI backends so the spec runs.
* fix(mcp): send only an error code to the consent error page
Free text in the URL could be injected and came back double-encoded after login. The page now maps codes to its own text and shows errors without sign in.
* fix(mcp): keep a CIMD client's host in the consent title
Any host can publish metadata under any name, so the title reads "Connect {name} from {host}". The neutral badge only repeated the host and is dropped.
* test(mcp): check the MCP status before parsing the body in the e2e spec
* test(mcp): await the login redirect in the consent middleware spec
The unawaited navigation ran the settings middleware after the request mock was restored, making a real request.
* fix(mcp): address final review findings on the OAuth flow
Authorize errors no longer redirect to client-registered URIs, CIMD redirect URIs follow the DCR rule, consent is rate-limited per user, and deleting a grant any way revokes its tokens.
* fix(mcp): accept ChatGPT, Claude and VS Code CIMD documents
django-oauth-toolkit 3.4.1 ignores token_endpoint_auth_methods_supported and refuses extra grant types; fixed upstream in #1856 and #1858 but not released.
* fix(mcp): update ChatGPT connect steps to the Plugins page
* feat(mcp): split MCP server settings into OAuth and Endpoint tabs
* fix(mcp): route /mcp without a trailing slash on K8s
The OAuth resource is /mcp, which the /mcp/ prefix missed.
* fix(mcp): give the CIMD document download one deadline
The library's timeout applies per read, so a slow-drip document held a worker.
* fix(mcp): bound anonymous client registrations
Caps the body at 16 KB and redirect URIs at 10; unsupported URIs are dropped instead of failing the registration.
* fix(mcp): rate-limit token revocation, count only failed token calls
Revocation loads the client, which can fetch and store a CIMD client.
* fix(mcp): preselect the granted workspace when reconnecting
It picked the first workspace with databases, so one Allow could move the app with every tool ticked.
* fix(mcp): carry the consent request in the path so SSO keeps it
SSO sign-in only keeps the return path. The frame headers move to the page so every spelling of the path gets them.
* fix(mcp): canonicalize the resource URL, scrub OAuth fields from Sentry
SDK clients send the resource normalized; the Sentry denylist only matches exact keys.
* fix(mcp): lock the membership while granting an OAuth client
A member removed during consent could otherwise keep the new grant.
* chore(mcp): count databases through the registry, add missing translations
* test(mcp): check the OAuth routes follow the flag
* test(e2e): skip the MCP OAuth test only when the route is missing
Any other status hid a broken metadata endpoint.
* fix(mcp): explain rejected CIMD clients and load failures on the consent page
Both showed the invalid request message, which suggested re-adding the server.
* fix(mcp): answer a refresh that lost a race with invalid_grant
With hashed storage the library returned a blank token and the token view raised a 500.
* feat(mcp): mark connected apps whose sign-in has ended
Grants stay listed after their refresh token expires, but the app has to sign in again.
* docs(mcp): add a self-hosting note for MCP OAuth sign-in
Covers the public URL, routing, outbound HTTPS for CIMD, the client IP the limits use and what turning the flag off does.
* fix(mcp): sign OAuth apps out on password change or reset
Browser sessions already end then; grants stay so apps show as signed out.
* feat(mcp): tick only the read tools on a first connection
Changing data becomes opt-in; reconnecting still starts from the existing grant.
* fix(helm): keep the MCP consent page on the frontend on a shared domain
Caddy ingress turns Prefix /mcp into /mcp*, which also caught /mcp-authorize.
* fix: remove workspace invite messages and pending cap
Workspace invitations no longer accept custom messages, which removes the main spam payload from the flow. Drop the BASEROW_MAX_PENDING_WORKSPACE_INVITES limit because deleting and recreating invites made it ineffective.
* Update backend/src/baserow/core/migrations/0114_alter_workspaceinvitation_message.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>