orcaslicer-mcp

orcaslicer-mcp

Enables AI assistants to work with OrcaSlicer code and perform slicing operations, such as reading files, checking Git status, and slicing 3D models to get print time and filament usage.

Category
访问服务器

README

orcaslicer-mcp

Let an AI assistant like Claude work with OrcaSlicer and your OrcaSlicer code.


What is this? (plain version)

Claude and other AI assistants can only talk by default. An MCP server is a small helper program that gives them new abilities — like hands and eyes for a job.

This helper gives the AI two sets of abilities:

  1. Work with your code. Look at your OrcaSlicer code, check what changed, read files, search the code, and check if your online tests passed.
  2. Work with the slicer. Slice a 3D model into a print file, then read back how long it will take, how much filament it uses, and how many layers it has.

So instead of you clicking around, you can just ask: "Slice the Julia vase and tell me how long it takes," or "What changed in my code today?"

MCP stands for Model Context Protocol. It's just the name for the standard way AI apps plug into helper programs like this one.


What you need first

You need these installed on your Windows PC. Each one is free.

Thing Why you need it Check it works
Python 3.10 or newer This helper is written in Python. Open a terminal and type python --version
Git To download this helper and read your code history. git --version
GitHub CLI (gh) To check your online code and tests. gh --version
OrcaSlicer The slicer this helper drives. Make sure it opens normally
An AI app Claude Desktop or Claude Code (the thing you talk to).

How to install (step by step)

1. Download this helper

Open a terminal and run:

git clone https://github.com/Diterex/orcaslicer-mcp.git
cd orcaslicer-mcp

2. Install the one Python package it needs

python -m pip install "mcp[cli]"

3. Find the full path to your Python

You'll need this in the next step. On Windows, run:

where python

Copy the first line it prints. It looks something like C:\Users\YOU\AppData\Local\Programs\Python\Python310\python.exe.

4. Tell your AI app about this helper

You add a few lines to your AI app's settings file. Below is the pattern. Replace the two paths with your paths (your Python from step 3, and the folder where you downloaded this helper).

"orcaslicer-mcp": {
  "type": "stdio",
  "command": "C:\\Path\\To\\python.exe",
  "args": ["C:\\Path\\To\\orcaslicer-mcp\\server.py"],
  "env": {}
}

Where does that go?

  • Claude Desktop: in claude_desktop_config.json, inside the mcpServers section.

  • Claude Code: in .claude.json, inside the mcpServers section. Or, easier, run this one command (put your real paths in):

    claude mcp add --scope user orcaslicer-mcp -- "C:\Path\To\python.exe" "C:\Path\To\orcaslicer-mcp\server.py"
    

Tip: use double backslashes (\\) in the JSON file, like the example shows.

5. Restart your AI app

Close it fully and open it again. That's it — the new abilities are ready.


How to use it

Just talk to your AI normally. Here are things you can try:

  • "What branch am I on and what's changed?"
  • "Show me my last 5 commits."
  • "Did my latest tests pass on GitHub?"
  • "List the test models I can slice."
  • "Slice the Julia vase model and tell me the print time and filament weight."
  • "Read the print file we just made and summarize it."

The AI picks the right ability for what you asked.


Settings you can change (optional)

Good news: it finds most things by itself. It looks for OrcaSlicer in the usual places (and on your system PATH), and it finds your code folder if you run it from inside your OrcaSlicer folder. So for slicing, you usually don't set anything.

One thing to set for the code tools: if you want the "work with your code" tools (git, GitHub), point it at your OrcaSlicer folder with ORCA_FORK_DIR. That's the only setting most people need.

You set any of these inside the "env" part of the config from step 4:

Setting What it points to Auto-detected?
ORCA_FORK_DIR The folder with your OrcaSlicer code. Only if you run it from inside that folder — otherwise set it.
ORCA_SLICER_EXE The full path to orca-slicer.exe. Yes (checks PATH + normal install spots).
ORCA_CORPUS_DIR A folder with test models and profiles. Defaults to the code's resources/profiles.
ORCA_OUTPUT_DIR Where sliced files are saved. Yes (~/.orcaslicer-mcp/out).
ORCA_INTEGRATION_BRANCH The branch your work merges into. Defaults to main.

Example (inside "env": { ... }):

"env": {
  "ORCA_FORK_DIR": "C:\\Users\\YOU\\code\\OrcaSlicer",
  "ORCA_SLICER_EXE": "D:\\Programs\\OrcaSlicer\\orca-slicer.exe"
}

Is it safe?

Yes, by design. Some abilities can change things — like saving a commit, sending code to GitHub, or opening a pull request. Those never happen on their own.

The AI first shows you exactly what it would do and does nothing. It only goes through if you clearly say yes (the tool needs a confirm flag turned on). So the AI can't quietly push your code or open a request without you agreeing.

Also good to know: this helper runs on your computer with your permissions, the same as any program you start. Only install helpers you trust.

A few things it does to stay safe:

  • Stays in bounds. Reading files, slicing, and reading print files are all limited to your OrcaSlicer folder, your model folder, and its output folder. It won't read or overwrite files elsewhere on your PC.
  • No sneaky flags. Values you pass (branch names, search text, file paths) can't be turned into hidden command options.
  • Point it at code you trust. For the code tools, set ORCA_FORK_DIR to your own OrcaSlicer folder rather than running it inside a folder you downloaded from someone else.

The full list of abilities (tools)

Work with your code

Tool What it does
orca_repo_info Shows your branch, remotes, and how far ahead/behind you are.
orca_git_status Shows what's changed right now.
orca_git_diff Shows the exact line changes.
orca_git_log Shows recent commits.
orca_branches Lists all branches.
orca_checkout Switches to (or makes) a branch.
orca_fetch_upstream Gets updates from the original OrcaSlicer project.
orca_search_code Searches your code for a word or pattern.
orca_read_file Reads part of a file.
orca_gh_pr Lists, views, or (with your OK) opens pull requests.
orca_gh_issue Lists, views, or (with your OK) opens issues.
orca_ci_status Checks if your online tests passed.
orca_commit Saves a commit (only with your OK).
orca_push Sends commits to GitHub (only with your OK).

Work with the slicer

Tool What it does
orca_list_profiles Lists your printer profiles and test models.
orca_slice Slices a model into a print file.
orca_analyze_gcode Reads a print file: time, filament, layers, cost.

Works alongside OrcaSlicer's built-in helper

OrcaSlicer is adding its own built-in MCP helper (PR #12667) that controls the app while it's open — screenshots, the 3D view, live settings. That one and this one work well together:

  • This helper works with your code and can slice without opening the app.
  • The built-in one controls the open app (screenshots and the 3D view).

You can turn on both.


License

MIT — free to use, change, and share. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选