
posit-dev/mcptools 是从 https://github.com/posit-dev/mcptools. 导入的 MCP 服务器候选
概览
posit-dev/mcptools 是从 https://github.com/posit-dev/mcptools. 导入的 MCP 服务器候选
概述(AI 翻译)
mcptools 实现了模型上下文 R语言中的协议。有两个方面 mcptools:
R 作为 MCP 服务器:
当配置使用 mcptools 和支持 MCP 的工具,如 Claude Desktop, Claude Code 和 VS Code GitHub Copilot 可以在会话中运行 R 代码 你有运行*来回答你的问题。虽然套餐支持 配置任意的R函数,你可能会对 顺便说一句,软件包集成支持 mcptools,提供了一套默认的工具,用于浏览 你安装的包文档,看看里面的对象 你的全局环境,并检索关于会话和 平台。
R 作为 MCP 客户端:
注册第三方MCP服务器 埃尔默聊天以整合更多内容 例如,ShinyChat 的上下文 以及QueryChat应用。
安装
通过以下方式安装CRAN的mcptools:
你可以像这样安装开发版的mcptools:
R 作为 MCP 服务器
mcptools 可以连接到任何支持 MCP 的应用程序。对于
例如,在Claude Desktop中使用时,你可以粘贴以下内容
你的Claude桌面配置(在macOS上,在
~/Library/Application Support/Claude/claude_desktop_config.json):
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
mcptools
mcptools implements the Model Context Protocol in R. There are two sides to mcptools:
R as an MCP server:
When configured with mcptools, MCP-enabled tools like Claude Desktop, Claude Code, and VS Code GitHub Copilot can run R code in the sessions you have running to answer your questions. While the package supports configuring arbitrary R functions, you may be interested in the btw package’s integrated support for mcptools, which provides a default set of tools to to peruse the documentation of packages you have installed, check out the objects in your global environment, and retrieve metadata about your session and platform.
R as an MCP client:
Register third-party MCP servers with ellmer chats to integrate additional context into e.g. shinychat and querychat apps.
Installation
Install mcptools from CRAN with:
install.packages("mcptools")
安装
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server配置
{
"mcpServers": {
"r-mcptools": {
"command": "Rscript",
"args": ["-e", "mcptools::mcp_server()"]
}
}
}