SL

snyk-labs/mcp-server-nodejs-api-docs

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

10 stars 5 forks 品質 61 トレンド 26NOASSERTION

Node.js API ドキュメントの MCP サーバー

概要

このプロジェクトでは、公式 Node.js API ドキュメントへのアクセスを提供するモデルコンテキストプロトコル (MCP) サーバを実装しています。 ドキュメントを nodejs.org から取得し、MCP ツールを通じて公開します。 * 最新の Node.js API のドキュメントを表示します。 * 特定のモジュール、クラス、メソッドのドキュメントをクエリする MCP ツールを提供します。 * 検索ツール(node-search)を提供して、モジュールを検索したり、すべての利用可能なモジュールをメソッドでリストしたりできます。 * すべての利用可能なモジュールの要約を取得するリストツール(ノードリスト)を提供します。 * アクティビティとエラーを /tmp/mcp-server-nodejs-docs.log にピノを使ってログ化します。 1。 このプロジェクトはNode.jsとnpmが必要です。 MCP サーバーを起動するには、ターミナルで次のコマンドを実行します。 サーバは、ドキュメントを初期化、取得し、必要なツールを作成し、標準入力/出力(stdio)上の接続を listen します.

概要(AI 翻訳)

このプロジェクトでは、公式 Node.js API ドキュメントへのアクセスを提供するモデルコンテキストプロトコル (MCP) サーバを実装しています。 ドキュメントを[[T0]から取得し、MCP ツールで公開します。

##特徴

  • 最新の Node.js API のドキュメントを表示します。
  • 特定のモジュール、クラス、メソッドのドキュメントをクエリする MCP ツールを提供します。
  • 検索ツール([node-search])を提供し、すべての利用可能なモジュールをメソッドで見つけることができます。
  • 利用可能なすべてのモジュールの要約を取得するリストツール(node-list)を提供します。
  • [pino] を使用して [[/tmp/mcp-server-nodejs-docs.log]] にアクティビティとエラーをログに記録します。

インストール

  1. リポジトリ(該当する場合):

2.依存関係のインストール: このプロジェクトではNode.jsとnpmが必要です。

使用法

MCP サーバーを起動するには、ターミナルで次のコマンドを実行します。

サーバは、ドキュメントを初期化、取得し、必要なツールを作成し、標準入力/出力(stdio)上の接続を listen します。

デバッグログを有効にするには、[--debug] フラグでサーバーを起動します。

デバッグ

サーバは、fetches、ツールの実行、エラーなどの操作に関する詳細情報を、次のファイルへログアウトします

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

MCP Server for Node.js API Documentation

This project implements a Model Context Protocol (MCP) server that provides access to the official Node.js API documentation. It fetches the documentation from nodejs.org and exposes it through MCP tools.

Features

  • Fetches the latest Node.js API documentation.
  • Provides MCP tools to query documentation for specific modules, classes, or methods.
  • Offers a search tool (node-search) to find modules or list all available modules with their methods.
  • Offers a list tool (node-list) to get a summary of all available modules.
  • Logs activity and errors to /tmp/mcp-server-nodejs-docs.log using pino.

Installation

  1. Clone the repository (if applicable):
    git clone 
    cd 
    
  2. Install dependencies: This project requires Node.js and npm.
    npm install
    

Usage

To start the MCP server, run the following command in your terminal:

npm run start

The server will initialize, fetch the documentation, create the necessary tools, and then listen for connections over standard input/output (stdio).

To enable debug logging, start the server with the --debug flag:

node index.js --debug

Debugging

The server logs detailed information about its operations, including fetches, tool executions, and errors, to the following file:

/tmp/mcp-server-nodejs-docs.log

You can monitor this file to debug issues:

tail -f /tmp/mcp-server-nodejs-docs.log

Testing with MCP Inspector

Use the built-in debug script:

npm run debug

Or directly via npx:

npx -y @modelcontextprotocol/inspector node index.js

Connecting to MCP Clients

This server communicates over standard input/output (stdio). To connect it to MCP clients like Cursor or Qodo AI, you need to configure the client to launch the server using its command.

Example Configuration (Conceptual):

Most clients will have a settings area where you can add custom MCP servers. You’ll typically need to provide:

  1. A Name: e.g., “Node.js API Documentation”

  2. The Command: The command to execute the server. Make sure to provide the absolute path to node and the index.js file, or ensure node is in the PATH environment variable accessible by the client.

    # Example - replace with your actual absolute paths
    /path/to/your/node /path/to/your/project/index.js
    
    • Finding Node Path: Run which node in your terminal.
    • Finding Project Path: Navigate to the project directory and run pwd.

Refer to your specific MCP client’s documentation for the exact steps on adding a stdio-based server.

Example using Cursor:

  1. Go to Settings -> Cursor Settings -> MCP Servers.
  2. Click Add Server.
  3. Enter a name (e.g., “NodeJS API Documentation”).
GitHub で README 全文を見る

インストール

npx -y @modelcontextprotocol/inspector node index.js
MCP 初心者?mcpskill.org のガイドから始めましょう →