A complete MCP server implementation using stdio with file access, a calculator, and code prompts.
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.
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.
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 startVSCode 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"
}
}
}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.
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.
Perform mathematical calculations using an input expression string, returning the computed result.
List files within a specified directory, defaulting to the current directory if none is provided.
Provide code review suggestions for a given file path with optional focus areas to guide feedback.
Explain a code snippet, with an optional language parameter to tailor the explanation.