setup-mcp
Configure scan-mcp MCP server in Claude Code's global configuration. Use when user wants to setup, configure, initialize, enable, or install the scan-mcp MCP server. Runs preflight checks for prerequisites (Node 22+, SANE tools, tiffcp), helps install missing dependencies, and adds server configuration with user-specified INBOX_DIR.
When & Why to Use This Skill
This Claude skill automates the end-to-end setup and configuration of the scan-mcp MCP server within Claude Code. It streamlines the integration of document scanning capabilities by performing automated preflight checks for system dependencies (like SANE and TIFF tools), guiding users through prerequisite installations, and programmatically updating global configuration files to enable seamless scanner control.
Use Cases
- Automating the initial installation and environment configuration of the scan-mcp server for Claude Code users.
- Performing system readiness audits to identify and resolve missing dependencies like Node.js, SANE utilities, and image processing tools.
- Programmatically managing Claude Code's global config.json to register new MCP servers without manual JSON editing.
- Standardizing document scanning workflows by configuring custom INBOX_DIR paths and environment variables across different development environments.
| name | setup-mcp |
|---|---|
| description | Configure scan-mcp MCP server in Claude Code's global configuration. Use when user wants to setup, configure, initialize, enable, or install the scan-mcp MCP server. Runs preflight checks for prerequisites (Node 22+, SANE tools, tiffcp), helps install missing dependencies, and adds server configuration with user-specified INBOX_DIR. |
scan-mcp MCP Server Setup
Configure the scan-mcp MCP server in Claude Code's global configuration to enable scanner control.
Setup Workflow
Step 1: Gather User Preferences
Ask user for:
- INBOX_DIR location (default:
~/Documents/scanned_documents/inbox) - Installation method: npx (recommended) or local
Step 2: Run Preflight Checks
npx -y scan-mcp --preflight-only
Expected on success: All checks passed!
If preflight fails: Parse output to identify missing dependencies, then guide user through installation (see PLATFORMS.md).
Common missing items:
- SANE utilities (
scanimage,scanadf) - TIFF tools (
tiffcpor ImageMagickconvert)
Step 3: Locate Claude Code MCP Configuration
Claude Code config location:
~/.config/claude/config.json(Linux/macOS)- Create if doesn't exist
Step 4: Add or Update Configuration
Configuration structure (npx - recommended):
{
"mcpServers": {
"scan": {
"command": "npx",
"args": ["-y", "scan-mcp"],
"env": {
"INBOX_DIR": "~/Documents/scanned_documents/inbox"
}
}
}
}
Important:
- If config.json doesn't exist: Create it with scan-mcp server entry
- If config.json exists but no mcpServers: Add mcpServers section
- If mcpServers exists: Add or update "scan" entry
- Preserve existing MCP server configurations
For local installation (advanced): See ADVANCED.md.
Step 5: Verify Configuration
- Inform user that Claude Code needs restart to pick up new configuration
- Suggest testing:
claude mcpor asking "scan this document" - If issues occur, suggest running
/doctor
Quick Example
User: "Setup scan-mcp"
Actions:
- Ask: "Where would you like scanned documents stored? (Default: ~/Documents/scanned_documents/inbox)"
- Run:
npx -y scan-mcp --preflight-only - If preflight passes:
- Locate/create
~/.config/claude/config.json - Add scan-mcp server configuration
- Confirm: "scan-mcp configured. Please restart Claude Code. Test with 'scan this document'."
- Locate/create
- If preflight fails:
- Identify missing dependencies
- Provide installation commands (see PLATFORMS.md)
- Re-run preflight after user installs
Reference Materials
- PLATFORMS.md — Platform-specific prerequisite installation
- SCANNERS.md — Scanner permissions and device setup
- TROUBLESHOOTING.md — Common setup issues and solutions
- ADVANCED.md — Local installation, multiple configs, advanced options