Usage Guide
This guide provides detailed information on how to run and interact with the Deepwiki MCP Server CLI.
CLI Command
The primary executable for this project is mcp-instruct, which is defined in the package.json file. When installed from source, you can run it directly.
# From the project root
node bin/cli.mjs [options]
Transport Modes
The server supports three different transport modes for communication with MCP clients. You select the mode using command-line flags.
1. Stdio (Default)
This is the default mode and is typically used when a parent process (like an IDE extension) spawns the server as a child process. Communication happens over stdin and stdout.
To run in stdio mode:
node bin/cli.mjs
# or explicitly
node bin/cli.mjs --stdio
The dev-stdio script in package.json is configured for local development with the MCP Inspector:
pnpm run dev-stdio
2. HTTP
In this mode, the server listens for HTTP POST requests on a specified port and endpoint. This is useful for integrations where a client communicates over a network.
To run in HTTP mode:
node bin/cli.mjs --http --port 4200 --endpoint /mcp
--http: Enables HTTP mode.--port <number>: Sets the listening port (default:3000).--endpoint <path>: Sets the API endpoint path (default:/mcp).
The dev-http script provides a convenient way to run this locally:
pnpm run dev-http
This will start the server on port 4200.
3. SSE (Server-Sent Events)
This mode uses Server-Sent Events for real-time, unidirectional communication from the server to the client. It's suitable for streaming progress events or other updates.
To run in SSE mode:
node bin/cli.mjs --sse --port 4201
--sse: Enables SSE mode.--port <number>: Sets the listening port (default:3000).
The dev-sse script is available for local development:
pnpm run dev-sse
This starts the server on port 4201.