HelpNDoc includes a Model Context Protocol (MCP) server that lets GitHub Copilot access HelpNDoc tools and work with the project currently open in HelpNDoc.

Prerequisites

Visual Studio Code and GitHub Copilot must be installed locally on the same Windows computer as HelpNDoc.

Install Visual Studio Code from the official download page: Download Visual Studio Code

Install GitHub Copilot by following GitHub's official instructions: Install the GitHub Copilot extension

You must also sign in to Visual Studio Code with a GitHub account that has access to GitHub Copilot.

Configure the HelpNDoc MCP server port

The HelpNDoc MCP server uses port 8933 by default.

To review or change the port:

  1. In HelpNDoc, select "File", then "Options".
  2. Select "Artificial Intelligence (AI)".
  3. Locate the "MCP Server" section.
  4. Enter the required port number in the "Port" field.
  5. Confirm the changes.

The port configured in Visual Studio Code must match the port configured in HelpNDoc.

Start the HelpNDoc MCP server

Before connecting from Visual Studio Code:

  1. Open the "Tools" ribbon tab in HelpNDoc.
  2. Locate the "Services" group.
  3. Click "Start MCP server".

Once the server is running, the command changes to "Stop MCP server". Click it to stop the server manually.

The MCP server also stops automatically when HelpNDoc is closed.

Register HelpNDoc in Visual Studio Code

Keep HelpNDoc running with its MCP server started.

To add HelpNDoc using the Visual Studio Code configuration assistant:

  1. Open Visual Studio Code.
  2. Open the Command Palette by pressing Ctrl+Shift+P.
  3. Enter and select "MCP: Add Server".
  4. Select "HTTP" as the server type.
  5. Enter the following server URL: http://localhost:8933/mcp
  6. Enter HelpNDoc as the server ID.
  7. Select where the configuration should be stored:
    • Select "Global" to make HelpNDoc available in every Visual Studio Code workspace.
    • Select "Workspace" to make it available only in the current workspace.
  1. Save the configuration.
  2. Confirm that you trust the server when Visual Studio Code displays a trust prompt.

When another port is configured in HelpNDoc, replace 8933 with that port number.

For most users, the global configuration is preferable because the HelpNDoc server operates independently of the workspace currently open in Visual Studio Code.

Alternative manual configuration

You can also register HelpNDoc by editing the Visual Studio Code MCP configuration file directly.

Global configuration

To make HelpNDoc available in every workspace:

  1. Open the Command Palette by pressing Ctrl+Shift+P.
  2. Enter and select "MCP: Open User Configuration".
  3. Add the HelpNDoc server to the servers object:

{

  "servers": {

    "HelpNDoc": {

      "type": "http",

      "url": "http://localhost:8933/mcp"

    }

  }

}

  1. Save the file.

When the configuration already contains other servers, add the HelpNDoc entry to the existing servers object instead of replacing the complete file.

Workspace configuration

To make HelpNDoc available only in the current Visual Studio Code workspace, create or edit this file: .vscode/mcp.json

Add the following configuration:

{

  "servers": {

    "HelpNDoc": {

      "type": "http",

      "url": "http://localhost:8933/mcp"

    }

  }

}

A workspace configuration can be committed to source control and shared with other users. Each user must still run HelpNDoc locally and start its MCP server.

Do not configure the same server globally and in the workspace, as duplicate configurations can cause conflicts.

Start and inspect the server in Visual Studio Code

To view the registered MCP servers:

  1. Open the Command Palette by pressing Ctrl+Shift+P.
  2. Enter and select "MCP: List Servers".
  3. Select "HelpNDoc".

Visual Studio Code displays the available server management actions. Depending on its current state, these can include:

  • Start
  • Stop
  • Restart
  • Enable
  • Disable
  • Show Output

Start the server if it is not already running.

The first time Visual Studio Code connects to HelpNDoc, it might ask you to confirm that you trust the server. Approve the prompt after verifying that the URL points to the local HelpNDoc server.

View the available HelpNDoc tools

To inspect the tools provided by HelpNDoc:

  1. Open GitHub Copilot Chat.
  2. Select "Agent" from the agent picker.
  3. Click the "Configure Tools" icon in the chat input.
  4. Locate and expand "HelpNDoc".

The tools exposed by the HelpNDoc MCP server are listed below the server name. You can enable or disable individual tools before submitting a request.

Select only the tools relevant to the current task when you want tighter control over what Copilot can use.

You can also ask Copilot:

List the tools available from the HelpNDoc MCP server and briefly explain what each tool does.

Use HelpNDoc from GitHub Copilot Chat

Keep the HelpNDoc project open and its MCP server running.

To use it:

  1. Open GitHub Copilot Chat in Visual Studio Code.
  2. Select "Agent" from the agent picker.
  3. Make sure the required HelpNDoc tools are enabled in "Configure Tools".
  4. Enter a natural-language instruction that clearly identifies HelpNDoc and the requested operation.

For example:

  • Use the HelpNDoc MCP server to describe the currently open HelpNDoc project and list its topics.
  • Use HelpNDoc to find the topic named "Getting Started".
  • Use HelpNDoc to create a new topic named "Installation".
  • Review the structure of the currently open HelpNDoc project and suggest improvements. Do not modify the project.
  • Update the selected HelpNDoc topic using the following content: ...
  • Find all HelpNDoc topics that mention installation requirements and summarize them.

Copilot selects and invokes the appropriate HelpNDoc tools. It might ask you to confirm a tool call before it proceeds.

Control tool approvals

Visual Studio Code can request confirmation before an MCP tool is invoked.

Review the tool name and supplied arguments before approving an operation, particularly when the tool can create, update, move, or delete project content.

For safer operation, first ask Copilot to inspect the project and describe its proposed changes:

Inspect the currently open HelpNDoc project and explain the changes you recommend. Do not modify anything.

After reviewing the proposal, explicitly ask Copilot to apply the approved changes.

Help Copilot select the correct server

When several MCP servers or tools are available, mention HelpNDoc explicitly in the request.

For example: Use the HelpNDoc MCP server to list the topics in the currently open HelpNDoc project.

You can also disable unrelated tools temporarily from the "Configure Tools" picker.

Troubleshoot the connection

When HelpNDoc does not appear or its tools are unavailable, verify that:

  • HelpNDoc is running.
  • A HelpNDoc project is open.
  • "Start MCP server" has been clicked.
  • The port in Visual Studio Code matches the port configured in HelpNDoc.
  • The server URL ends with /mcp.
  • Visual Studio Code and HelpNDoc are running on the same computer.
  • The HelpNDoc server is enabled in "MCP: List Servers".
  • You approved the Visual Studio Code trust prompt.
  • A firewall or security application is not blocking the local connection.
  • Your organization's Copilot policy permits MCP servers.

To inspect connection errors:

  1. Open the Command Palette.
  2. Run "MCP: List Servers".
  3. Select "HelpNDoc".
  4. Select "Show Output".

The MCP output log contains connection and tool-discovery messages that can help identify configuration problems.

After changing the HelpNDoc port or the MCP configuration, restart the server from "MCP: List Servers".

Stop the HelpNDoc MCP server

When the integration is no longer needed:

  1. Return to HelpNDoc.
  2. Open the "Tools" ribbon tab.
  3. Locate the "Services" group.
  4. Click "Stop MCP server".

The server also stops automatically when HelpNDoc is closed.