# OpenBB MCP Server This extension enables LLM agents to interact with OpenBB Platform's REST API endpoints through the MCP protocol. With tool discovery enabled, the server hides the full tool catalog behind a few discovery tools, so agents search for and call only the tools they need. This keeps the initial tool list small — preventing token bloat — while still giving agents access to the full platform on demand. Discovery is stateless: every client sees the same tool list, and hidden tools are called through `call_tool` or directly by name, so multiple agents can share one server. ## Installation & Usage ```bash pip install openbb-mcp-server ``` The server exposes the routes of the installed OpenBB extensions, so install the data extensions too, either all of them (`pip install openbb`) or the ones you need (`pip install openbb-equity openbb-yfinance`). Install the `cli` extra (`pip install "openbb-mcp-server[cli]"`) for the `openbb-cli` dispatcher tools. Start the OpenBB MCP server with default settings: ```bash openbb-mcp ``` Or use the `uvx` command: ```bash uvx --from openbb-mcp-server --with openbb openbb-mcp ``` ### Command Line Options Enter `openbb-mcp --help` to see the docstring from the command line. ```sh --help Show this help message and exit. --app The path to the FastAPI app instance. This can be in the format 'module.path:app_instance' or a file path 'path/to/app.py'. If not provided, the server will run with the default built-in app. --name The name of the FastAPI app instance or factory function in the app file. Defaults to 'app'. --factory If set, the app is treated as a factory function that will be called to create the FastAPI app instance. --spec Path to an `openbb-cli` generated `.spec` file. Serves a proxy app whose routes forward to the spec's `base_url`. Mutually exclusive with --app. --config-file Path to a TOML config file, the highest-priority layer of the `openbb.toml` cascade. Also read from $OPENBB_MCP_CONFIG, $OPENBB_API_CONFIG, or $OPENBB_CONFIG. --host The host to bind the server to. Defaults to '127.0.0.1'. This is a uvicorn argument. --port The port to bind the server to. Defaults to 8001. This is a uvicorn argument. --transport The transport mechanism to use for the MCP server. Defaults to 'streamable-http'. --allowed-categories A comma-separated list of tool categories to serve. Tools in other categories are not listed, searchable, or callable. If not provided, all categories are served. --default-categories A comma-separated list of tool categories to list when tool discovery is off. Tools in other categories are not served. Defaults to 'all'. --tool-discovery If set, the tools are hidden behind available_categories, available_tools, search_tools, and call_tool. --system-prompt Path to a TXT file with the system prompt. --server-prompts Path to a JSON file with a list of server prompts. ``` #### Other arguments Every other `--key value` is routed by name: - An `MCPSettings` field sets that setting, e.g. `--enable-cli-tools false` or `--server-auth '["user", "pass"]'`. - `--httpx-