Markdown Documentation Sidecar MCP server

Exposes markdown documentation from NPM packages as accessible resources or tools, enabling direct access to package documentation within conversations through stdio or SSE transport methods.
Back to servers
Setup instructions
Provider
Speakeasy API
Release date
Mar 21, 2025
Language
TypeScript
Stats
1 star

This NPM package provides a server that adheres to the Model Context Protocol (MCP), allowing markdown documentation from NPM packages, Go Modules, or PyPi packages to be exposed for use with AI-assisted coding tools. It helps create better code generation experiences by providing contextual documentation to AI tools.

Installation

You can run the server directly using npx without installation:

npx -y markdown-sidecar-mcp

Configuration Options

The server accepts the following configuration parameters:

  • workingDir: The working directory of your repository
  • packageName: The name of the package or module to request
  • registry: Package registry type (npm, gomodules, or pypi)
  • docsSubDir: (Optional) Specific subdirectory to look for markdown docs (defaults to package root)
  • mcpPrimitive: (Optional) MCP primitive to expose (tool or resource, defaults to tool)

Setting Up with Cursor Editor

To use this server with the Cursor editor, add a server definition to your .cursor/mcp.json file:

{
  "mcpServers": {
    "sidecar": {
      "command": "npx",
      "args": [
        "-y", "--package", "markdown-sidecar-mcp",
        "--",
        "mcp", "start",
        "--workingDir", "{REPO_WORKING_DIR}",
        "--packageName", "{PACKAGE_NAME}",
        "--registry", "npm"
      ]
    }
  }
}

Usage Examples

Accessing NPM Package Documentation

To serve documentation for a specific NPM package:

npx -y markdown-sidecar-mcp mcp start --workingDir ./my-project --packageName react --registry npm

Accessing Go Module Documentation

For Go modules:

npx -y markdown-sidecar-mcp mcp start --workingDir ./my-go-project --packageName github.com/gorilla/mux --registry gomodules

Accessing PyPi Package Documentation

For Python packages:

npx -y markdown-sidecar-mcp mcp start --workingDir ./my-python-project --packageName requests --registry pypi

Specifying a Documentation Subdirectory

If documentation is in a specific subdirectory:

npx -y markdown-sidecar-mcp mcp start --workingDir ./my-project --packageName lodash --registry npm --docsSubDir docs

Exposing as MCP Resource

To expose the documentation as a resource instead of a tool:

npx -y markdown-sidecar-mcp mcp start --workingDir ./my-project --packageName express --registry npm --mcpPrimitive resource

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "sidecar" '{"command":"npx","args":["-y","--package","markdown-sidecar-mcp","--","mcp","start","--workingDir","{REPO_WORKING_DIR}","--packageName","{PACKAGE_NAME}","--registry","npm"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "sidecar": {
            "command": "npx",
            "args": [
                "-y",
                "--package",
                "markdown-sidecar-mcp",
                "--",
                "mcp",
                "start",
                "--workingDir",
                "{REPO_WORKING_DIR}",
                "--packageName",
                "{PACKAGE_NAME}",
                "--registry",
                "npm"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "sidecar": {
            "command": "npx",
            "args": [
                "-y",
                "--package",
                "markdown-sidecar-mcp",
                "--",
                "mcp",
                "start",
                "--workingDir",
                "{REPO_WORKING_DIR}",
                "--packageName",
                "{PACKAGE_NAME}",
                "--registry",
                "npm"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later