An MCP server using stdio transport, offering file system access, a calculator, and a code review tool. Requires Node.js.
A complete Model Context Protocol (MCP) server implementation using stdio transport that showcases:
npm install
npm run build
npm run test-simple
This runs a simple client that tests basic MCP communication with the server.
First, install mcp-cli globally:
npm install -g @modelcontextprotocol/cli
Then run comprehensive tests:
# Set the MCP configuration
export MCP_CLI_CONFIG_PATH=$(pwd)/mcp_config.json
# On Windows Command Prompt, use: set MCP_CLI_CONFIG_PATH=%cd%\mcp_config.json
# List available tools
mcp-cli tool list --server hjmcp-stdio
# Test calculator tool
mcp-cli tool call calculate --server hjmcp-stdio --input '{"expression": "2 + 3 * 4"}'
# Test file listing tool
mcp-cli tool call list_files --server hjmcp-stdio --input '{"directory": "."}'
# Test resource reading
mcp-cli tool read file://package.json --server hjmcp-stdio
VSCode has built-in MCP support and connects directly to your server. You do NOT need to install mcp-cli for VSCode integration.
Add this to your VSCode MCP settings to use this server:
{
"mcpServers": {
"hjmcp-stdio": {
"command": "node",
"args": ["dist/server.js"],
"cwd": "/absolute/path/to/your/hjmcpstdio/directory",
"transport": "stdio"
}
}
}
Important Notes:
/absolute/path/to/your/hjmcpstdio/directory
with the actual absolute path to this project directorynpm run build
first to compile the TypeScriptnpm run build
- Compile TypeScript to JavaScriptnpm run dev
- Watch mode compilationnpm run start
- Run the MCP server directlynpm run test-simple
- Run basic client testnpm run clean
- Remove build filesfile://README.md
- Project documentationfile://package.json
- Package configurationfile://src/server.ts
- Server source codecalculate
- Perform mathematical calculations
{"expression": "mathematical expression"}
{"expression": "2 + 3 * 4"}
list_files
- List files in a directory
{"directory": "relative path"}
(optional, defaults to "."){"directory": "src"}
code-review
- Get code review suggestions
file_path
(required), focus_areas
(optional)explain-code
- Get code explanations
code_snippet
(required), language
(optional)src/server.ts
- Main MCP server implementationsrc/simple-client.ts
- Basic test clientmcp_config.json
- MCP CLI configuration for testingpackage.json
- Project configuration and dependenciestsconfig.json
- TypeScript configurationQuick Testing (No Additional Setup):
npm run test-simple
for basic functionality verificationComprehensive Testing (Requires mcp-cli):
npm install -g @modelcontextprotocol/cli
VSCode Integration (No mcp-cli Needed):
The server has been tested with:
Access DevRev's APIs to manage work items, parts, search, and user information.
A knowledge management tool for code repositories using vector embeddings, powered by a local Ollama service.
An example of a remote MCP server deployable on Cloudflare Workers without authentication.
Provides access to the Lucide icon library for use in LLM and agentic applications.
Search and access Laravel documentation from version 6.x onwards, with automatic daily updates.
A Model Context Protocol server that provides access to the connpass users API v2, utilizing Gemini for grounding.
Enables IDEs like Cursor and Windsurf to analyze large codebases using Gemini's 1M context window.
Access real-time and historical token, wallet, and trading data from the Solana ecosystem via the Solana Tracker API.
A server for securely executing commands on the host system, requiring Java 21 or higher.
Manages Infrastructure as Code (IaC) operations using Ansible and Terraform. Requires external tools and manual setup.