Enables R to function as both a server and client for the Model Context Protocol, allowing AI tools to interact with R sessions and R applications to access external contexts.
Mcptools provides a robust implementation of the Model Context Protocol in R, bridging the gap between R environments and AI-powered tools. It allows R to act as an MCP server, enabling AI applications like Claude Desktop or VS Code GitHub Copilot to execute R code within your active R sessions, leverage installed packages, and access session-specific data to answer questions or generate code. Conversely, mcptools also empowers R as an MCP client, allowing R-based chat applications such as shinychat or querychat to seamlessly integrate with and draw context from third-party MCP servers, enhancing their capabilities with external information.