OCP Viewer

Provides an MCP server to capture screenshots of the OCP CAD Viewer for AI-assisted visual analysis.
  • python

0

GitHub Stars

python

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "dmilad-ocp-viewer-mcp": {
      "command": "python",
      "args": [
        "-m",
        "ocp_viewer_mcp.server"
      ]
    }
  }
}

This MCP server lets you capture screenshots from the OCP CAD Viewer so an AI assistant can visually analyze your 3D CAD models. You run your CAD code in Python, display models in the OCP viewer, and the MCP server exposes a simple interface you can ask the AI to screenshot or inspect the current view.

How to use

You use this server with an MCP client to request a screenshot of what’s currently displayed in the OCP CAD Viewer. Start the server in your Python environment, display a model in your notebook or editor, and ask the AI to capture or analyze the view. The server handles the rendering wait time and returns a PNG image encoded as base64 so the AI can review the exact visual state of your model.

How to install

Prerequisites you need before installation include Python 3.10 or newer and access to a Python environment where you can install packages.

Install the MCP server package using pip:

pip install ocp-viewer-mcp

Configuration

Configure the MCP server in your client’s MCP settings so you can start it from your editor or notebook. The following configuration runs the server as a local process using Python.

{
  "mcpServers": {
    "ocp_viewer": {
      "command": "python",
      "args": ["-m", "ocp_viewer_mcp.server"]
    }
  }
}

Troubleshooting

If you cannot connect to the OCP viewer, ensure the viewer is open in your editor and that the backend is running. Check that the port defaults to 3939 and that the viewer has started successfully.

If a required Python package is missing, install the dependency in your environment, for example using pip:

pip install ocp-vscode

Additional notes

To capture a screenshot, use the MCP client’s available tool that triggers the capture and returns a PNG image. The primary function exposed by this server is capture_ocp_screenshot, which waits for rendering and returns the image in base64-encoded form.

Tool reference

capture_ocp_screenshot captures a screenshot of the OCP CAD Viewer and returns a PNG image encoded as base64.

Development

To run the MCP server locally for development and testing, start from the project directory and run the Python module that serves MCP requests.

Available tools

capture_ocp_screenshot

Captures a screenshot of the OCP CAD Viewer and returns a PNG image encoded as base64.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational