Skip to content

Add MCP tool group registration APIs - #8701

Draft
UvuvDev wants to merge 2 commits into
devfrom
mcp_user_tool_groups
Draft

UvuvDev wants to merge 2 commits into
devfrom
mcp_user_tool_groups

Conversation

@UvuvDev

@UvuvDev UvuvDev commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Add registered MCP tool group objects and tool membership to the C, C++, Python, and Rust APIs. Groups provide a name, title, description, default state, and queries for their current user setting. Tools retain their group object; registrations without a group use other.

Add a group handle to BNMcpToolDefinition and bump the core ABI to 193. C++/Python/Rust group registration defaults to enabled; C callers set BNMcpToolGroupDefinition.enabledByDefault explicitly. Update the existing MCP documentation to describe per-call binary handles and user-controlled groups.

The two commits separate the API implementation and documentation from Rust group tests. The implementation commit also corrects an existing Rust test's stale binary error code.

Validation: 14 Rust tests and 24 Python tests passed against the companion core, along with all 86 native MCP tests. No debugger changes or dependencies are included.

Companion core implementation: https://github.com/Vector35/binaryninja/pull/2187.

@UvuvDev
UvuvDev force-pushed the mcp_user_tool_groups branch 2 times, most recently from 0b79428 to 13e05e2 Compare October 30, 2026 05:58

@bdash bdash left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust support seems to have been missed.

Comment thread binaryninjacore.h Resolved
Comment thread binaryninjacore.h Resolved
Comment thread mcp.h Resolved
Comment thread mcp.cpp Resolved
Comment thread python/mcp.py Outdated


def register_group(name: str, title: str, description: str, *, default_enabled: bool = True) -> None:
"""Register an MCP tool group and its user exposure setting."""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"user exposure setting" is strange phrasing.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to go with "Register an MCP tool group and its call permissions." Let me know if you have a different opinion on that

Comment thread binaryninjacore.h Resolved
@UvuvDev
UvuvDev force-pushed the mcp_user_tool_groups branch from 13e05e2 to 2a0695d Compare November 3, 2026 09:28
@UvuvDev
UvuvDev requested a review from bdash November 3, 2026 10:19
@UvuvDev
UvuvDev force-pushed the mcp_user_tool_groups branch from 2a0695d to 2dbba9b Compare November 3, 2026 10:41

This branch has not been deployed

No deployments
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