Skip to main content

Siemens Docs MCP

An MCP server that lets an AI assistant search and read Siemens documentation live — any publication on docs.tia.siemens.cloud (TIA Portal, STEP 7, WinCC Unified, Openness, …) and docs.industrial-operations-x.siemens.cloud (Industrial Operations X) — plus a CLI that exports a whole publication to a tree of Markdown files.

Built to solve the problem of documentation portals that only offer low-quality PDF exports or JavaScript-rendered web views, making the content difficult to search, reference, or feed to AI tools.


Installation

PyPI

pip install siemens-docs-mcp

This installs two commands: siemens-docs-mcp (the MCP server) and siemens-docs-export (the Markdown exporter). Requires Python 3.11+.

From source

git clone https://github.com/Czarnak/siemens-docs-mcp
cd siemens-docs-mcp
python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -e .
# development (pytest, ruff, pip-audit; needs pip >= 25.1):
pip install -e . --group dev

MCP server

The server speaks MCP over stdio. Register it with Claude Code:

# from PyPI, no manual install (needs uv)
claude mcp add siemens-docs -- uvx siemens-docs-mcp

# or an installed copy
claude mcp add siemens-docs -- siemens-docs-mcp
# from a source checkout: <repo>/.venv/Scripts/siemens-docs-mcp  (Linux/macOS: <repo>/.venv/bin/siemens-docs-mcp)

Pass settings with -e, e.g. claude mcp add siemens-docs -e SIEMENS_DOCS_LOCALE=de-DE -- uvx siemens-docs-mcp.

Tools:

Tool Purpose
search_docs Full-text search (filter by product, version, locale, host, or limit to one publication or topic subtree with scope).
read_page Read one page as Markdown: outline, sections by heading or number, code only; page through with offset.
get_toc Table of contents of a publication or of the subtree under a topic reference.
list_publications List publications; discover valid product / version values.

All four tools emit compact references by default. Publication references use <prefix>:<mapId>; topic references use <prefix>:<mapId>/<contentId>, for example tia:MyPublication/MyTopic. Stable prefixes tia and iox identify docs.tia.siemens.cloud and docs.industrial-operations-x.siemens.cloud. Additional allowed hosts use their full hostname as the prefix; full hostnames also work for the built-in hosts. Prefixes are case-insensitive; IDs retain case.

