Skip to content

Keep identity boundaries explicit in a custom MCP server

4 min readEnterprise data and AI leaders

Sravan Modugula · Chief Data & AI Officer, dotSolved Inc; creator of Nexatron

A custom MCP server sits between an assistant and one or more protected systems. Its authorization design must establish who is making the request, which organization or account is in scope, and what operation is permitted. A valid connection alone does not authorize every tool or every source record.

Trace authority across the request

Draw the identities involved: the user, the assistant client, the MCP service, and the source credential. Identify which system vouches for each and where permissions are checked. This prevents a common design error in which a caller-controlled account identifier is treated as proof that the caller may access that account's data.

Use the applicable standard carefully

The MCP authorization specification defines behavior for protected HTTP transports. Read the current specification and the client requirements for the chosen implementation. Avoid inventing a custom credential exchange merely because it works in a local demonstration. Standard mechanisms still require correct configuration and careful handling of tokens, redirects, scopes, and resource boundaries.

A local process may use a different supported credential arrangement from a remote service. Document that distinction. Do not transfer assumptions from one deployment mode to another without review. The security question is how the actual request acquires and uses authority, not whether the integration is described broadly as OAuth-enabled or MCP-compatible.

Preserve the source boundary

Decide whether source calls run under per-user authorization or a constrained service account. If a service account is necessary, define the additional controls that restrict each user's allowed scope. The adapter should not become a way to bypass permissions that the source application would otherwise enforce for that person.

Test with two users who have different access and include denied cases. Inspect summaries, error messages, and metadata as well as the main result. Sensitive information can leak through a count or a descriptive error even when raw records are hidden. The complete response must respect the intended boundary.

Plan credential lifecycle

Specify how credentials are stored, refreshed, rotated, and revoked. Keep them out of model-visible arguments and results. Logs should provide enough information to investigate authorization failures without printing tokens or source secrets. The operating team needs a supported way to distinguish expired authorization from missing permission and from an unavailable source.

Include offboarding and changed roles in the acceptance plan. Confirm how quickly a revoked or reduced permission takes effect and what the user experiences. A successful initial sign-in does not establish that the lifecycle works. These tests are especially important when a custom integration will outlive the developer who first configured it.

Keep actions separately authorized

A user allowed to read a record may not be allowed to update it. Check the intended operation at execution time, and require the appropriate confirmation or approval for consequential changes. Do not let a conversational transition from analysis to action silently expand authority.

When considering a custom MCP integration for a Nexatron workflow, bring the source's official authorization documentation and the organization's access requirements. Have the security and source owners assess the proposed identity flow, test the denied cases, and record the evidence before the adapter is considered for production use. A small integration with explicit authority boundaries is a stronger starting point than a broad tool surface whose access assumptions remain implicit.

Check a confused account request

In a controlled test, have an authorized user submit an identifier belonging to another test account. The service should reject the unauthorized scope regardless of whether the identifier is well formed. This verifies that validation of syntax has not been mistaken for authorization. Review any error text for unnecessary disclosure, and preserve the case as part of the adapter's acceptance evidence.

Repeat the case for each source credential mode the adapter supports. A passing per-user configuration does not establish the behavior of a shared service-account configuration.

Bring three business questions

Explore your sources, definitions, and review criteria in a tailored Nexatron demonstration. Please keep credentials and sensitive records out of the inquiry.

Request a tailored demoExplore Nexatron with Claude