Forest Admin - API reference
    Preparing search index...

    Interface ForestMCPServerOptions

    Options for configuring the Forest Admin MCP Server

    interface ForestMCPServerOptions {
        agentDispatcher?: InProcessAgentDispatcher;
        agentUrl?: string;
        allowedOAuthClients?: string[];
        authSecret?: string;
        basePath?: string;
        enabledTools?: ToolName[];
        envSecret?: string;
        fileUploads?: false | FileUploadsOptions;
        forestAppUrl?: string;
        forestServerClient?: ForestServerClient;
        forestServerUrl?: string;
        logger?: Logger;
        tokenTtl?: TokenTtlOptions;
    }
    Index

    Properties

    agentDispatcher?: InProcessAgentDispatcher

    Set by the agent when mounted: tool calls then dispatch to the agent in-process (no socket) instead of reaching its public api_endpoint over HTTP.

    agentUrl?: string

    Standalone MCP server only (set via FOREST_AGENT_URL). Internal URL the tools use to reach the agent's data layer, defaulting to the environment's public api_endpoint.

    allowedOAuthClients?: string[]

    Domains of the OAuth clients allowed to use this server, e.g. ['dust.tt']; subdomains match. Omit to accept any dynamically registered client.

    authSecret?: string

    Forest Admin authentication secret

    basePath?: string

    Opt-in path prefix under which the MCP protocol and OAuth routes are mounted, e.g. '/ai'. The .well-known discovery documents stay at the origin root (per RFC 8414/9728) but are served at prefix-suffixed paths. Defaults to the origin root. Use it to avoid colliding with a host app's own OAuth routes when embedded. Requires the agent to be served at the domain root.

    enabledTools?: ToolName[]

    List of tool names to enable (allowlist). Only these tools will be exposed. New tools in future releases will NOT be auto-enabled.

    envSecret?: string

    Forest Admin environment secret

    fileUploads?: false | FileUploadsOptions

    Action file uploads are on by default, with the objects held in memory. Pass an object to configure them — a storage backend, size limits, ttls — or false to turn the feature off: no requestActionFileUpload tool, no upload endpoint, and executeAction stops mentioning either. See the README for the flow and the storage contract.

    Expected to change to follow the MCP file transfer specification once it lands (SEP-2631).

    forestAppUrl?: string

    Forest Admin app URL (for OAuth redirects)

    forestServerClient?: ForestServerClient

    Optional Forest server client for dependency injection (from agent integration)

    forestServerUrl?: string

    Forest Admin server URL

    logger?: Logger

    Optional logger function. Defaults to console logging.

    tokenTtl?: TokenTtlOptions

    Upper bounds on the OAuth token lifetimes this server issues. Forest grants 1 hour (3600s) for an access token and 8 days (691200s) for a refresh token; each value can only shorten that, never extend it. refreshTokenSeconds bounds the time between two interactive logins. Minimum 60s for either.