MCP HubMCP Hub
스킬 목록으로 돌아가기

configure-mcp-server

pjt222
업데이트됨 Yesterday
2 조회
17
2
17
GitHub에서 보기
개발aimcp

정보

이 스킬은 Claude Code와 Claude Desktop용 MCP 서버를 구성하며, mcptools 설정, Hugging Face 통합, WSL 경로 처리를 다룹니다. 개발자가 mcptools를 통해 Claude를 R에 연결하고 MCP 연결 문제를 해결하는 데 도움을 줍니다. 다중 클라이언트 구성을 설정하거나 원격 MCP 서버를 추가할 때 사용하세요.

빠른 설치

Claude Code

추천
기본
npx skills add pjt222/agent-almanac -a claude-code
플러그인 명령대체
/plugin add https://github.com/pjt222/agent-almanac
Git 클론대체
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/configure-mcp-server

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

Configure MCP Server

Set up MCP server connections for Claude Code (WSL) and Claude Desktop (Windows).

When to Use

  • Setting up Claude Code to connect to R via mcptools
  • Configuring Claude Desktop with MCP servers
  • Adding Hugging Face or other remote MCP servers
  • Troubleshooting MCP connectivity between tools

Inputs

  • Required: MCP server type (mcptools, Hugging Face, custom)
  • Required: Client (Claude Code, Claude Desktop, or both)
  • Optional: Authentication tokens
  • Optional: Custom server implementation

Procedure

Step 1: Install MCP Server Packages

For R (mcptools):

install.packages("remotes")
remotes::install_github("posit-dev/mcptools")

For Hugging Face:

npm install -g mcp-remote

Got: mcptools installs from GitHub and loads in R without errors. mcp-remote is available globally via which mcp-remote or npm list -g mcp-remote.

If fail: For mcptools, ensure remotes is installed first. If GitHub rate-limits the install, set a GITHUB_PAT in ~/.Renviron. For mcp-remote, verify Node.js and npm are installed and on PATH.

Step 2: Configure Claude Code (WSL)

R mcptools server:

claude mcp add r-mcptools stdio \
  "/mnt/c/Program Files/R/R-4.5.0/bin/Rscript.exe" \
  -- -e "mcptools::mcp_server()"

Hugging Face server:

claude mcp add hf-mcp-server \
  -e HF_TOKEN=your_token_here \
  -- mcp-remote https://huggingface.co/mcp

Verify configuration:

claude mcp list
claude mcp get r-mcptools

Got: claude mcp list shows both r-mcptools and hf-mcp-server (or whichever servers were added). claude mcp get r-mcptools displays the correct command and arguments.

If fail: If the server does not appear in the list, verify ~/.claude.json contains the correct entry. If the claude command is not found, add it to PATH: export PATH="$HOME/.claude/local/node_modules/.bin:$PATH".

Step 3: Configure Claude Desktop (Windows)

Edit %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "r-mcptools": {
      "command": "C:\\PROGRA~1\\R\\R-45~1.0\\bin\\x64\\Rscript.exe",
      "args": ["-e", "mcptools::mcp_server()"]
    },
    "hf-mcp-server": {
      "command": "mcp-remote",
      "args": ["https://huggingface.co/mcp"],
      "env": {
        "HF_TOKEN": "your_token_here"
      }
    }
  }
}

Important: Use 8.3 short paths for Windows directories with spaces (PROGRA~1 not Program Files). Use environment variables for tokens, not --header arguments.

Got: The JSON config file at %APPDATA%\Claude\claude_desktop_config.json is valid JSON with the correct server entries. Claude Desktop shows MCP server indicators after restart.

If fail: Validate the JSON with a linter (e.g., jq . < config.json). Use 8.3 short paths (PROGRA~1) if Windows path spaces cause parsing errors. Ensure Claude Desktop is fully restarted (not merely minimized).

Step 4: Configure R Session for MCP

Add to project .Rprofile:

if (requireNamespace("mcptools", quietly = TRUE)) {
  mcptools::mcp_session()
}

This starts the MCP session automatically when opening the project in RStudio.

Got: The .Rprofile file conditionally starts mcptools::mcp_session() when the project is opened in RStudio, making MCP tools available automatically.

If fail: If mcptools is not found at session start, verify it is installed in the library that RStudio uses (check .libPaths()). If using renv, ensure mcptools is in the renv library.

Step 5: Verify Connections

Test R MCP from WSL:

"/mnt/c/Program Files/R/R-4.5.0/bin/Rscript.exe" -e "mcptools::mcp_server()"

Test from within Claude Code:

Start Claude Code and use MCP tools — they should appear in the tool list.

Test Claude Desktop:

