返回技能列表

configure-putior-mcp

pjt222
更新于 2 days ago
7 次查看
17
2
17
在 GitHub 上查看
设计aimcpautomationdesign

关于

This skill configures the putior MCP server to expose 16 workflow visualization tools to AI assistants like Claude. It covers setup for Claude Code and Claude Desktop, including dependency installation and tool verification. Use it when enabling AI assistants to interactively annotate and visualize workflows or when integrating putior MCP into a new development environment.

快速安装

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-putior-mcp

在 Claude Code 中复制并粘贴此命令以安装该技能

技能文档

Configure putior MCP Server

Set up putior MCP server → AI assistants (Claude Code, Claude Desktop) can directly call workflow annotation + diagram gen tools.

Use When

  • Enable AI assistants to interactively annotate + visualize workflows
  • Set up new dev env w/ putior MCP integration
  • Post-install putior → want AI-assisted workflow docs
  • Configure agent-to-agent comm via ACP for automated pipelines

In

  • Required: putior installed (see install-putior)
  • Required: Target client: Claude Code, Claude Desktop, or both
  • Optional: Configure ACP server too (default: no)
  • Optional: Custom host/port for ACP server (default: localhost:8080)

Do

Step 1: Install MCP Dependencies

Install req'd pkgs for MCP server functionality.

# Required: MCP framework
remotes::install_github("posit-dev/mcptools")

# Required: Tool definition framework
install.packages("ellmer")

# Verify both load
library(mcptools)
library(ellmer)

Both pkgs install + load w/o errs.

If err: mcptools requires remotes pkg. Install first: install.packages("remotes"). GitHub rate-limits → configure GITHUB_PAT in ~/.Renviron (add line GITHUB_PAT=your_token_here + restart R). Do NOT paste tokens into shell cmds or commit to version control.

Step 2: Configure Claude Code (WSL/Linux/macOS)

Add putior MCP server to Claude Code's config.

# One-line setup
claude mcp add putior -- Rscript -e "putior::putior_mcp_server()"

For WSL w/ Windows R:

claude mcp add putior -- "/mnt/c/Program Files/R/R-4.5.2/bin/Rscript.exe" -e "putior::putior_mcp_server()"

Verify config:

claude mcp list
claude mcp get putior

putior appears in MCP server list w/ status "configured".

If err: Claude Code not in PATH → add: export PATH="$HOME/.claude/local/node_modules/.bin:$PATH". Rscript path wrong → locate R w/ which Rscript or ls "/mnt/c/Program Files/R/".

Step 3: Configure Claude Desktop (Windows)

Add putior to Claude Desktop's MCP config file.

Edit %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "putior": {
      "command": "C:\\PROGRA~1\\R\\R-45~1.0\\bin\\x64\\Rscript.exe",
      "args": ["-e", "putior::putior_mcp_server()"]
    }
  }
}

Or w/ full path:

{
  "mcpServers": {
    "putior": {
      "command": "C:\\Program Files\\R\\R-4.5.2\\bin\\x64\\Rscript.exe",
      "args": ["-e", "putior::putior_mcp_server()"]
    }
  }
}

Restart Claude Desktop post-edit.

Claude Desktop shows putior in MCP server list. Tools become avail in conversation.

If err: Valid. JSON syntax w/ JSON linter. Check R path exists. Use 8.3 short names (PROGRA~1, R-45~1.0) if spaces in paths cause issues.

Step 4: Verify All 16 Tools

Test all MCP tools accessible + functional.

# Get tool definitions
tools <- putior::putior_mcp_tools()
cat(sprintf("Total tools: %d\n", length(tools)))

# List tool names
vapply(tools, function(t) t$name, character(1))

16 tools organized by category:

Core Workflow (5):

  • put — Scan files for PUT annotations (supports exclude param for regex-based file filtering)
  • put_diagram — Generate Mermaid diagrams
  • put_auto — Auto-detect workflow from code (supports exclude param)
  • put_generate — Gen annotation suggestions (supports exclude param)
  • put_merge — Merge manual + auto annotations (supports exclude param)

Reference/Discovery (7):

  • get_comment_prefix — Get comment prefix for extension
  • get_supported_extensions — List supported extensions
  • list_supported_languages — List supported languages
  • get_detection_patterns — Get auto-detection patterns
  • get_diagram_themes — List available themes
  • putior_guide — AI assistant docs
  • putior_help — Quick reference help

Utilities (3):

  • is_valid_put_annotation — Valid. annotation syntax
  • split_file_list — Parse file lists
  • ext_to_language — Extension to language name

Configuration (1):

  • set_putior_log_level — Configure logging verbosity

Important: Custom palettes can't be used through MCP. palette param on put_diagram accepts putior_theme R object created by put_theme(). MCP comms via JSON → R objects like putior_theme can't be serialized across MCP boundary. Calling put_diagram through MCP → use string-based theme param (e.g., theme = "viridis") instead. Custom palettes → call put_theme() + put_diagram(palette = ...) directly in R session.

Test core tools from Claude Code:

