شعار Altium MCP

Altium MCP

المجتمع
coffeenmusic

Altium Model Context Protocol server and Altium API script

الناشرcoffeenmusic
المستودعaltium-mcp
اللغةPascal
التفريعات
49
النجوم
175
الأدوات المتاحة
0
نوع نقل البياناتstdio
الترخيصMIT
الروابط
  • اربط الأدوات بسير عمل الذكاء الاصطناعي

    يتيح Altium MCP إمكانات MCP التي يمكن لتطبيقات الذكاء الاصطناعي العميلة ووكلاء الذكاء الاصطناعي المتوافقة استخدامها.

  • الأدوات المتاحة: 0

    تصفّح الإجراءات القابلة للاستدعاء أدناه، بما في ذلك أسماؤها وأوصافها عندما يوفّرها الخادم.

  • إعدادات جاهزة للنسخ

    استخدم أمثلة إعداد التثبيت لتهيئة هذا الخادم في تطبيق MCP العميل المفضّل لديك.

  • مؤشرات الاهتمام بالمصدر المفتوح

    النجوم: 175، والنسخ المتفرعة: 49 في المستودع المرتبط.

Altium MCP Server

TLDR: Use Claude to control or ask questions about your Altium project. This is a Model Context Protocol (MCP) server that provides an interface to interact with Altium Designer through Python. The server allows for querying and manipulation of PCB designs programmatically.

Example commands

  • Run all output jobs
  • Create a symbol for the part in the attached datasheet and use the currently open symbol as a reference example.
  • Create a schematic symbol from the attached MPM3650 switching regulator datasheet and make sure to strictly follow the symbol placement rules. (Note: Need to open a schematic library. Uses AppData\Roaming\Claude\Claude Extensions\local.dxt.altium-mcp\server\symbol_placement_rules.txt description as pin placement rules. Please modify for your own preferences.)
  • Create an op-amp symbol with a triangle body like the other op-amps in my library (symbols support line/polygon/arc/ellipse/label body graphics, not just rectangles)
  • Find me the LM358 symbol in my opamp library and open it
  • Create a multi-part symbol for a quad op-amp from the attached LM324 datasheet (creates parts A, B, C, D with shared V+/V- power pins)
  • Create a PCB footprint for the SMD part in the attached datasheet and add it to my open PcbLib
  • Duplicate my selected layout. (Will prompt user to now select destination components. Supports Component, Track, Arc, Via, Polygon, & Region)
  • Show all my inner layers. Show the top and bottom layer. Turn off solder paste.
  • Get me all parts on my design made by Molex
  • Give me the description and part number of U4
  • Place the selected parts on my pcb with best practices for a switching regulator, then verify clearances and show me a screenshot of the result
  • Give me a list of all IC designators in my design
  • Get me all length matching rules

Installing the MCP Server

The easiest way to install is to use Claude Code, point it to this repo and ask it to install it for you. Or alternatively, see below.

Watch on YouTube

  1. Make sure Claude has Python 3.10+ installed: drop down > File > Settings > Extensions > Advanced > Python. If not, install Python and add it to PATH.
  2. Download the altium-mcp.dxt desktop extension file from releases
  3. In Claude Desktop on Windows: drop down > File > Settings > Extensions > Advanced > Install Extension... Select the .dxt file

You shouldn't need to restart Claude and you should now see altium-mcp in the tool menu near the search bar.

altium-mcp in the tools menu

Creating a new .dxt (For Developers)

Bootstrap Venv (Recommended)

This approach ships a small bootstrap script (start_server.py) that creates a virtual environment and pip-installs dependencies on the user's machine at first launch. The .dxt is tiny (~60 KB) and works across any Python 3.10+ version.

The older approach of bundling pre-compiled packages in server/lib/ is no longer recommended — it breaks when the user's Python version doesn't match the version used to build the bundled .pyd files (e.g. pydantic_core compiled for 3.11 fails on 3.13).

