Skip to content
Start free evaluation

Use the docs from AI tools

pdcomm-docs is a command-line tool that searches and reads the PDComm documentation. The same program also runs as a Model Context Protocol (MCP) server, so AI coding tools such as Claude Code and Cursor can look up the guides and the API reference while they answer your questions.

pdcomm-docs reads a local copy of the search index, so it works without an internet connection.

Download the offline docs bundle and extract it to a folder of your choice. The bundle has this layout:

pdcomm-docs/
├── bin/
│ └── pdcomm-docs pdcomm-docs.exe on Windows
└── site/ the offline documentation site (index.html is the docs home)
└── search-index.json the index that the CLI and MCP server read

bin/pdcomm-docs finds site/search-index.json in its own bundle. If you move the program somewhere else, pass the index file with --index.

To check the installation, print the version:

터미널 창
pdcomm-docs --version

The examples on this page assume that you extracted the bundle to /opt/pdcomm-docs. On Windows, use your actual path, such as C:\PDComm\pdcomm-docs.

The search command lists the most relevant sections first, with their title, URL, and a snippet:

터미널 창
pdcomm-docs search "holding registers" --product modbus
pdcomm-docs search 보유 레지스터 읽기

A query that contains Hangul searches the Korean pages; any other query searches the English pages. To choose the language yourself, add --lang en or --lang ko. To make one language the default, set the PDCOMM_DOCS_LANG environment variable to en or ko.

To read a result as Markdown, pass its URL or ID to get. If the URL ends with a # fragment, you get that section and its subsections only.

터미널 창
pdcomm-docs get /docs/en/modbus/quickstart/
pdcomm-docs get /docs/en/modbus/quickstart/ --lang ko

These are the commands you use most:

Command What it does
search <query> Searches the docs. Narrow the results with --product, --lang, and --limit.
get <url-or-id> Prints a page or section as Markdown. Use --lang to open the other language.
api <name-or-glob> Shows the signature, parameters, and return value of C, C++, and .NET symbols. Supports * and ? wildcards.
list Lists the pages and sections of each product in sidebar order.
serve Serves the offline docs site on your computer.
mcp Runs the MCP server. Your AI tool starts this command.

Add --json to search, get, api, or list to get JSON output for scripts:

터미널 창
pdcomm-docs api 'pdcomm_modbus_*' --surface c
pdcomm-docs list --product modbus --json

For every option, output format, and exit code, see the pdcomm-docs command reference.

The serve command serves the bundle’s site/ folder on a web server that only your computer can reach. Add --open to open it in your browser:

터미널 창
pdcomm-docs serve --open

The default address is http://127.0.0.1:8787/. If that port is in use, pick another one with --port. To stop the server, press Ctrl+C in the terminal.

The MCP server provides the following tools. All of them only read the docs; they never change files or devices.

Tool What it does
docs_search Searches the docs in English or Korean and returns URLs with snippets.
docs_get_page Returns a page or section as Markdown, in parts for long pages.
docs_api_lookup Finds API symbols by name or wildcard and returns their signatures and descriptions.
docs_list_sections Returns the pages and sections of each product.

The server also exposes every page as a resource, such as pdcomm-docs://en/docs/modbus/quickstart.

Register the server from your terminal:

터미널 창
claude mcp add --transport stdio pdcomm-docs -- /opt/pdcomm-docs/bin/pdcomm-docs mcp

By default, the server is available only to you in the current project (local scope). Add --scope user to use it in every project, or --scope project to record it in the repository’s .mcp.json and share it with your team. You can also edit .mcp.json yourself:

.mcp.json
{
"mcpServers": {
"pdcomm-docs": {
"type": "stdio",
"command": "/opt/pdcomm-docs/bin/pdcomm-docs",
"args": ["mcp"],
"env": { "PDCOMM_DOCS_LANG": "en" }
}
}
}

To check the connection, run claude mcp list, or enter /mcp in a session.

On Windows, double the backslashes in JSON paths, for example "command": "C:\\PDComm\\pdcomm-docs\\bin\\pdcomm-docs.exe".

After you connect the server, ask your AI tool a question such as “How do I connect to a server in the PDComm Modbus quickstart?” The tool calls docs_search and docs_get_page and bases its answer on the docs.

With --remote, pdcomm-docs downloads the current index from the public site instead of the bundled copy. This option runs your system’s curl and accepts HTTPS addresses only, except for plain HTTP on localhost.

터미널 창
pdcomm-docs search session --remote https://pdcomm.podosoft.io/docs/search-index.json

pdcomm-docs picks the index in this order:

  1. --index <file>
  2. --remote <url>
  3. search-index.json in the --root <folder>
  4. The PDCOMM_DOCS_INDEX environment variable
  5. site/search-index.json in the bundle next to the program

Command-line options take precedence over the environment variable.

You get a no search index found error. The program isn’t in the bin/ folder of a bundle. Pass search-index.json with --index, or set the PDCOMM_DOCS_INDEX environment variable.

Your AI tool can’t connect to the server. Check that command in the configuration is the absolute path of the executable. Run pdcomm-docs search test in a terminal to see the error message. The MCP server writes only protocol messages to standard output and sends errors to standard error.

Results come back in the other language. Add --lang, or add PDCOMM_DOCS_LANG to env in the MCP configuration.