Skip to content

feat(mcp): add FastMCP search and CodeMode on top of skills#7401

Closed
MagnusS0 wants to merge 3 commits into
OpenBB-finance:feature/mcp-skillsfrom
MagnusS0:feature/mcp-v3-on-skills
Closed

feat(mcp): add FastMCP search and CodeMode on top of skills#7401
MagnusS0 wants to merge 3 commits into
OpenBB-finance:feature/mcp-skillsfrom
MagnusS0:feature/mcp-v3-on-skills

Conversation

@MagnusS0
Copy link
Copy Markdown
Contributor

@MagnusS0 MagnusS0 commented Mar 8, 2026

OpenBB MCP - FastMCP search and CodeMode on top of skills

This PR integrates the transform-based search discovery and Code Mode work from #7385 onto the skills-based FastMCP v3 branch from #7380.

Target/base for this PR is feature/mcp-skills, so this branch should be read as:

Concretely, this merges the two lines of work into a single branch:

What changed

  • Integrated the transform-based search discovery path from refactor(mcp_server): migrate to FastMCP v3 and add OpenBB Code Mode #7385 into the feature/mcp-skills branch.
  • Removed the legacy CategoryIndex/toggle discovery path:
  • Added OpenBB-specific BM25 discovery transforms:
    • list_categories
    • search
    • get_schema
    • call_tool in standalone discovery mode
  • Added OpenBB Code Mode integration:
    • execute for sandboxed chained tool calls via python-monty
    • OpenBB-aware search/category/provider filtering
    • compact markdown discovery output to reduce token usage
  • Kept the skills/provider infrastructure from [Feature] openbb-mcp-server: Refactor for FastMCP V3 #7380:
  • Switched visibility tracking to FastMCP v3 keys= enable/disable semantics.
  • Added config surface for Code Mode and tag filtering:
    • enable_code_mode
    • code_mode_*
    • include_tags
    • exclude_tags
  • Updated the README to document transform-based discovery, Code Mode, and the current CLI/settings surface.
  • Updated tests to reflect the new behavior and removed CategoryIndex-specific tests.
  • Moved the FastMCP requirement to the public release line: fastmcp>=3.1.0,<4.

Checklist

MagnusS0 and others added 3 commits March 8, 2026 00:33
Integrates FastMCP BM25SearchTransform + CodeMode discovery onto the
upstream feature/mcp-skills branch, which adds the skills infrastructure.

Key changes:
- REMOVE: CategoryIndex model + 5 admin tools (available_categories,
  available_tools, activate_tools, deactivate_tools, activate_category)
- ADD: utils/code_mode.py with BM25SearchTransform and CodeMode transforms
- ADD: _apply_discovery_transforms() — CodeMode or BM25 search depending
  on enable_code_mode / enable_tool_discovery settings
- ADD: Code mode settings fields (enable_code_mode, code_mode_max_*,
  code_mode_search_max_results, code_mode_search_output_format)
- ADD: include_tags / exclude_tags fields for tag-based visibility
- ADD: Provider interface integration (dynamic provider tags on tools)
- ADD: _get_default_openbb_app() lazy loader
- KEEP: All skills infrastructure (SkillsDirectoryProvider, vendor
  providers, install_skill tool, SKILL.md files)
- UPDATE: fastmcp pin to >=3.1.0,<4 (public release)
- UPDATE: mcp.enable/disable to use keys= instead of names=
- UPDATE: Tests — remove CategoryIndex patches, add transform/code_mode tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@deeleeramone deeleeramone deleted the branch OpenBB-finance:feature/mcp-skills March 18, 2026 20:41
@deeleeramone
Copy link
Copy Markdown
Contributor

@MagnusS0, can you please reopen this pointing to /develop? Merging the parent closed this because the upstream branch was deleted on merge. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants