mcp-use TypeScript API
    Preparing search index...

    Interface MCPAgentOptions

    Configures a local or remote MCPAgent.

    interface MCPAgentOptions {
        agentId?: string;
        apiKey?: string;
        autoInitialize?: boolean;
        baseUrl?: string;
        client?: MCPClient;
        connectors?: BaseConnector[];
        disallowedTools?: string[];
        exposePromptsAsTools?: boolean;
        exposeResourcesAsTools?: boolean;
        llm: string | ProviderConfig;
        llmConfig?: NativeLLMConfig;
        maxSteps?: number;
        mcpServers?: McpServersInput;
        memoryEnabled?: boolean;
        systemPrompt?: string | null;
    }
    Index
    agentId?: string

    Remote agent identifier. When set, execution uses the remote API.

    apiKey?: string

    Remote API key. Defaults to MCP_USE_API_KEY.

    autoInitialize?: boolean

    Initializes the agent on the first run. Defaults to false.

    baseUrl?: string

    Remote API origin. Defaults to https://cloud.manufact.com.

    client?: MCPClient

    Existing MCP client. The agent does not create another client.

    connectors?: BaseConnector[]

    Existing MCP connectors to initialize and expose as tools.

    disallowedTools?: string[]

    MCP tool names that must not be exposed to the model.

    exposePromptsAsTools?: boolean

    Exposes MCP prompts as callable tools. Defaults to true.

    exposeResourcesAsTools?: boolean

    Exposes MCP resources as callable tools. Defaults to true.

    llm: string | ProviderConfig

    Model identifier such as "openai/gpt-4o", or a complete provider configuration.

    llmConfig?: NativeLLMConfig

    Credentials and sampling overrides for a string model identifier.

    maxSteps?: number

    Maximum model/tool-loop steps per run. Defaults to 10.

    mcpServers?: McpServersInput

    Named server configurations or live browser connections.

    memoryEnabled?: boolean

    Retains user and assistant messages between runs. Defaults to true.

    systemPrompt?: string | null

    System instruction for local runs. Pass null to use the default instruction.