home / mcp / mcp stdio server

MCP Stdio Server

A complete MCP server implementation using stdio with file access, a calculator, and code prompts.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "hotjoebq-hjmcpstdio": {
      "command": "node",
      "args": [
        "dist/server.js"
      ]
    }
  }
}

You deploy a small MCP server that communicates over stdio, exposes file-reading resources, a calculator tool, a directory listing tool, and code review/explanation prompts. It’s easy to run locally, connect from VSCode, and test basic MCP interactions or full tool flows.

How to use

To use this MCP server, first start the server in your project directory after building it. You can connect from a compatible MCP client or from VSCode’s built‑in MCP support. When running, you will be able to request: read access to project files, calculate expressions, list directory contents, and receive code review or code explanations from the bundled prompts.

Recommended flow: build the project, then start the server, and finally connect with your MCP client or VSCode. Once connected, you can invoke these capabilities through the client prompts or tool calls provided by the MCP protocol.

How to install

Prerequisites you need on your machine improve reliability and compatibility. Install a recent LTS version of Node.js and npm.

Steps to set up locally:

npm install
npm run build
npm run start

Configuration and usage notes

VSCode integration is supported without additional MCP tooling. You configure a server entry that uses stdio transport and points to the compiled server. This enables the editor to communicate with the MCP server automatically.

Example VSCode MCP settings snippet to connect to this server:

{
  "mcpServers": {
    "hjmcp_stdio": {
      "command": "node",
      "args": ["dist/server.js"],
      "cwd": "/absolute/path/to/your/hjmcpstdio/directory",
      "transport": "stdio"
    }
  }
}

Testing and capabilities

The server exposes multiple capabilities you can test with a client. Core capabilities include a calculator tool, a directory listing tool, and resource reading. You can also request code review and explain-code prompts for development tasks.

Basic test flow using a client: - Connect to the server with a MCP client over stdio. - Call the calculator tool with an expression like 2 + 3 * 4. - List files in a directory to verify the listing tool works. - Read a project file such as package.json to confirm file resources are accessible. - Request code-review or explain-code prompts for code snippets you provide.

Troubleshooting

If the server does not respond, ensure you have built the project first and that the working directory is correct when starting the server. Confirm that the transport is configured as stdio in your client or editor configuration. Check that the Node.js process has the appropriate permissions to read the project files you intend to access.

Available tools

calculate

Perform mathematical calculations using an input expression string, returning the computed result.

list_files

List files within a specified directory, defaulting to the current directory if none is provided.

code-review

Provide code review suggestions for a given file path with optional focus areas to guide feedback.

explain-code

Explain a code snippet, with an optional language parameter to tailor the explanation.