Pass a compact reference or any reader URL returned by a tool (or copied from the browser) in the unchanged url argument: read_page(url="tia:MyPublication/MyTopic") or get_toc(url="tia:MyPublication"). Set reference_format="url" on any tool to emit full reader URLs. In read_page bodies, links to other topics on the same host (https://<host>/r/<mapId>/<contentId>) become compact references too (or stay full URLs with reference_format="url"); other links are unchanged, and images keep only their alt text. Exported Markdown is not affected. The CLI continues to use reader URLs in its configuration; compact references are an MCP tool interface.

To search inside a publication or chapter you already found, pass its reference as scope: search_docs(query="GetAttribute", scope="tia:MyPublication") or scope="tia:MyPublication/MyChapter". Host and locale then come from the scope, and product/version must be omitted. Publication scope is filtered by the server, so its count is exact. Topic scope keeps only hits inside the topic's subtree; it reads at most 300 publication results, and says so when its count may be incomplete.

To read only part of a long page, ask for its outline first: read_page(url="tia:MyPublication/MyTopic", mode="outline") lists numbered headings with their sizes. Then pass a number or heading text as section: section="Program code" returns every "Program code" and "Program code: …" section. mode="code" returns only the code blocks, each under its heading, and combines with section. Long results are cut between blocks; a code block or table too large for one part is split at a line, with its fence or header repeated. Each part ends with the exact arguments for the next one.

Environment variables:

Variable Default Meaning
SIEMENS_DOCS_HOSTS (none) Comma-separated extra hosts, appended to the built-in two (docs.tia.siemens.cloud, docs.industrial-operations-x.siemens.cloud).
SIEMENS_DOCS_LOCALE en-US Default locale for search and listings.
SIEMENS_DOCS_MIN_INTERVAL 0.3 Minimum seconds between requests to a host.

The publication catalog and TOCs are cached in memory (not on disk), so the first call per host takes a few seconds.


Markdown export (CLI)

Export a whole publication to Markdown — one file per page, folders mirroring the navigation hierarchy. Create a config with any reader URL of the publication (a topic URL exports the whole publication):

# my_docs.yaml
name: tia_openness_v21
url: "https://docs.tia.siemens.cloud/r/en-us/v21/tia-portal-openness-api-for-automation-of-engineering-workflows"
output_dir: "output/tia_openness_v21"
# Preview pages without writing files
siemens-docs-export my_docs.yaml --dry-run

# Export everything
siemens-docs-export my_docs.yaml

# Export a single page (for testing output quality)
siemens-docs-export my_docs.yaml --page cybersecurity-information

# Override the output directory / verbose logging
siemens-docs-export my_docs.yaml --output /tmp/docs --verbose

A ready-made config lives in configs/ in the repository.

Output structure

output/tia_openness_v21/
├── index.md                          ← root page
├── cybersecurity-information.md
├── what-s-new-in-tia-portal-openness.md
├── basics/
│   ├── basics.md
│   └── ...
├── tia-portal-openness-api/
│   ├── tia-portal-openness-object/
│   │   └── ...
│   └── ...
└── ...

Configuration reference

Key Required Description
name No Human-readable label shown in log output.
url Yes* Any reader URL of the publication (resolved to its map automatically).
api_base Yes* Legacy: root URL of the Fluidtopics instance (use with map_id).
map_id Yes* Legacy: Fluidtopics map identifier (use with api_base).
output_dir Yes Directory where Markdown files will be written.

* Either url, or api_base + map_id. If both are present, url wins.


How it works

Fluidtopics (the platform behind both portals) exposes a REST API that the browser SPA uses internally. This package calls that API directly — no browser automation:

  1. Catalog — GET /api/khub/maps lists every publication; reader URLs are resolved against it.
  2. Search — POST /api/khub/clustered-search with product/version/locale filters.
  3. TOC — GET /api/khub/maps/{mapId}/pages returns the navigation tree.
  4. Content — GET /api/khub/maps/{mapId}/topics/{contentId}/content returns raw HTML, converted to Markdown with markdownify.

Requests are throttled per host and retried once on 401/403/429/5xx.

Note: Only Fluidtopics-based portals are supported. Other platforms (MadCap Flare, Paligo, etc.) would need a different adapter.


Development

python -m pytest -q          # offline tests
python -m pytest -m live -q  # live smoke tests against the real hosts
ruff check .

Created with Claude AI

Metadata

Release files for siemens-docs-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for siemens-docs-mcp 0.2.0
File Size Uploaded Provenance Actions
siemens_docs_mcp-0.2.0.tar.gz 68.2 kB With provenance Details for siemens_docs_mcp-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for siemens-docs-mcp 0.2.0
File Interpreter ABI Platform Actions
siemens_docs_mcp-0.2.0-py3-none-any.whl Python 3 none any Details for siemens_docs_mcp-0.2.0-py3-none-any.whl

Total release size: 108.3 kB

Release files / siemens_docs_mcp-0.2.0.tar.gz

Download URL siemens_docs_mcp-0.2.0.tar.gz
Size 68.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8a276d7b2c0bc1a10c33f66f8f39928d4897ade11a6ae4f7e9520a32f70895c6
BLAKE2b-256 checksum
How to use checksums
42744205d4e0d4a1035e3cb4fb58f49b1fda0c7d44ce6ec8ca16038bbc54577b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Release files / siemens_docs_mcp-0.2.0-py3-none-any.whl

Download URL siemens_docs_mcp-0.2.0-py3-none-any.whl
Size 40.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b834ab8d49f491573067f5f6d84fbb6c28a939615929f27322c1286d6d64cf4e
BLAKE2b-256 checksum
How to use checksums
13fa0f02f6359f4c46cb7fc7048cedfa414f69782bbd066d5e1eb0cbbf33da87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Security for siemens-docs-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for siemens_docs_mcp-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page