Connection, permissions and user experience
Problem
DataDescriber staff need their agents to help maintain the Platform's inventory without repeating every action manually in a browser. The company also wants to demonstrate “talk to your data”, letting customers ask useful questions about described information and receive understandable results. Customers can do this through their agent's chat without having Platform open.
Agents should use the user's existing permissions. Users should know which tenant and environment they are working in and whether a request succeeded or failed. Connecting an agent must not grant extra access.
An agent can use several authorized MCP connections. Each connection is tied to one tenant and environment. A prompt can tell the agent which connection to use, but prompts and tool arguments must not change the tenant or environment of that connection.
This first delivery establishes the connection and permission boundary with two harmless tools. It proves the foundation for later inventory and query work; it does not itself deliver either business outcome.
Actors and goals
- Internal MCP user: connect a client, establish the intended context and verify read or read/write access with harmless tools. Inventory workers and demo readers are the longer-term audiences for this foundation.
- Tenant administrator: choose whether the tenant permits MCP and which people can read or write through it without granting unrelated business permissions.
Expected outcomes
These outcomes describe what users should be able to achieve with MCP. They guide implementation and acceptance testing.
| Outcome | Expected behavior | Stories / criteria |
|---|---|---|
| Connection | The selected client has a documented, usable authenticated connection journey in the intended tenant/environment. | US-1; AC-1, AC-3 |
| Permission demonstrations | Read-only and read/write users can establish their permitted access using two harmless, fixed-result tools. | US-2, US-3; AC-2, AC-4 |
| Access controls and withdrawal | Tenant activation and individual MCP permissions cumulatively constrain use; withdrawal follows the documented authority policy. | US-4; AC-2, AC-3, AC-5 |
| Setup and recovery | Users and operators can establish context, distinguish failures and follow verified operating guidance without exposing credentials or business payloads. | US-5; AC-6 |
Scope and non-goals
Included changes
- Sign in through WorkOS from an MCP client.
- Keep each MCP connection tied to the intended tenant and environment.
- Turn MCP on or off for a tenant using feature flags in WorkOS.
- Provide two harmless tools:
hello_readreturns a greeting;hello_writeconfirms write permission without changing data. - Enforce read and write permissions.
- Explain why access is denied, what the user can do next, and how to set up the connection.
Non-goals
- Tools for working with inventory data or running queries are later work, along with the shared command/query logic they need.
- The two test tools return fixed messages. They do not read inventory, change business data or create business events.
- No new Platform screens are included. Users connect through their MCP client and sign in through WorkOS; administrators use the existing WorkOS controls for tenant activation and user permissions.
Behavioral boundaries
MCP is off for a tenant by default. An administrator can turn it on with a feature flag in WorkOS, but users still need their own MCP permissions.
Turning MCP off does not block sign-in. After sign-in, the server checks the tenant setting and the user's permissions before allowing MCP requests.
Users need MCP read permission (
mcp:read) to use MCP. Thehello_writetool also requires write permission (mcp:write).Note
These two test tools only check MCP read and write permissions. Future tools must also check the permissions required by the operation:
- Reading data requires
mcp:readand the operation's usual permissions. - Creating, changing or deleting data requires both
mcp:readandmcp:write, as well as the operation's usual permissions.
- Reading data requires
Each connection is tied to one tenant and environment. Using another tenant or environment requires its own authorized connection. Tool arguments, references and identity headers cannot change which tenant or environment the server has verified for that connection.
Each authorized MCP client can use the tools allowed by the user's MCP permissions. This delivery does not let users give one client read-only access while another has read and write access. The setup instructions must explain what access users give their client.
The server only lists tools the user is allowed to use. It checks the tenant setting and the user's permissions again when a tool is called. Calling a tool directly does not bypass these checks, even if it is missing from the list.
Tool replies and error messages must not expose credentials, protected information or information about other tenants.
Removing a user's permissions, withdrawing a client's consent, letting authentication expire and turning MCP off for a tenant stop access in different ways.
Before release, add documentation to the repository explaining how users can disconnect their client and how administrators can remove permissions or turn MCP off for a tenant. It must also explain when authentication expires and how long each change can take to stop access. Permission changes and turning MCP off may take effect after a delay, but that delay must have a documented maximum.
The server may use a previous permission check only until that check expires. It must then check access again. If it cannot confirm access, it must deny further requests.
Initial interaction
- Add the supplied tenant/environment URL as a Streamable HTTP connection, following the MCP client's setup instructions.
- Sign in and approve the connection through WorkOS in the browser. Cancelling does not grant access; users can try again.
- Ask the agent to use
hello_readto check access in the intended tenant and environment.
Saving a connection does not sign the user in. Signing in does not grant permission to use the tools.
The server exposes two fixed demonstration tools:
| Tool purpose | Required user permissions | Result |
|---|---|---|
hello_read — read-permission demonstration |
mcp:read |
A static greeting such as “Hello.” |
hello_write — write-permission demonstration |
mcp:read and mcp:write |
A static message indicating that the write gate passed and explicitly stating that no data was changed. |
Neither tool reads inventory data, mutates metadata or emits business events. These working names are also used in the response reference and mockups. Both are harmless demonstrations, while the second deliberately requires write permission.
Expired authentication and recovery
The client renews authentication directly with WorkOS when possible. If authentication expires and automatic renewal is unavailable, the user must re-authenticate through WorkOS in the browser. Existing valid consent is reused; the user does not need to set up the connection again. Re-authentication does not grant missing Platform permissions.
Cancelling leaves access unavailable, but the user can try signing in again. After successful sign-in, retry the tool to check that access works again. Whether the client retries automatically must be checked in that client. Missing permissions or disabled MCP require an administrator's help. A temporary service failure calls for retrying later.
User stories
Each story links to its acceptance criteria, defined below.
| US-1 | Connect my agent to the intended tenant |
|---|---|
| As an internal MCP user, I want to connect my agent through WorkOS to the intended tenant and environment so that I can establish usable access in the right context. | |
| Criteria | AC-1, AC-3 |
| US-2 | Verify my read-only access safely |
|---|---|
| As a read-only MCP user, I want a harmless greeting and a clear denial of the write-gated tool so that I can confirm the access I have without changing business data. | |
| Criteria | AC-2, AC-4 |
| US-3 | Verify my write permission without making a change |
|---|---|
| As a write-enabled MCP user, I want a harmless write-gated demonstration so that I can verify my permission before real business tools are introduced. | |
| Criteria | AC-2, AC-4 |
| US-4 | Control and withdraw MCP access |
|---|---|
| As a tenant administrator, I want tenant activation and user permissions to constrain MCP access so that only the intended people can connect and use the permitted tools. | |
| Criteria | AC-2, AC-3, AC-5 |
| Scope | This uses existing operational enablement and permission administration. It does not add administration tools or screens. |
| US-5 | Understand and recover from connection problems |
|---|---|
| As an MCP user or operator, I want useful setup, denial and recovery information so that I can distinguish a configuration problem from an authentication or permission failure and take the appropriate next step. | |
| Criteria | AC-6 |
Shared acceptance conditions
Tenant isolation and credential checks in AC-3 apply across the stories.
Acceptance criteria
The criteria below define observable behavior and its verification. Applicable correctness, authorization, tenant-isolation and data-integrity controls require passing evidence before release.
| AC-1 | Connect and sign in |
|---|---|
| Expected | Users can follow the setup instructions and sign in through WorkOS for the intended tenant and environment. |
After approving the connection, they can list the available tools and successfully use hello_read. |
|
| Cancelling sign-in or consent does not grant access. | |
| How to check | Run the connection flow in a real MCP client. A person completes any required sign-in or MFA. Check both successful and cancelled sign-in. |
| AC-2 | Enforce MCP read and write permissions |
|---|---|
| Expected | Users with only mcp:read can use hello_read, but not hello_write. Users with both permissions can use both tools. |
Without mcp:read, neither tool is available, even if the user has mcp:write. |
|
| Turning MCP on for a tenant does not give users any permissions. | |
| The tool list and direct tool calls enforce the same permissions. Calling a hidden tool directly must still be denied. | |
| How to check | Test all four combinations of read and write permissions. Check the tool list and direct calls, and record the permissions used. |
| AC-3 | Reject access to the wrong tenant or environment |
|---|---|
| Expected | Requests are denied when MCP is off for the tenant or the credential is invalid or expired. |
| Requests are denied for an unknown host, the wrong resource or environment, or an organization that does not match the tenant. | |
| A credential for tenant A cannot grant access to tenant B. Forged identity headers cannot bypass these checks. | |
| How to check | Run negative server tests with two tenants. Include the existing authentication and tenant-isolation tests. |
| AC-4 | Keep both tools harmless |
|---|---|
| Expected | Both tools return fixed messages with a defined maximum size. |
| Neither tool reads inventory, changes data, creates business events or exposes protected information. | |
| Invalid inputs cannot make a tool do anything outside its defined behavior. | |
hello_write explicitly says that no data was changed. |
|
| How to check | Check both replies and invalid inputs. Use server tests to confirm that no inventory reads, data changes or business events occur. |
| AC-5 | Stop access when it is no longer valid |
|---|---|
| Expected | Expiry, renewal, removed permissions, withdrawn consent and provider failures follow the documented access rules. |
| Renewing an internal credential cannot extend access based on an expired permission check. | |
| Turning MCP off stops further permitted requests within the documented maximum delay. Operators can tell when the setting changed and when access stopped. | |
| Once a permission check expires, the server must check access again. If that check is unavailable, further requests are denied. | |
| How to check | Test expiry, renewal, access withdrawal and provider failures in the configured environment. Measure the delays and have an engineer review them against the documented limits. |
| AC-6 | Explain setup, errors and recovery |
|---|---|
| Expected | Setup instructions identify the tenant and environment. They distinguish adding the connection, signing in and checking tool access. |
| Users can tell whether a failure concerns configuration, sign-in, permissions or the service, and what to do next. | |
| Re-authentication uses the existing connection and any valid consent. Cancelling does not restore access, but users can try again. | |
| Missing permissions or disabled MCP direct users to an administrator. Repeating sign-in or consent is not presented as a solution. | |
| Temporary service failures explain how to retry. | |
| Logs and monitoring identify the request, user/client and tenant, and explain why access was allowed or denied. They contain no credentials or business data. | |
| Operating limits and instructions for disabling MCP and restoring service are checked against the implementation. | |
| How to check | Follow the setup and recovery instructions, inspect logs and monitoring, and check the operating limits. The implementing engineer and operational owner review responsibilities and recovery steps. |
Screens and states
See the interactive mockups for connection, tool use and error recovery.
Messages and recovery
These are proposed server-owned messages. Client-visible presentation is reviewed separately in the mockups and the real-client journey. A denial must not look like successful execution.
| Situation | Proposed message | Intended recovery |
|---|---|---|
| Authentication missing or expired | Sign in to connect to DataDescriber. | The client renews with WorkOS when possible; otherwise use Authenticate on the saved server in MCP settings, then retry the request. Cancellation restores no access. |
| User lacks MCP read access | Your account does not have MCP read access for this tenant. Contact your tenant administrator. | An administrator reviews the user's access; repeating consent does not grant it. |
| User lacks MCP write access | Your account does not have MCP write access for this tenant. No data was changed. Contact your tenant administrator. | An administrator reviews write access. Read-only access remains read-only. |
| Tenant capability disabled | MCP is not enabled for this tenant. Contact your tenant administrator. | The tenant administrator or capability owner reviews enablement; a connection alone does not activate MCP. |
| Access cannot be resolved | MCP access could not be checked right now. Try again later. | Retry after the temporary service failure; do not repeatedly sign in or consent. |
| Read tool succeeds | Hello. | The greeting confirms permitted access without reading inventory. |
| Write tool succeeds | Your MCP write permission was verified. No data was changed. | The result confirms permission without a business mutation. |