PinViz MCP Server Installation Guide¶
This guide walks you through installing and configuring the PinViz MCP Server for use with MCP-compatible clients like Claude Desktop.
Prerequisites¶
- Python 3.10 or higher
- pip or uv package manager
- An MCP-compatible client (e.g., Claude Desktop, Cline, etc.)
Installation Methods¶
Method 1: Quick Install with Claude Desktop CLI¶
The fastest way to get started with Claude Desktop:
# Using uv (recommended)
uv tool install pinviz
claude mcp add pinviz pinviz-mcp
# OR using pip
pip install pinviz
claude mcp add pinviz pinviz-mcp
# Restart Claude Desktop
The claude mcp add command automatically configures the MCP server in your Claude Desktop settings.
Method 2: Manual Installation¶
Using uv (Recommended)¶
-
Install uv (if not already installed):
-
Install PinViz:
-
Verify the installation:
Then follow the Claude Desktop manual configuration steps below.
Using pip¶
-
Install PinViz:
-
Verify the installation:
You should see the MCP server help message.
Then follow the Claude Desktop manual configuration steps below.
Method 3: From source (For contributors)¶
- Clone the repository:
- Install dependencies:
- Test the MCP server:
Configuration for MCP Clients¶
Claude Desktop¶
Claude Desktop is Anthropic's desktop application that supports MCP servers.
macOS/Linux¶
- Locate the Claude Desktop config file:
# macOS
~/.config/claude/claude_desktop_config.json
# Linux
~/.config/claude/claude_desktop_config.json
- Edit the configuration file:
Add the following to your claude_desktop_config.json:
For pip installation:
For uv installation:
For source installation (development):
{
"mcpServers": {
"pinviz": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/PinViz/pi-diagrammer", "pinviz-mcp"]
}
}
}
- Restart Claude Desktop
Close and reopen Claude Desktop for the changes to take effect.
Windows¶
- Locate the Claude Desktop config file:
- Edit the configuration file:
Add the following to your claude_desktop_config.json:
For pip installation:
For uv installation:
- Restart Claude Desktop
GitHub Copilot (VS Code)¶
GitHub Copilot supports MCP servers through VS Code's Multi-Provider Chat feature.
Prerequisites¶
- VS Code version 1.90 or later
- GitHub Copilot extension installed and activated
- Python 3.10+ installed and available in PATH
Configuration¶
- Install PinViz (if not already installed):
-
Open VS Code Settings:
-
Press
Cmd+,(macOS) orCtrl+,(Windows/Linux) - Search for "mcp"
-
Or edit your
settings.jsondirectly:Cmd+Shift+P→ "Preferences: Open User Settings (JSON)" -
Add MCP Server Configuration:
Add the following to your VS Code settings.json:
For pip installation:
For uv installation:
{
"github.copilot.chat.mcp.servers": {
"pinviz": {
"command": "uv",
"args": ["run", "pinviz-mcp"]
}
}
}
For project-specific configuration (workspace settings):
Create .vscode/settings.json in your project root:
{
"github.copilot.chat.mcp.servers": {
"pinviz": {
"command": "uv",
"args": ["run", "--directory", "${workspaceFolder}", "pinviz-mcp"]
}
}
}
-
Reload VS Code Window:
-
Press
Cmd+Shift+P(macOS) orCtrl+Shift+P(Windows/Linux) - Type "Developer: Reload Window"
-
Press Enter
-
Verify in Copilot Chat:
Open Copilot Chat (click the chat icon in the sidebar) and try:
Using PinViz with GitHub Copilot¶
Once configured, you can interact with PinViz in VS Code's Copilot Chat:
- Generate diagrams:
@pinviz Connect BME280 and LED to Raspberry Pi 5 - Search devices:
@pinviz What I2C sensors are available? - Get device info:
@pinviz Show me the BME280 pinout - Device discovery:
@pinviz Parse device specs from this URL: [datasheet URL]
Other MCP Clients¶
For other MCP-compatible clients (e.g., Cline, Zed, custom implementations), refer to their documentation for configuring MCP servers. The general pattern is:
- Command:
pinviz-mcp(oruv run pinviz-mcp) - Transport: stdio (standard input/output)
- Protocol: MCP 1.0
Verifying the Installation¶
Test 1: Check MCP Server Communication¶
- Open Claude Desktop
- Start a new conversation
- Type: "List available Raspberry Pi devices"
- Claude should respond with a list of devices from the PinViz database
Test 2: Generate a Simple Diagram¶
- In Claude Desktop, type: "Connect a BME280 sensor to my Raspberry Pi"
- Claude should generate a wiring diagram showing the connections
Test 3: Use MCP Tools Directly¶
In Claude Desktop, you can inspect available MCP tools:
- Type: "What MCP tools are available?"
- Look for PinViz tools like:
list_devicesget_device_infogenerate_diagramsearch_devices_by_tagsparse_device_from_url
Troubleshooting¶
Issue: "Command not found: pinviz-mcp"¶
Solution: The installation directory is not in your PATH.
For pip users:
# Find where pip installed the script
pip show pinviz | grep Location
# Add to PATH or use full path in config
For uv users:
Use the full uv run command in your MCP client config.
Issue: Claude Desktop doesn't show PinViz tools¶
Solution: Check the Claude Desktop logs for errors.
macOS/Linux:
Windows:
Common issues:
- Python version too old (need 3.10+)
- Missing dependencies (run pip install pinviz again)
- Incorrect path in config file
Issue: "Module not found" errors¶
Solution: Ensure all dependencies are installed:
Or with uv:
Issue: MCP server starts but tools fail¶
Solution: Check that the device database is accessible:
python -c "from pinviz.mcp.device_manager import DeviceManager; dm = DeviceManager(); print(f'Loaded {len(dm.devices)} devices')"
You should see "Loaded 25 devices" (or more if you've added custom devices).
Environment Variables¶
The PinViz MCP server supports the following environment variables:
ANTHROPIC_API_KEY: Required for natural language parsing and URL-based device parsing- Get your API key from: https://console.anthropic.com/
- Set in your shell config or
.envfile
Example:
For Claude Desktop, add to your config:
{
"mcpServers": {
"pinviz": {
"command": "pinviz-mcp",
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}
Updating¶
To update PinViz to the latest version:
# Using uv (recommended)
uv tool install --upgrade pinviz
# OR using pip
pip install --upgrade pinviz
From source installation:¶
Next Steps¶
- Read the Usage Guide for examples
- Learn how to contribute devices
- Explore the device database
Support¶
- Report issues: https://github.com/nordstad/PinViz/issues
- Documentation: https://nordstad.github.io/PinViz/
- MCP Specification: https://spec.modelcontextprotocol.io/