openbq-org/openbb/configure-mcp-server

Claude Code and agent skill by openbq-org/openbb

Trust tier 2
  • community
  • ext:[{"type":"config","description":"Configuration overrides"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

This guide covers installation, configuration, authentication, tool discovery, prompt management, and client integration for `openbb-mcp-server`.

Install

npx vskill@latest install openbq-org/openbb/configure-mcp-server

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

Configure and Build the OpenBB MCP Server

This guide covers installation, configuration, authentication, tool discovery, prompt management, and client integration for openbb-mcp-server.


Installation

pip install openbb-mcp-server

This installs the openbb-mcp CLI command. To include the default OpenBB extensions as tools, also install them:

pip install openbb

Or install individual extensions:

pip install openbb-equity openbb-economy

The cli extra adds openbb-cli and its four dispatcher tools (openbb_dispatch, openbb_batch_dispatch, openbb_list_commands, openbb_describe_command); enable_cli_tools=false turns them off:

pip install "openbb-mcp-server[cli]"

Starting the Server

Default (all installed OpenBB extensions)
openbb-mcp

Defaults: --host 127.0.0.1 --port 8001 --transport streamable-http

With a Custom FastAPI Application
# File path with default instance name "app"
openbb-mcp --app ./my_app.py
# Explicit instance name
openbb-mcp --app ./my_app.py --name my_app
# Module import syntax
openbb-mcp --app my_package.app:my_app
# Factory function pattern
openbb-mcp --app ./my_app.py:create_app --factory
Transport Options
TransportFlagUse Case
streamable-http--transport streamable-httpDefault. HTTP-based, works with Cursor, VS Code
sse--transport sseLegacy Server-Sent Events. Required by Cline
stdio--transport stdioStandard I/O. Used by Claude Desktop

CLI Arguments

ArgumentDescriptionDefault
--app <path>Path to FastAPI application file or module:instance (mutually exclusive with --spec)OpenBB default app
--name <name>Name of the FastAPI instance or factory functionapp
--factoryTreat --name as a factory functionfalse
--spec <path>Path to an openbb-cli generated .spec file. Synthesizes a FastAPI proxy app whose routes forward to the spec's base_url; FastMCP exposes those routes as MCP tools. Mutually exclusive with --app.None
--config-file <path>Path to an openbb.toml config file. Highest-priority TOML layer in the cascade. Also honored via OPENBB_MCP_CONFIG / OPENBB_API_CONFIG / OPENBB_CONFIG.None
--host <host>Server host127.0.0.1
--port <port>Server port8001
--transport <type>streamable-http, sse, or stdiostreamable-http
--default-categories <csv>Categories served when tool discovery is offall
--allowed-categories <csv>The only categories served, with or without discoveryAll categories
--tool-discoveryHide the tools behind available_categories, available_tools, search_tools, and call_toolDiscovery disabled
--system-prompt <path>Path to a .txt system prompt fileNone
--server-prompts <path>Path to a .json server prompts fileNone

Every other --key value is routed by name: an MCPSettings field sets that setting (--enable-cli-tools false, --server-auth '["user", "pass"]'), --httpx-<option> sets an option of the httpx client that calls the API (--httpx-verify false), and anything else is passed to uvicorn (--log-level debug).


Spec-Driven Proxy Mode

Instead of importing a FastAPI app in-process, the launcher can synthesize one from an openbb-cli generated .spec file. Each command in the spec becomes a FastAPI route that proxies to the spec's recorded base_url. FastMCP walks those routes and exposes them as MCP tools — same tool surface as a normal --app install, but the heavy import openbb lives on the upstream server.

Generating a spec

The spec is produced by openbb-cli:

bash
openbb --generate-spec --server https://api.example.com --output cli.spec

This fetches /openapi.json from the server and writes a precomputed .spec file with every command's URL path, method, parameter schema, and a content_sha256 integrity hash.

Single-spec launch
bash
openbb-mcp --spec /etc/openbb/cli.spec

Or via TOML (--config-file openbb.toml):

toml
[mcp.spec]
path = "/etc/openbb/cli.spec"
# Optional: override the spec's recorded base_url at deploy time.
base_url = "https://upstream.example.com"
# Optional: pinned SHA-256. When set, the launcher recomputes the spec's
# canonical-JSON hash and refuses to start unless it matches — protects
# against silent file drift when the spec is fetched at deploy time.
content_sha256 = "abc123..."
[mcp.spec.headers]
# Static headers injected on every proxied upstream request.
# ``$VAR`` / ``${VAR}`` are substituted from the current environment;
# entries with unresolved variables are skipped with a warning.
Authorization = "Bearer $OPENBB_UPSTREAM_TOKEN"
X-API-Key = "$OPENBB_UPSTREAM_KEY"

--spec and --app are mutually exclusive.

Multi-spec mounting

Each [mcp.spec.NAME] subtable mounts an independent spec under its own prefix. FastMCP turns the union of all mounted routes into MCP tools; per-spec hooks fire on every tool dispatch into that spec's mount.

toml
[mcp.spec.equity]
path = "/etc/openbb/equity.spec"
mount = "/equity" # optional; defaults to "/<name>"
content_sha256 = "abc..."
[mcp.spec.equity.headers]
Authorization = "Bearer $EQUITY_TOKEN"
[mcp.spec.equity.auth]
hooks = ["my_pkg.auth:equity_token_check"]
[mcp.spec.equity.middleware]
hooks = ["my_pkg.middleware:equity_rate_limit"]
[mcp.spec.crypto]
path = "/etc/openbb/crypto.spec"
[mcp.spec.crypto.headers]
X-API-Key = "$CRYPTO_KEY"

openbb.toml Cascade

The launcher reads the same layered TOML cascade openbb-core ships with, lowest priority first:

pyproject.toml [tool.openbb] (so [tool.openbb.mcp]) → user-global ~/.openbb_platform/openbb.toml
→ project openbb.toml (walking up from CWD) → --config-file PATH (explicit)

Every layer is optional, and .openbb.toml works in place of openbb.toml. --config-file (or OPENBB_MCP_CONFIG / OPENBB_API_CONFIG / OPENBB_CONFIG) is the highest-priority TOML layer. [mcp] values are applied like CLI flags: a CLI flag beats them, and they beat OPENBB_MCP_* environment variables. [env] entries never replace a variable already set in the shell or a .env file.

Top-level tables
TablePurpose
[mcp]Default values for any of the --* CLI flags (CLI wins).
[mcp.spec]Single-spec proxy mode (path, base_url, content_sha256, headers).
[mcp.spec.NAME]Multi-spec mount (path, base_url, content_sha256, headers, auth, middleware).
[mcp.auth]Top-level auth hook list.
[mcp.middleware]Top-level middleware hook list.
[env]Env vars pushed into os.environ before any heavy import runs. Existing shell env vars are NEVER clobbered. Values support $VAR / ${VAR} substitution.
Auth and middleware hooks

Both [mcp.auth] and [mcp.middleware] accept a hooks list of module:attr entry points. Each hook is a 2-arg async function async def hook(request, call_next) and is wrapped as a Middleware(BaseHTTPMiddleware, dispatch=fn) on the MCP server's ASGI stack.

toml
[mcp.auth]
hooks = ["my_pkg.auth:bearer_token_check"]
[mcp.middleware]
hooks = ["my_pkg.middleware:rate_limit", "my_pkg.middleware:request_logger"]

Auth hooks register before middleware hooks; within each list, registration order matches TOML order. Per-spec hooks (under [mcp.spec.NAME.auth] / [mcp.spec.NAME.middleware]) are scoped to that spec's mounted sub-app. The top-level hooks wrap the HTTP transports (streamable-http, sse); the stdio transport has no HTTP stack, so they do not run there.

Env injection
toml
[env]
OPENBB_MCP_HOST = "0.0.0.0"
# Values support shell-style $VAR / ${VAR} substitution.
OPENBB_GITHUB_TOKEN = "$GITHUB_TOKEN"

Useful in containers to inject OPENBB_* keys without shell exports. Any key already present in the real environment is preserved.


Configuration Precedence

Settings are resolved in this order (highest priority first):

  1. CLI arguments — command-line flags
  2. `[mcp]` table of the `openbb.toml` cascade — applied like CLI flags; --config-file PATH > project openbb.toml > user-global ~/.openbb_platform/openbb.toml > [tool.openbb.mcp] in pyproject.toml
  3. Environment variables — OPENBB_MCP_ prefixed, including those set by [env]
  4. JSON settings file — ~/.openbb_platform/mcp_settings.json, written with the defaults on first run
  5. Defaults — built-in MCPSettings defaults
Config File Example

Create ~/.openbb_platform/mcp_settings.json:

json
{
"name": "My MCP Server",
"default_tool_categories": ["equity", "economy"],
"enable_tool_discovery": false,
"describe_responses": false,
"system_prompt_file": "/path/to/system_prompt.txt",
"server_prompts_file": "/path/to/prompts.json"
}
Environment Variables

All settings map to OPENBB_MCP_ prefixed environment variables:

OPENBB_MCP_NAME="My MCP Server"
OPENBB_MCP_DEFAULT_TOOL_CATEGORIES="equity,economy,crypto"
OPENBB_MCP_ENABLE_TOOL_DISCOVERY=true
OPENBB_MCP_SYSTEM_PROMPT_FILE="/path/to/prompt.txt"
OPENBB_MCP_SERVER_PROMPTS_FILE="/path/to/prompts.json"

Settings Reference

Server Identity
SettingEnv VarTypeDefault
nameOPENBB_MCP_NAMEstr"OpenBB MCP"
descriptionOPENBB_MCP_DESCRIPTIONstrAuto-generated
versionOPENBB_MCP_VERSION`str \None`None
instructionsOPENBB_MCP_INSTRUCTIONS`str \None`None (the system prompt, when one is loaded)
mask_error_detailsOPENBB_MCP_MASK_ERROR_DETAILS`bool \None`None
Tool Configuration
SettingEnv VarTypeDefault
default_tool_categoriesOPENBB_MCP_DEFAULT_TOOL_CATEGORIESlist[str]["all"]
allowed_tool_categoriesOPENBB_MCP_ALLOWED_TOOL_CATEGORIES`list[str] \None`None
enable_tool_discoveryOPENBB_MCP_ENABLE_TOOL_DISCOVERYboolfalse
enable_cli_toolsOPENBB_MCP_ENABLE_CLI_TOOLSbooltrue
list_page_sizeOPENBB_MCP_LIST_PAGE_SIZE`int \None`None
describe_responsesOPENBB_MCP_DESCRIBE_RESPONSESboolfalse
api_prefixOPENBB_MCP_API_PREFIX`str \None`None

enable_cli_tools registers the openbb-cli dispatcher tools when openbb-cli is installed. mask_error_details hides exception details from clients.

Prompt Configuration
SettingEnv VarTypeDefault
system_prompt_fileOPENBB_MCP_SYSTEM_PROMPT_FILE`str \None`None
server_prompts_fileOPENBB_MCP_SERVER_PROMPTS_FILE`str \None`None
default_skills_dirOPENBB_MCP_DEFAULT_SKILLS_DIR`str \None`Built-in skills dir
skills_reloadOPENBB_MCP_SKILLS_RELOADboolfalse
skills_providersOPENBB_MCP_SKILLS_PROVIDERS`list[str] \None`None
HTTP Transport
SettingEnv VarTypeDefault
uvicorn_configOPENBB_MCP_UVICORN_CONFIGdict{"host": "127.0.0.1", "port": "8001"}
httpx_client_kwargsOPENBB_MCP_HTTPX_CLIENT_KWARGSdict{}

httpx_client_kwargs configures the httpx client that sends tool calls to the API (headers, timeout, TLS verification).

Duplicate Handling
SettingEnv VarTypeDefault
on_duplicateOPENBB_MCP_ON_DUPLICATE`str \None`None

Options: "warn", "error", "replace", "ignore"

Module Exclusion
SettingEnv VarTypeDefault
module_exclusion_mapOPENBB_MCP_MODULE_EXCLUSION_MAP`dict \None`None

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
73,706
Repository forks
7,633
7-day trend score
56

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/openbq-org/openbb/configure-mcp-server/badge)](https://verified-skill.com/skills/openbq-org/openbb/configure-mcp-server)

Something wrong with this skill or its page? Tell us.