How it works:

  1. start_server.py (at the repo root) looks for a ready virtual environment in %USERPROFILE%\.altium-mcp envs\<key>, where <key> is a hash of the pinned requirements and the Python version
  2. If it isn't ready, it starts a detached builder process (start_server.py --build) that creates the venv and pip-installs the pinned dependencies, then waits for it. Claude Desktop kills a server that has not answered within about 60 seconds, and restarts servers freely; a build that ran inside the launcher died with it. The detached builder finishes regardless, so a restarted launcher finds the venv ready or a build still in progress.
  3. A lock file (holding the builder's PID) makes sure only one build runs at a time; other launchers wait for it. A lock whose owner has exited is taken over immediately.
  4. It then launches server/main.py using the venv's Python
  5. First launch takes ~20-30 seconds; subsequent launches are instant

The venv, config.json and build.log live in %USERPROFILE%\.altium-mcp, not in the extension folder, because Claude Desktop replaces the extension folder on every update. The slow build therefore happens once per machine (and again only when the requirements or Python version change), and a hand-picked Altium path survives updates. AppData is deliberately avoided: Claude Desktop is an MSIX package, and writes its child processes make under AppData are redirected into ...\Packages\Claude_...\LocalCache, so a venv built from a terminal and one built by the server would end up in different places. Set the ALTIUM_MCP_HOME environment variable to use a different folder. A config.json left beside server/main.py by an older version is migrated automatically on first start.

On a slow network the first build can exceed the client's 60-second startup timeout. The build carries on in the background, so restarting the extension once it has finished is enough; build.log shows progress.

Build steps:

  1. Make sure start_server.py exists at the repo root (see below for contents)
  2. Make sure server/main.py does NOT have the old site.addsitedir hack at the top
  3. Update manifest.json: set entry_point to start_server.py, remove any env/PYTHONPATH fields, and use manifest_version: "0.3"
  4. Package the DXT — either use dxt pack or manually zip and rename:
powershell
Compress-Archive -Path manifest.json, start_server.py, pyproject.toml, server -DestinationPath altium-mcp.zip
Rename-Item altium-mcp.zip altium-mcp.dxt

Do NOT include server/lib/ or server/.venv/ in the .dxt. The whole point is that these are created on the user's machine.

start_server.py: use the file at the repo root as is. It is no longer reproduced here, so the two cannot drift apart.

manifest.json server section:

json
"server": {
    "type": "python",
    "entry_point": "start_server.py",
    "mcp_config": {
      "command": "python",
      "args": ["${__dirname}/start_server.py"]
    }
  }

Pitfalls

These are hard-won lessons from debugging DXT builds. Violating any of these will produce errors that are difficult to diagnose.

  1. Do NOT use os.execv() in start_server.py. The DXT installs to a path containing spaces (Claude Extensions). On Windows, os.execv splits the path at the space and fails. Use sys.exit(subprocess.call([...])) instead.

  2. Pin mcp to ==1.5.0. Using >=1.5.0 pulls in the latest version, which has breaking API changes (FastMCP.__init__() dropped the description kwarg). The server code was written against 1.5.0.

  3. Do NOT use manifest_version: "0.4" with "type": "uv". Claude Desktop does not support it yet. You will get Invalid manifest: server: Required. Use "type": "python" with manifest_version: "0.3".

  4. After removing the site.addsitedir hack from main.py, fix the pathlib.Path reference. The hack included import pathlib at the top of the file. The logging setup later uses pathlib.Path(...) which will throw NameError once that import is gone. Change it to Path(...) — the from pathlib import Path import already exists in the file, just make sure it comes before the logging setup.

  5. Do NOT bundle server/lib/ in the DXT. That was the old approach and defeats the purpose of the venv bootstrap.

Legacy: Bundled server/lib (Not Recommended)

This approach bundles all dependencies in server/lib/ and sets PYTHONPATH to point to it. It produces a much larger .dxt (~17 MB) and only works if the user's Python version matches the version used to compile the bundled packages.

  1. Populate packages: python -m pip install --no-cache-dir --target server/lib -r requirements.txt
  2. Set the manifest entry_point to server/main.py and add "env": {"PYTHONPATH": "${__dirname}/server/lib"} to mcp_config
  3. Package: npm install -g @anthropic-ai/dxt && dxt pack

DXT Resources

Configuration

When launching claude for the first time, the server will automatically try to locate your Altium Designer installation. It will search for all directories that start with C:\Program Files\Altium\AD* and use the one with the largest revision number. If it cannot find any, you will be prompted to select the Altium executable (X2.EXE) manually when you first run the server. Altium's DelphiScript scripting is used to create an API between the mcp server and Altium.

Available Tools

The server provides several tools to interact with Altium Designer:

Output Jobs

  • get_output_job_containers: Using currently open .OutJob file, reads all available output containers
  • run_output_jobs: Pass a list of output job container names from the currently open .OutJob to run any number of them. .OutJob must be the currently focused document.

Component Information

  • get_all_designators: Get a list of all component designators in the current board
  • get_all_component_property_names: Get a list of all available component property names
  • get_component_property_values: Get the values of a specific property for all components
  • get_component_data: Get detailed data for specific components by designator
  • get_component_pins: Get pin information for specified components

Schematic/Symbol

  • get_schematic_data: Get schematic data for specified components
  • create_schematic_symbol (YouTube): Passes pin list with pin type & coordinates to Altium script. Supports multi-part symbols (e.g. quad op-amps) via a part_count parameter and an owner_part_id field on each pin (use 0 for shared power/GND pins), active-low pin name overbars by placing a backslash after each overbarred character (e.g. R\E\S\E\T\ renders as RESET with overbar), per-pin length and name/designator visibility, and an optional graphics list (lines, polylines, polygons, rectangles, arcs, ellipses, labels) for non-rectangular bodies like op-amp triangles and diode glyphs. When creating a symbol, the agent is instructed to first look up a similar symbol in an available library as a style reference (skipped gracefully if no library is available).
  • get_symbol_primitives: Inventory a .SchLib (every symbol with per-type primitive counts) or dump one symbol's complete geometry (all graphics + pin details, in mils; symbol_name="*" dumps every symbol). Used to gap-analyze a library, to give the agent a reference example when drawing a new symbol, and to verify recreations. The symbol creator round-trips a complete production library set exactly - 514/514 symbols across IC, connector, misc, and passives libraries (dump -> recreate -> dump -> diff, zero differences). Footprint/model links (implementations) are metadata outside the graphics round-trip.
  • create_symbols_batch: Create many symbols in one script run from a plain-text spec file (bulk imports/migrations) - far faster and more robust than one create call per symbol.
  • get_symbol_placement_rules: Create symbol's helper tool that reads ~\AppData\Roaming\Claude\Claude Extensions\local.dxt.altium-mcp\server\symbol_placement_rules.txt to get pin placement rules for symbol creation.
  • get_library_symbol_reference: Create symbol's helper tool to use an open library symbol as an example to create the symbol
  • search_library_symbol: Search for a symbol by name in a schematic library (.SchLib) and navigate to it. Supports partial name matching. Will open the library file in Altium if a path is provided, or show a file picker if not.

Symbol Creator

Layout Operations

  • get_all_nets: Returns a list of unique nets from the pcb
  • create_net_class (YouTube): Create a net class from a list of nets
  • get_pcb_layers: Get detailed layer information including electrical, mechanical, layer pairs, etc.
  • get_pcb_layer_stackup: Gets stackup info like dielectric, layer thickness, etc.
  • set_pcb_layer_visibility (YouTube): Turn on or off any group of layers. For example turn on inner layers. Turn off silk.
  • get_pcb_rules: Gets the rule descriptions for all pcb rules in layout.
  • get_selected_components_coordinates: Get position, rotation, layer, and footprint information for currently selected components
  • move_components: Move specified components by X and Y offsets
  • set_component_position: Set one component's absolute position and rotation
  • place_components: Batch absolute placement - place any number of components (x, y, rotation, top/bottom layer) in a single transaction / one undo step. The workhorse for AI-driven placement.
  • check_placement: Verify a placement - finds overlaps and clearance violations against every other component on the board using true primitive-to-primitive distances (designator text excluded). Run after placing; a screenshot is not verification.
  • check_orientation: Advisory check for 2-pad passives whose rotation could be improved (e.g. a decoupling cap with its GND pad facing away from the IC). Geometry only - review suggestions with judgement; parts like pull-ups don't care.
  • get_net_connections: For the nets touching a set of components, list every pad on each net board-wide with per-net airline (MST) lengths - the data behind connectivity-driven placement (shorten critical nets, see off-cluster loads and filter banks).
  • layout_duplicator (YouTube): Starts layout duplication assuming you have already selected the source components on the PCB.
  • layout_duplicator_apply: Action #2 of layout_duplicator. Agent will use part info automatically to predict the match between source and destination components, then will send those matches to the place script.

The cool thing about layout duplication this way as opposed to with Altium's built in layout replication, is that the exact components don't have to match because the LLM can look through the descriptions and understand which components match and which don't have a match. That's something that can't really be hard coded. Placement Duplicator

PCB Footprint Library

  • create_pcb_footprint: Create a new PCB footprint in the currently active .PcbLib document. Supports SMD pads (Rect, Round, Oval shapes) defined in mm relative to the component origin. Auto-generates a courtyard on Mech 15 and silkscreen with a pin 1 indicator (gap in the top-left corner), or accepts explicit courtyard dimensions. Contributed by coffeedust (PR #7).
  • get_footprint_primitives: Inventory a .PcbLib (per-footprint primitive counts) or dump complete footprint geometry - pads with full stack/hole detail, tracks, arcs, fills, texts, regions - in mils. The reference source when recreating or verifying footprints. 3D bodies are excluded as models.
  • create_footprints_batch: Create many footprints in one script run from a plain-text spec file: SMD + through-hole pads (holes, slots, plating, rotation, full pad stack), tracks, arcs, fills, texts, and regions on any layer. Round-trip verified against complete production SMD and through-hole libraries.

Both

  • get_screenshot: Take a screenshot of the Altium PCB window or Schematic Window that is the current view, returned as a proper image the agent can see. For PCB views, an optional zoom_to list of designators makes Altium zoom to those components before capture so they fill the frame. It should auto focus either document type if it is open but a different document type is focused.

Scripting / Development

  • run_altium_script: Run a DelphiScript snippet in an isolated sandbox script project and get back a step-by-step log, the script's result, and - when a script dies - the exact statement that killed it. Altium has no headless test mode: a runtime error leaves the script paused in the debugger with no dialog, after which every later run silently does nothing until the debugger is stopped (Ctrl+F3) or Altium restarts. This tool detects that state and reports it. Because the sandbox is a separate script project, a crash can never break the other MCP tools. Useful for developing and verifying new Altium API code before building a tool around it.
  • ensure_altium_script_skill: Check whether the altium-script skill (Altium DelphiScript API reference, examples, and conventions) is installed, and install it on request. Skills load at client startup, so a newly installed skill appears after a restart.

Server Status

  • get_server_status: Check the status of the MCP server, including paths to Altium and script files

How It Works

The server communicates with Altium Designer using a scripting bridge:

  1. It writes command requests to workspace\request.json
  2. It launches Altium with instructions to run the Altium_API.PrjScr script
  3. The script processes the request and writes results to workspace\response.json
  4. The server reads and returns the response

References

  • Get scripts' project path from Jeff Collins and William Kitchen's stripped down version
  • BlenderMCP: I got inspired by hearing about MCP being used in Blender and used it as a reference. https://github.com/ahujasid/blender-mcp
  • Used CopyDesignatorsToMechLayerPair script by Petar Perisin and Randy Clemmons for reference on how to .Replicate objects (used in layout duplicator)
  • Petar Perisin's Select Bad Connections Script: For understanding how to walk pcb primitives (track, arc, via, etc) connected to a pad
  • Matija Markovic and Petar Perisin Distribute Script: For understanding how to properly let the GUI know when I've updated tracks' nets
  • Petar Perisin's Room from Poly: Used as reference to detect poly to pad overlap since I couldn't get more tradition methods to work.
  • Petar Perisin's Layer Panel Script: Used as reference for getting layers and changing layer visibility
  • Jeff Collins has an XIA_Release_Manager.pas script that taught me the art of the Output Job. See his post on the Altium Forums: https://forum.live.altium.com/#/posts/189423

Contributors

  • coffeedust — create_pcb_footprint tool for PcbLib automation (PR #7)
  • fwolter — Fix JSON parsing error when the decimal separator is a comma (PR #3)

Disclaimer

This is a third-party integration and not made by Altium. Made by coffeenmusic

TODO:

  • Change selection filter:
    • scripts-libraries\Scripts - PCB\FilterObjects\
    • scripts-libraries\Scripts - SCH\SelectionFilter\
  • Show/Hide Panels: DXP/ReportPCBViews.pas
  • Create rules: PCB/CreateRules.pas
  • Run DRC: IPCB_Board.RunBatchDesignRuleCheck(
  • Move cursor to position: IPCB_Board.XCursor, IPCB_Board.YCursor
  • Add get schematic & pcb library path for footprint.
  • Add get symbol from library
  • log response time of each tool
  • Add go to schematic sheet
  • Go to sheet with component designator
  • Board.ChooseLocation(x, y, 'Test');
  • Zoom to selected objects:
  • Change Schematic Selection Filter: SelectionFilter.pas
  • Place schematic objects (place component from library): PlaceSchObjects.pas
  • How can I read through components from libraries in Components panel?

TODO Tests: Need to add the following test units

  • get_pcb_layers
  • set_pcb_layer_visibility
  • layout_duplicator
  • get_pcb_screenshot

استخدم MCP الخاص بـ Altium MCP مع نماذج ذكاء اصطناعي متعددة

يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا بمجرد توصيل Altium MCP، يمكنك استخدامه مع نماذج ذكاء اصطناعي مختلفة في TypingMind بدلًا من إعداده لكل نموذج على حدة. يعمل تكامل MCP هذا محليًا عبر موصل MCP الخاص بـ TypingMind على جهازك.

دليل الإعداد لاستخدام الموصل المحلي

استخدم هذا الخيار عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات أو موارد خاصة على جهاز الكمبيوتر لديك.

1

فتح إعدادات MCP

في TypingMind، انتقل إلى «الإعدادات»، ثم «الإعدادات المتقدمة»، ثم «بروتوكول سياق النموذج»، واختر «إعداد الموصل».

  1. افتح TypingMind في متصفحك.
  2. انقر على أيقونة الإعدادات.
  3. انتقل إلى الإعدادات المتقدمة.
  4. افتح قسم بروتوكول سياق النموذج.
  5. انقر على «إعداد الموصل» واختر «هذا الجهاز».
شاشة إعداد موصل MCP في TypingMind مع تحديد «هذا الجهاز»
2

تنفيذ أمر الموصل

اختر «هذا الجهاز»، وانسخ الأمر من TypingMind وشغّله في Terminal. أبقِ العملية قيد التشغيل أثناء استخدام MCP.

  1. انسخ أمر الإعداد الذي يعرضه TypingMind.
  2. افتح Terminal على macOS أو Windows Terminal على Windows.
  3. الصق الأمر ونفّذه.
  4. وافق على تثبيت الحزمة إذا طلب منك Terminal تأكيد المتابعة.
  5. أبقِ نافذة Terminal والعملية التي تعمل فيها قيد التشغيل أثناء استخدام أدوات MCP.
3

أضف Altium MCP كخادم

عندما تظهر حالة الموصل «جاهز»، انقر على «تعديل الخوادم» والصق إعدادات خادم MCP.

  1. انتظر حتى تظهر حالة الموصل «جاهز».
  2. انقر على «تعديل الخوادم».
  3. الصق إعدادات خادم MCP الخاص بـ Altium MCP.
  4. احفظ قائمة الخوادم.
  5. حدّث الحالة إذا أردت التأكد من أن الموصل لا يزال جاهزًا.
إعدادات MCP في TypingMind تعرض خادمًا نشطًا وزر «تعديل الخوادم»
{
  "mcpServers": {
    "altium-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

استخدام الاتصال مع نماذج مختلفة

احفظ قائمة الخوادم، وافتح «الإضافات»، وفعّل أدوات MCP الخاصة بـ Altium MCP، ثم اختر أي نموذج ذكاء اصطناعي مدعوم في TypingMind واستخدم الأدوات في المحادثة أو أسندها إلى وكيل ذكاء اصطناعي.

  1. افتح صفحة الإضافات في TypingMind.
  2. فعّل أدوات MCP الخاصة بـ Altium MCP.
  3. ابدأ محادثة واختر نموذج الذكاء الاصطناعي الذي تريد استخدامه.
  4. استخدم أدوات MCP في المحادثة أو عيّنها لوكيل ذكاء اصطناعي.
  5. انتقل إلى نموذج ذكاء اصطناعي آخر عند الحاجة دون إعادة الاتصال بـ MCP.
محادثة في TypingMind تستخدم أدوات MCP المفعّلة مع نموذج ذكاء اصطناعي محدّد
هل يمكنك استخدام Altium MCP لمساعدتي في هذه المهمة؟
Altium MCP
بالتأكيد. قرأته.
إليك ما وجدته باستخدام Altium MCP.

الأسئلة الشائعة

ما استخدامات خادم MCP Altium MCP؟

Altium MCP هو خادم MCP يتيح لتطبيقات الذكاء الاصطناعي المتوافقة الاتصال بأدوات ومصادر سياق خارجية. في TypingMind، يمكنك إضافة خادم MCP هذا مرة واحدة وإتاحة أدواته في مساحة عملك للذكاء الاصطناعي.

هل يمكنني استخدام خادم MCP Altium MCP مع نماذج ذكاء اصطناعي متعددة في TypingMind؟

نعم. يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا يمكنك استخدام Altium MCP مع نماذج ذكاء اصطناعي مختلفة مثل Claude أو ChatGPT أو Gemini أو غيرها من النماذج التي أعددتها في TypingMind، دون إعداد خادم MCP لكل نموذج على حدة.

لماذا تستخدم موصل MCP Altium MCP مع TypingMind؟

يُعد TypingMind من أفضل واجهات المحادثة مع النماذج اللغوية الكبيرة، إذ يجمع نماذج ذكاء اصطناعي متعددة ومطالبات وإضافات ووكلاء ذكاء اصطناعي ومفاتيح API وأدوات MCP في مساحة عمل واحدة. بعد توصيل Altium MCP، يمكنك استخدام أدوات MCP الخاصة به عبر نماذجك المفضلة مع الحفاظ على سير عمل محادثاتك منظمًا في TypingMind.

كيف أوصّل خادم MCP Altium MCP بـ TypingMind؟

يعمل Altium MCP عبر موصل MCP المحلي في TypingMind. هذا هو الخيار الأنسب عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات سطح المكتب أو أدوات سطر الأوامر أو موارد خاصة على حاسوبك.

ما الأدوات التي يوفّرها خادم MCP Altium MCP في TypingMind؟

يتيح Altium MCP إمكانات MCP يمكنك تفعيلها من صفحة الإضافات في TypingMind واستخدامها في المحادثات أو تعيينها لوكلاء ذكاء اصطناعي.

هل أحتاج إلى مشاركة مفاتيح API الخاصة بي مع TypingMind لاستخدام خادم MCP Altium MCP؟

لا. يعطي TypingMind الأولوية للعمل المحلي ويُبقي مزوّدي النماذج ومفاتيح API والمطالبات وإعدادات MCP تحت تحكمك. إذا كان Altium MCP يتطلب مصادقة، فأضف الترويسات أو إعدادات OAuth أو الإعدادات المحلية المطلوبة لخادم MCP هذا عند إنشاء الاتصال.

خوادم MCP ذات صلة

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