Security
Auth scopes
Learn how OAuth scopes, API keys, public tools, and private hosted MCP endpoints shape authorization for tool discovery and invocation.
Definition
Auth scopes are permission labels that describe what a caller is allowed to access. In MCP deployments, scopes can come from OAuth flows, API keys, tenant policy, or server configuration.
How Astrail Uses It
Astrail supports private hosted servers with bearer-token access and separates upstream provider credentials from MCP endpoint authorization. Tool visibility and invocation can be filtered by caller and server policy.
Implementation Checklist
Separate MCP endpoint access from upstream provider credentials.
Filter tools/list based on the caller's authorization.
Return clear auth_required or permission_denied states when credentials are missing.
Use least-privilege scopes for sensitive write or admin tools.
FAQ
Are auth scopes required for public MCP tools?
Public tools may not require caller auth, but they should still enforce validation, rate limits, and limits on what public users can discover or execute.
Should agents see tools they are not allowed to call?
Usually no. Filtering tools/list reduces confusion and prevents private capability names from leaking to unauthorized clients.