Skip to main content
How you authenticate depends on which transport you use:
  • Hosted (remote) server — OAuth. You sign in through your browser; there is no key to copy or store.
  • Local (npm) server — an API key in the ALPHACAST_API_KEY environment variable.
Both authenticate as the same Alphacast account and inherit the same repository permissions.

OAuth (hosted server)

The hosted server at https://mcp.alphacast.io/mcp is an OAuth 2.0 protected resource. The first time your client connects, it runs a standard authorization-code flow with PKCE:
  1. Your client opens a browser to the Alphacast authorization server at https://auth.alphacast.io/.
  2. You sign in with your Alphacast account (or approve the request if already signed in) and consent to the requested scopes.
  3. The client receives a token and uses it as a Bearer token on every request. Most clients refresh it automatically, so you only sign in once.
The server requests these scopes: On this path you don’t paste an API key into a configuration file. The server resolves your Alphacast API key for the selected Workspace on the server side. To disconnect, sign out or remove the connector in your client.
Most clients that support remote MCP servers handle this OAuth flow for you. Clients that only support local stdio servers can reach the hosted server through the mcp-remote bridge, which performs the same browser login. See Other clients.

Which Workspace the connection uses

  • Hosted: the connection follows the Workspace you have selected in Alphacast. After you switch Workspaces, the change reaches the MCP server shortly afterwards. An open session then returns workspace_context_changed, and your client has to start a new MCP session. See Troubleshooting.
  • Local: the connection uses the Workspace that your API key belongs to. To use another Workspace, configure that Workspace’s key and restart the server.
Call get_current_workspace to check which Workspace you are in. After a change, load Workspace methodologies again. See Workspaces.

API key (local server)

The local npm package reuses the same API key as the REST API. There is no OAuth flow on this path.

Environment variable

The server reads your API key from the ALPHACAST_API_KEY environment variable at startup. You set this once in your client’s MCP configuration:
The server checks the key when it starts. If the key is missing or invalid, the server stops with an error. It then uses the key to call Alphacast on your behalf. Local connections have access to both read and write tools, limited by your plan and repository permissions.
The key is the same raw API key you use for the REST API (where it goes as the HTTP Basic Auth username). Both authenticate as the same Alphacast account.

Permissions

The MCP server works with the permissions of your user in the selected Workspace: If a tool call returns 403 Forbidden, the API key does not have the required permission on the target repository. Generate a new key under an account with the right access, or have the repository owner grant you write access.

Where to manage your key

  • View and rotate your key: alphacast.io/settings.
  • Reference for the same key in the REST API: Authentication.
  • Rotate immediately if a key was exposed; rotation invalidates the previous value.

What Alphacast records about tool calls

Both the hosted and the local server send Alphacast a record of each tool call. A record can include:
  • The tool name, duration and outcome (success or error). For protocol or transport errors, it also includes the error code and message.
  • The MCP client name and version, an MCP session identifier, and a conversation identifier if your client sends one.
  • A copy of the call request in which text values are replaced by [REDACTED]. Pipeline configuration objects and fields whose names look like credentials are replaced entirely. Tool and field names, numbers and true/false values, such as dataset IDs or row limits, remain. Very large requests are left out.
  • Your user and account, identified from the API key used to send the record.
Tool results and the model’s answers are not part of these records. The MCP server receives the tool calls your client makes, including their arguments, not your client’s full conversation. Separately from these records, Alphacast processes your requests to run the tools. For example, dataset reads can count toward your plan’s download usage, and pipelines you create are saved in your repository. Your AI client handles tool results under its own terms.