OCP Viewer MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OCP Viewer MCP Servercapture the current view of my CAD model"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OCP Viewer MCP Server
An MCP (Model Context Protocol) server that captures screenshots from the OCP CAD Viewer, allowing AI assistants like Cursor to "see" your 3D CAD models.
What it does
When working with CAD tools like CadQuery or Build123d, you can display models in the OCP CAD Viewer using show(). This MCP server lets you ask an AI assistant to capture what's currently displayed, enabling visual feedback and AI-assisted CAD development.
Example workflow:
You're designing a part in a Jupyter notebook with CadQuery
You run
show(my_part)to display it in the OCP viewerYou ask the AI: "capture the current view - does this geometry look correct?"
The AI captures a screenshot and can analyze the 3D model visually
Related MCP server: FreeCAD MCP
Installation
pip install ocp-viewer-mcpRequirements:
Python 3.10+
OCP CAD Viewer VS Code/Cursor extension
ocp-vscode Python package (for
show()function)
Configuration
Cursor
Add to your ~/.cursor/mcp.json:
{
"mcpServers": {
"ocp-viewer": {
"command": "python",
"args": ["-m", "ocp_viewer_mcp.server"]
}
}
}If you're using a virtual environment (recommended), specify the full Python path:
{
"mcpServers": {
"ocp-viewer": {
"command": "/path/to/your/venv/bin/python",
"args": ["-m", "ocp_viewer_mcp.server"]
}
}
}Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"ocp-viewer": {
"command": "python",
"args": ["-m", "ocp_viewer_mcp.server"]
}
}
}Usage
Open your CadQuery/Build123d project in Cursor or VS Code
Start the OCP CAD Viewer (Cmd+Shift+P → "OCP CAD Viewer: Open Viewer")
Display a model using
show(your_model)in a notebook or scriptAsk the AI to capture the view:
"Capture the current OCP view"
"Show me what the model looks like"
"Take a screenshot of the CAD viewer"
Tool Reference
capture_ocp_screenshot
Captures a screenshot of the OCP CAD Viewer.
Parameter | Type | Default | Description |
| integer | 3939 | The port where OCP viewer is running |
| integer | 1000 | Milliseconds to wait for rendering |
Returns: A PNG screenshot as a base64-encoded image.
Troubleshooting
"Could not connect to OCP viewer"
Make sure the OCP CAD Viewer is open in VS Code/Cursor
Check that the viewer backend is running (look for "Viewer backend started" in terminal)
Verify the port (default is 3939)
"ocp_vscode not installed"
The MCP server needs ocp-vscode installed in the same Python environment:
pip install ocp-vscodeScreenshot not capturing
Make sure a model is displayed (run
show(something)first)Try increasing
wait_msif the model is complex
Development
# Clone the repo
git clone https://github.com/dmilad/ocp-viewer-mcp.git
cd ocp-viewer-mcp
# Install with Poetry
poetry install
# Run locally
poetry run python -m ocp_viewer_mcp.serverContributing
Contributions are welcome! Please open an issue first to discuss what you'd like to change.
License
Related Projects
OCP CAD Viewer - The VS Code extension this MCP server integrates with
CadQuery - Python parametric CAD scripting
Build123d - Python CAD scripting with a builder pattern
MCP - Model Context Protocol specification
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI tools to capture and process screenshots of a user's screen, allowing AI assistants to see and analyze what the user is looking at through a simple MCP interface.Last updated125MIT
- AlicenseAqualityDmaintenanceEnables control of FreeCAD CAD software from Claude Desktop through natural language commands. Supports creating, editing, and managing 3D objects, executing Python code, and generating screenshots of designs.Last updated10MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to capture screenshots of web pages using automated browser sessions. Supports full-page and element-specific screenshots, device simulation, and JavaScript execution for comprehensive web testing and monitoring.Last updated612MIT
- AlicenseDqualityDmaintenanceEnables AI assistants to capture and analyze screenshots using Claude Vision API, providing AI-powered insights about desktop interface content, UI elements, and visual layouts.Last updated2862MIT
Related MCP Connectors
Generate images, GIFs, and PDFs from HTML, URLs, or templates — from your AI agent.
Screenshot, diff, audit and sitemap-capture any web page — 5 MCP tools for AI agents.
DXF drawings for AI agents: structured facts, PNG renders, and an interactive in-chat viewer.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dmilad/ocp-viewer-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server