npx claudepluginhub pjt222/agent-almanacThis skill uses the workspace's default tool permissions.
---
Guides integration of Model Context Protocol (MCP) servers into Claude Code plugins via .mcp.json or plugin.json for external service tools, with scope management (local, project, user).
Handles Claude Code MCP integration: installs/manages servers (HTTP/SSE/stdio), scopes, enterprise configs, OAuth auth, resources/@mentions, prompts, limits, security; delegates to docs-management.
Share bugs, ideas, or general feedback.
Set up the putior MCP server so AI assistants (Claude Code, Claude Desktop) can directly call workflow annotation and diagram generation tools.
install-putior)Install the required packages 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)
Expected: Both packages install and load without errors.
On failure: mcptools requires remotes package. Install it first: install.packages("remotes"). If GitHub rate-limits, configure a GITHUB_PAT in ~/.Renviron (add the line GITHUB_PAT=your_token_here and restart R). Do not paste tokens into shell commands or commit them to version control.
Add the putior MCP server to Claude Code's configuration.
# One-line setup
claude mcp add putior -- Rscript -e "putior::putior_mcp_server()"
For WSL with Windows R:
claude mcp add putior -- "/mnt/c/Program Files/R/R-4.5.2/bin/Rscript.exe" -e "putior::putior_mcp_server()"
Verify the configuration:
claude mcp list
claude mcp get putior
Expected: putior appears in the MCP server list with status "configured".
On failure: If Claude Code is not in PATH, add it: export PATH="$HOME/.claude/local/node_modules/.bin:$PATH". If the Rscript path is wrong, locate R with which Rscript or ls "/mnt/c/Program Files/R/".
Add putior to Claude Desktop's MCP configuration 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 with the 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 after editing the configuration.
Expected: Claude Desktop shows putior in its MCP server list. Tools become available in conversation.
On failure: Validate JSON syntax with a JSON linter. Check that the R path exists. Use 8.3 short names (PROGRA~1, R-45~1.0) if spaces in paths cause issues.
Test that all MCP tools are accessible and 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))
The 16 tools organized by category:
Core Workflow (5):
put — Scan files for PUT annotations (supports exclude parameter for regex-based file filtering)put_diagram — Generate Mermaid diagramsput_auto — Auto-detect workflow from code (supports exclude parameter)put_generate — Generate annotation suggestions (supports exclude parameter)put_merge — Merge manual + auto annotations (supports exclude parameter)Reference/Discovery (7):
get_comment_prefix — Get comment prefix for extensionget_supported_extensions — List supported extensionslist_supported_languages — List supported languagesget_detection_patterns — Get auto-detection patternsget_diagram_themes — List available themesputior_guide — AI assistant documentationputior_help — Quick reference helpUtilities (3):
is_valid_put_annotation — Validate annotation syntaxsplit_file_list — Parse file listsext_to_language — Extension to language nameConfiguration (1):
set_putior_log_level — Configure logging verbosityImportant: Custom palettes cannot be used through MCP. The
paletteparameter onput_diagramaccepts aputior_themeR object created byput_theme(). Because MCP communicates via JSON, R objects likeputior_themecannot be serialized across the MCP boundary. When callingput_diagramthrough MCP, use the string-basedthemeparameter (e.g.,theme = "viridis") instead. For custom palettes, callput_theme()andput_diagram(palette = ...)directly in an 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
Expected: All 16 tools listed. Core tools return expected results when called with valid inputs.
On failure: If tools are missing, check that putior version is current: packageVersion("putior"). Older versions may have fewer tools. Update with remotes::install_github("pjt222/putior").
Set up the ACP (Agent Communication Protocol) server for agent-to-agent communication.
# 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/"}]}]}'
Expected: ACP server starts on the configured port. /agents returns the putior agent manifest. /runs accepts natural language requests and returns workflow results.
On failure: If port 8080 is in use, specify a different port. If plumber2 is not installed, the server function will print a helpful error message suggesting installation.
putior::putior_mcp_tools() exposes the core tools (put, put_diagram, put_auto, put_generate, put_merge) and returns ~16 tools for the current versionclaude mcp list shows putior configuredputior_help tool returns help text when invokedput, put_diagram, put_auto) execute without errorscurl http://localhost:8080/agentsmcptools (from GitHub) and ellmer (from CRAN). Both must be installed. putior checks and provides helpful messages if they're missing.\\). Use 8.3 short names to avoid spaces: C:\\PROGRA~1\\R\\R-45~1.0\\bin\\x64\\Rscript.exe.mcptools and ellmer are installed in the global library or configure renv activation in the MCP server command.lsof -i :8080 or netstat -tlnp | grep 8080 before starting.putior_mcp_tools(include = c("put", "put_diagram")) when building custom MCP server wrappers.palette parameter on put_diagram requires a putior_theme R object (created by put_theme()), which cannot be serialized through MCP's JSON interface. Use the built-in theme parameter string for MCP calls. For custom palettes, use R directly.install-putior — prerequisite: putior and optional deps must be installedconfigure-mcp-server — general MCP server configuration for Claude Code/Desktoptroubleshoot-mcp-connection — diagnose connection issues if tools don't appearbuild-custom-mcp-server — build custom MCP servers that wrap putior toolsanalyze-codebase-workflow — use MCP tools interactively for codebase analysis