AI 클라이언트가 활성 세션에서 R 코드를 실행할 수 있게 하며, 제3자 MCP server를 R 채팅의 도구로 등록합니다.
다른 이름 posit-dev/mcptools
- 스타
- 206
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 10월 20일
- 라이선스
- —
mcptools MCP란?
mcptools은(는) MCP server입니다. AI 클라이언트가 활성 세션에서 R 코드를 실행할 수 있게 하며, 제3자 MCP server를 R 채팅의 도구로 등록합니다.
프로젝트 README에서 생성된 요약
mcptools MCP server 정보
mcptools는 데이터 과학자와 개발자가 활성 AI 코딩 세션 내에서 R 코드를 직접 실행할 수 있도록 지원합니다. R에 Model Context Protocol을 구현함으로써, 이 패키지는 Claude Desktop, Claude Code, VS Code GitHub Copilot과 같은 AI 어시스턴트가 사용자의 실시간 R 환경과 상호작용할 수 있게 합니다. mcp_server 함수를 사용하여 R 함수를 도구로 노출하거나, mcp_session 함수를 사용하여 모델이 실행 중인 세션의 특정 변수 및 객체에 접근할 수 있도록 권한을 부여할 수 있습니다.
이 패키지는 서버 역할을 넘어 MCP 클라이언트로도 작동합니다. 이를 통해 GitHub, Confluence, Google Drive와 같은 제3자 MCP server를 R 기반 채팅 애플리케이션에 등록할 수 있습니다. ellmer 라이브러리와 함께 mcp_tools 함수를 사용하면 이러한 외부 도구를 shinychat 또는 querychat과 같은 앱에 통합하여, 다양한 데이터 소스를 R 기반 대화형 인터페이스로 가져올 수 있습니다.
활용 사례
- 1실시간 R 세션 데이터 쿼리AI 어시스턴트에게 현재 대화형 R 세션에 로드된 데이터 프레임에서 특정 값이나 요약 통계량을 찾아달라고 요청하세요.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
구성
GITHUB_PERSONAL_ACCESS_TOKEN
| 이름 | 설명 | 유형 |
|---|---|---|
| GITHUB_PERSONAL_ACCESS_TOKEN | — |
자동 검사
2026년 11월 13일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능posit-dev/mcptools is public and reachablegithub.com/posit-dev/mcptools ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)No license결함 발견
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-10-20github.com/posit-dev/mcptools ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기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")
You can install the development version of mcptools like so:
pak::pak("posit-dev/mcptools")
R as an MCP server
mcptools can be hooked up to any application that supports MCP. For
example, to use with Claude Desktop, you might paste the following in
your Claude Desktop configuration (on macOS, at
~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"r-mcptools": {
"command": "Rscript",
"args": ["-e", "mcptools::mcp_server()"]
}
}
}
Or, to use with Claude Code, you might type in a terminal:
claude mcp add -s "user" r-mcptools -- Rscript -e "mcptools::mcp_server()"
Then, if you’d like models to access variables in specific R sessions,
call mcptools::mcp_session() in those sessions. (You might include a
call to this function in your .Rprofile, perhaps using
usethis::edit_r_profile(), to automatically register every session you
start up.)
To deploy an HTTP MCP server to Posit Connect, add a _server.yml file
with engine: mcptools and a tools file:
engine: mcptools
tools: tools.R
Deploy the directory as an R API and mark it as MCP content:
rsconnect::deployAPI(".", contentCategory = "mcp")
If the content URL is https://connect.example.com/content/abc123/, use
https://connect.example.com/content/abc123/mcp as the MCP endpoint.
If you cannot set contentCategory = "mcp" during deployment, set the
MCP category in Connect after deploying and set minimum processes to at
least 1.
R as an MCP client
mcptools uses the Claude Desktop configuration file format to register third-party MCP servers, as most MCP servers provide setup instructions for Claude Desktop in their documentation. For example, here’s what the official GitHub MCP server configuration would look like:
{
"mcpServers": {
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
}
}
}
}
Once the configuration file has been created (by default, mcptools will
look to file.path("~", ".config", "mcptools", "config.json")),
mcp_tools() will return a list of ellmer tools which you can pass
directly to the $set_tools() method from ellmer:
ch <- ellmer::chat_anthropic()
ch$set_tools(mcp_tools())
ch$chat("What issues are open on posit-dev/mcptools?")
Example
In Claude Desktop, I’ll write the following:
“From what year is the earliest recorded sample in the
foresteddata in my Positron session?”
Without mcptools, Claude couldn’t get far here; by default, it can’t run R code and doesn’t have any way to “speak to” my interactive R sessions.
Using the package, the model asks to describe the data frame using a structure that will show summary statistics from the data. mcptools will appropriately route the request to the open Positron session, forwarding the results back to the model for it to situate in a response.
mcptools MCP 질문
Claude Desktop에서 제 세션의 R 코드를 실행할 수 있나요?
네. mcptools를 MCP server로 설정하면 Claude Desktop, Claude Code, VS Code Copilot과 같은 도구들이 현재 실행 중인 세션에서 R 코드를 실행할 수 있습니다.
R에 mcptools를 어떻게 설치하나요?
CRAN에서 install.packages("mcptools")로 출시 버전을 설치하거나, GitHub에서 pak::pak("posit-dev/mcptools")로 개발 버전을 설치할 수 있습니다.
mcptools를 Claude Desktop에 어떻게 연결하나요?
Claude Desktop 설정 파일에 서버 명령어로 Rscript -e "mcptools::mcp_server()"를 실행하는 항목을 추가하세요.
R에서 제3자 MCP server를 도구로 사용할 수 있나요?
네. mcptools는 Claude Desktop 설정 형식을 사용하여 제3자 MCP server를 등록하며, mcp_tools()는 채팅의 $set_tools() 메서드에 전달할 수 있는 ellmer 도구를 반환합니다.
mcptools MCP server를 Posit Connect에 배포할 수 있나요?
네. engine: mcptools와 도구 파일이 포함된 _server.yml을 추가하고, 해당 디렉토리를 R API로 배포한 뒤 MCP 콘텐츠로 지정하세요.