CODESYS MCP Server
Enables CODESYS development assistance via MCP, including curated guidance, Structured Text writing help, local PDF search, and live official documentation lookup.
README
CODESYS MCP Server
A Model Context Protocol server for CODESYS Development System V3. It gives MCP clients curated CODESYS guidance, Structured Text writing help, searchable local PDF documentation, and optional live lookup of allowlisted official CODESYS pages.
The server can run over HTTP at /mcp or over stdio for direct CLI and agent integration. Official pages are summarized and cited rather than copied into the project. Primary official sources include CODESYS Online Help and CODESYS Examples.
Tools
search_codesys_docs: search curated and/or official CODESYS guidance.get_codesys_topic: explain a known topic such as POUs, function blocks, timers, tasks, variables, libraries, debugging, or Structured Text.codesys_writing_guidance: provide practical CODESYS and Structured Text design guidance for a requested task.list_codesys_pdfs: list PDF documents available in the configured PDF folder.search_codesys_pdfs: search text extracted from local PDF documents.get_codesys_pdf: return extracted text from a specific local PDF document.get_codesys_page: fetch the full text content of any allowlisted CODESYS documentation URL.crawl_codesys_help: crawl and index the CODESYS help site for searchable documentation.
What It Does
- Searches curated CODESYS guidance for concepts, syntax, and workflow help.
- Explains common CODESYS topics such as POUs, function blocks, timers, tasks, variables, libraries, debugging, and Structured Text.
- Provides practical Structured Text and project-structure guidance.
- Searches local PDF manuals and notes placed in
docs/pdfs/. - Fetches and summarizes allowlisted official CODESYS documentation pages.
- Crawls the official help site to build a searchable index.
Install For A Human
Use this when you want to run the server yourself on your machine.
Prerequisites:
- Node.js 20 or newer
npm
From a fresh clone:
npm install
cp .env.example .env
npm run build
Start the HTTP server:
npm start
Or start the stdio server:
npm run start:stdio
By default, the HTTP server listens on http://0.0.0.0:3000/mcp.
Install For An LLM Or Agent
AI agent? Read
agent.md— it contains the complete, step-by-step self-installation guide written specifically for you. Start there.
Use this section when an LLM is being instructed to connect itself to the server as an MCP client.
Suggested instruction to give the LLM:
Read agent.md in the repository root. It contains the exact steps to install this MCP server into yourself.
- Build the project first:
npm install
npm run build
- Prefer stdio transport for local agent integration.
- Add the server to the client using the local build output:
claude mcp add --transport stdio codesys-docs -- node ./dist/src/cli.js --stdio
- If the client needs HTTP instead, start the server and register the endpoint:
npm start
claude mcp add --transport http codesys-docs http://localhost:3000/mcp
- If the agent can only work from a published package, use:
claude mcp add --transport stdio codesys-docs -- npx -y codesys-mcp-server --stdio
For Codex CLI:
codex mcp add codesys-docs -- node ./dist/src/cli.js --stdio
Quick Start
npm install
cp .env.example .env
npm run build
npm start
The server listens on http://0.0.0.0:3000/mcp by default.
Docker
docker compose up --build
The compose file mounts ./docs/pdfs into the container as read-only, so you can add PDFs locally without rebuilding the image.
PDF Folder
Put CODESYS manuals, vendor PDFs, project notes, datasheets, or exported documentation in:
docs/pdfs/
The MCP server extracts text from .pdf files in that folder and makes them available through:
search_codesys_docswithsourceMode: "pdf"orsourceMode: "all"list_codesys_pdfssearch_codesys_pdfsget_codesys_pdf
PDF text extraction is best for searchable text PDFs. Scanned image-only PDFs may return little or no content unless OCR has already been applied. Extracted text may omit diagrams, screenshots, formatting, and some tables, so important engineering details should be verified against the original PDF.
Configuration
| Variable | Default | Description |
|---|---|---|
PORT |
3000 |
HTTP port. |
HOST |
0.0.0.0 |
Bind host. |
OFFICIAL_LOOKUP_ENABLED |
true |
Enables live official CODESYS page lookup. |
OFFICIAL_LOOKUP_TIMEOUT_MS |
3500 |
Fetch timeout per official page. |
OFFICIAL_LOOKUP_CACHE_TTL_SECONDS |
3600 |
In-memory cache TTL for official pages. |
PDF_SEARCH_ENABLED |
true |
Enables text extraction/search for local PDFs. |
PDF_DOCS_DIR |
docs/pdfs |
Folder scanned for .pdf files. |
PDF_MAX_TEXT_CHARS |
200000 |
Maximum extracted text stored per PDF. |
CLI Usage
# HTTP server (default)
node dist/src/cli.js
npm start
# Stdio server (for Claude Code / Codex CLI MCP integration)
node dist/src/cli.js --stdio
npm run start:stdio
Acceptance Checks
npm test
npm run build
curl http://localhost:3000/healthz
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。