Use the putior_help tool to see available commands
Use the put tool to scan ./R/ for annotations
Use the put_diagram tool to generate a diagram

All 16 tools listed. Core tools return expected results when called w/ valid in.

If err: Tools missing → check putior ver current: packageVersion("putior"). Older vers may have fewer tools. Update w/ remotes::install_github("pjt222/putior").

Step 5: Configure ACP Server (Optional)

Set up ACP (Agent Comm Protocol) server for agent-to-agent comm.

# Install ACP dependency
install.packages("plumber2")

# Start ACP server (blocks — run in a separate R session or background)
putior::putior_acp_server()

# Custom host/port
putior::putior_acp_server(host = "0.0.0.0", port = 9000)

Test ACP endpoints:

# Discover agent
curl http://localhost:8080/agents

# Execute a scan
curl -X POST http://localhost:8080/runs \
  -H "Content-Type: application/json" \
  -d '{"input": [{"role": "user", "parts": [{"content": "scan ./R/"}]}]}'

# Generate diagram
curl -X POST http://localhost:8080/runs \
  -H "Content-Type: application/json" \
  -d '{"input": [{"role": "user", "parts": [{"content": "generate diagram for ./R/"}]}]}'

ACP server starts on config'd port. /agents returns putior agent manifest. /runs accepts natural language reqs + returns workflow results.

If err: Port 8080 in use → specify diff port. plumber2 not installed → server fn will print helpful err msg suggesting install.

Check

  • putior::putior_mcp_tools() exposes core tools (put, put_diagram, put_auto, put_generate, put_merge) + returns ~16 tools for current ver
  • Claude Code: claude mcp list shows putior configured
  • Claude Code: putior_help tool returns help text when invoked
  • Claude Desktop: putior appears in MCP server list post-restart
  • Core tools (put, put_diagram, put_auto) execute w/o errs
  • (Optional) ACP server responds to curl http://localhost:8080/agents

Traps

  • mcptools not installed: MCP server requires mcptools (from GitHub) + ellmer (from CRAN). Both must be installed. putior checks + provides helpful msgs if missing.
  • Wrong R path in Claude Desktop: Windows paths need escaping in JSON (\\). Use 8.3 short names to avoid spaces: C:\\PROGRA~1\\R\\R-45~1.0\\bin\\x64\\Rscript.exe.
  • Forget to restart: Claude Desktop must be restarted post-config edit. Claude Code picks up changes on next session start.
  • renv isolation: putior installed in renv library but Claude Code/Desktop launches R w/o renv → pkgs not found. Ensure mcptools + ellmer installed in global library or configure renv activation in MCP server cmd.
  • Port conflicts for ACP: Default ACP port (8080) commonly used. Check w/ lsof -i :8080 or netstat -tlnp | grep 8080 before starting.
  • Include only specific tools: Expose subset of tools → use putior_mcp_tools(include = c("put", "put_diagram")) when building custom MCP server wrappers.
  • Custom palettes via MCP: palette param on put_diagram requires putior_theme R object (created by put_theme()), can't be serialized through MCP's JSON interface. Use built-in theme param string for MCP calls. Custom palettes → use R directly.

  • install-putior — prerequisite: putior + optional deps must be installed
  • configure-mcp-server — general MCP server config for Claude Code/Desktop
  • troubleshoot-mcp-connection — diagnose connection issues if tools don't appear
  • build-custom-mcp-server — build custom MCP servers wrapping putior tools
  • analyze-codebase-workflow — use MCP tools interactively for codebase analysis

GitHub 仓库

pjt222/agent-almanac
路径: i18n/caveman-ultra/skills/configure-putior-mcp
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

相关推荐技能

executing-plans

设计

该Skill用于当开发者提供完整实施计划时,以受控批次方式执行代码实现。它会先审阅计划并提出疑问,然后分批次执行任务(默认每批3个任务),并在批次间暂停等待审查。关键特性包括分批次执行、内置检查点和架构师审查机制,确保复杂系统实现的可控性。

查看技能

requesting-code-review

设计

该Skill可在完成任务、实现主要功能或合并代码前自动调度代码审查子代理,确保实现符合需求和计划。它支持通过指定git SHA范围进行精准的代码变更审查,帮助开发者在关键节点及时发现潜在问题。核心原则是"早审查、勤审查",适用于开发流程的各个关键阶段。

查看技能

connect-mcp-server

设计

这个Skill指导开发者如何将MCP服务器连接到Claude Code,支持HTTP、stdio和SSE三种传输协议。它涵盖了从安装配置到认证安全的完整流程,适用于集成GitHub、Notion、数据库等外部服务。当开发者需要添加集成、配置外部工具或提及MCP相关功能时,这个Skill能提供实用的操作指南。

查看技能

web-cli-teleport

设计

该Skill帮助开发者根据任务特性选择Claude Code的Web或CLI界面,并指导如何在两种环境间无缝迁移会话。它能分析任务复杂度、迭代需求等要素,推荐最优工作界面和工作流。关键特性包括会话状态管理、环境切换指导和上下文优化建议。

查看技能