You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarify user-facing role (precedence?) of btw vs mcptools #116
Apologies for the spate of issues, but I'm prepping an internal workshop on R-based agentic tools... and, in so doing, encountering issues that I'll need to have an informed answer for.
With the impending (hopefully!) submission of btw to CRAN, I'm wondering if you could offer guidance on which of mcptools or btw end-users should typically be using to interact with their R sessions?
My current understanding is that mcptools has moved towards being a low-level infra package and that btw now provides the main user-facing functionality. So, the basic workflow is (1) add the btw MCP server to your mcp.json
and then (2) enable access to your session with btw::btw_mcp_session().
That seems reasonable to me... BUT I've also seen official guidance that inverts this relationship. For example, this (admittedly slightly older) blog post suggests that we should provision the btw tools through mcptools::mcp_server():
before calling mcptools::mcp_session() to establish the session connection.
I can imagine the answer being that both approaches are valid and that it doesn't matter much in the end. But some clarity from the dev perspective about the precedence and ordering of these two packages would be appreciated.
Cheers and thanks again for working on these extremely helpful set of tools!
P.S. I guess another way of asking my question is: Do I lose anything (code injection?, etc.) by going through btw::btw_mcp_server() -> btw::btw_mcp_session(), rather than mcptools::mcp_session() -> mcptools::mcp_server(tools = btw::btw_tools())?
I think you've pretty much nailed the situation and historical context! We recommend using btw_mcp_server() if your goal is to quickly set up an MCP server from R loaded up with all of btw's tools. You can still reach down to mcptools if you want, but even then you can also customize the attached tools via the tools argument of btw_mcp_server().
So, in summary, the goal is that btw can be the user-facing front door to all of its tools and the many ways they can be used. And those who need to can always reach down to deeper layers as needed.
Activity
gadenbuie commentedon Oct 23, 2025
I think you've pretty much nailed the situation and historical context! We recommend using
btw_mcp_server()if your goal is to quickly set up an MCP server from R loaded up with all of btw's tools. You can still reach down to mcptools if you want, but even then you can also customize the attached tools via thetoolsargument ofbtw_mcp_server().So, in summary, the goal is that btw can be the user-facing front door to all of its tools and the many ways they can be used. And those who need to can always reach down to deeper layers as needed.
grantmcdermott commentedon Oct 23, 2025
Awesome. Thanks for confirming @gadenbuie!