Restart Claude Desktop after configuration changes. Check for MCP server indicators in the UI.

Got: Running Rscript with mcptools::mcp_server() produces output without errors. MCP tools appear in the Claude Code tool list during an active session. Claude Desktop shows server status after restart.

If fail: If the Rscript command fails, check the full path is correct (ls "/mnt/c/Program Files/R/" to verify R version). If tools don't appear in Claude Code, restart the session. For Claude Desktop, check firewall settings.

Step 6: Multi-Server Configuration

Both Claude Code and Claude Desktop support multiple MCP servers simultaneously:

# Claude Code: add multiple servers
claude mcp add r-mcptools stdio "/path/to/Rscript.exe" -- -e "mcptools::mcp_server()"
claude mcp add hf-mcp-server -e HF_TOKEN=token -- mcp-remote https://huggingface.co/mcp
claude mcp add custom-server stdio "/path/to/server" -- --port 3001

Got: Multiple MCP servers configured and accessible simultaneously. claude mcp list shows all servers. Each server's tools are available in the same Claude Code session.

If fail: If servers conflict, check that each has a unique name in the configuration. If one server blocks others, verify servers use non-blocking I/O (stdio transport handles this automatically).

Validation

  • claude mcp list shows all configured servers
  • R MCP server responds to tool calls
  • Hugging Face MCP server authenticates and responds
  • Both Claude Code and Claude Desktop can connect (if both configured)
  • MCP tools appear in the tool list during sessions

Pitfalls

  • Windows path spaces: Use 8.3 short names or quote paths correctly. Different tools parse paths differently.
  • Token in command args: On Windows, --header "Authorization: Bearer token" fails due to parsing. Use environment variables instead.
  • Confusing Claude Code and Claude Desktop configs: These are separate tools with separate config files (~/.claude.json vs %APPDATA%\Claude\)
  • npx vs global install: npx mcp-remote may fail in Claude Desktop context. Install globally with npm install -g mcp-remote.
  • mcptools version: Ensure mcptools is up to date. It requires the ellmer package as a dependency.

Related Skills

  • build-custom-mcp-server - creating your own MCP server
  • troubleshoot-mcp-connection - debugging connection issues
  • setup-wsl-dev-environment - WSL setup prerequisite

GitHub 저장소

pjt222/agent-almanac
경로: i18n/caveman-lite/skills/configure-mcp-server
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

연관 스킬

subagent-driven-development

개발

이 스킬은 각 독립적인 작업마다 새로운 하위 에이전트를 배치하고 작업 사이에 코드 리뷰를 진행하여 구현 계획을 실행합니다. 이 리뷰 프로세스를 통해 품질 게이트를 유지하면서 빠른 반복 작업을 가능하게 합니다. 동일한 세션 내에서 대부분 독립적인 작업을 진행할 때 내장된 품질 검증과 함께 지속적인 진행을 보장하기 위해 사용하세요.

스킬 보기

qmd

개발

qmd는 BM25, 벡터 임베딩, 재순위화를 결합한 하이브리드 검색을 통해 로컬 파일을 색인화하고 검색할 수 있는 로컬 검색 및 색인화 CLI 도구입니다. 명령줄 사용과 Claude 통합을 위한 MCP(Model Context Protocol) 모드를 모두 지원합니다. 이 도구는 임베딩에 Ollama를 사용하고 색인을 로컬에 저장하여 터미널에서 직접 문서나 코드베이스를 검색하는 데 이상적입니다.

스킬 보기

mcporter

개발

mcporter 스킬은 개발자가 Claude에서 직접 Model Context Protocol(MCP) 서버를 관리하고 호출할 수 있도록 합니다. 이 스킬은 사용 가능한 서버를 나열하고, 인수를 사용해 해당 서버의 도구를 호출하며, 인증 및 데몬 생명주기를 처리하는 명령어를 제공합니다. 개발 워크플로우에서 MCP 서버 기능을 통합하고 테스트할 때 이 스킬을 사용하세요.

스킬 보기

adk-deployment-specialist

개발

이 스킬은 A2A 프로토콜을 사용하여 Vertex AI ADK 에이전트를 배포하고 오케스트레이션하며, AgentCard 검색, 작업 제출, 코드 실행 샌드박스 및 메모리 뱅크와 같은 지원 도구를 관리합니다. Python, Java 또는 Go 언어로 순차, 병렬 또는 루프 오케스트레이션 패턴을 갖춘 다중 에이전트 시스템 구축을 가능하게 합니다. Google Cloud에서 ADK 에이전트 배포 또는 에이전트 워크플로우 오케스트레이션을 요청받았을 때 사용하세요.

스킬 보기