Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Stdio Serverlist the files in the src directory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Stdio Server
A complete Model Context Protocol (MCP) server implementation using stdio transport that showcases:
Resources: File system access to read project files (README.md, package.json, src/server.ts)
Tools: Calculator for mathematical operations and file listing
Prompts: Code review and code explanation assistants
Features
MCP server with stdio transport
File reading resources for project files
Mathematical calculator tool
Directory listing tool
Code review and explanation prompt templates
VSCode integration ready
Test client for basic functionality testing
Setup
Install dependencies:
Build the project:
Testing Options
Option 1: Basic Functionality Test (No Additional Tools Required)
This runs a simple client that tests basic MCP communication with the server.
Option 2: Comprehensive Testing (Requires mcp-cli Installation)
First, install mcp-cli globally:
Then run comprehensive tests:
VSCode Integration (No mcp-cli Required)
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:
Important Notes:
Replace
/absolute/path/to/your/hjmcpstdio/directorywith the actual absolute path to this project directoryMake sure you've run
npm run buildfirst to compile the TypeScriptVSCode will handle all MCP communication automatically - no additional tools needed
Available npm Scripts
npm 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 files
Server Capabilities
Resources
file://README.md- Project documentationfile://package.json- Package configurationfile://src/server.ts- Server source code
Tools
calculate- Perform mathematical calculationsInput:
{"expression": "mathematical expression"}Example:
{"expression": "2 + 3 * 4"}
list_files- List files in a directoryInput:
{"directory": "relative path"}(optional, defaults to ".")Example:
{"directory": "src"}
Prompts
code-review- Get code review suggestionsArguments:
file_path(required),focus_areas(optional)
explain-code- Get code explanationsArguments:
code_snippet(required),language(optional)
Project Structure
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 configuration
Testing Summary
Quick Testing (No Additional Setup):
Use
npm run test-simplefor basic functionality verification
Comprehensive Testing (Requires mcp-cli):
Install mcp-cli globally:
npm install -g @modelcontextprotocol/cliUse mcp-cli commands for detailed tool and resource testing
VSCode Integration (No mcp-cli Needed):
Add server configuration to VSCode MCP settings
VSCode handles MCP communication automatically
The server has been tested with:
✅ Tool functionality (calculate, list_files)
✅ Resource reading (package.json confirmed working)
✅ Stdio transport communication
✅ MCP protocol compliance
✅ Cross-platform compatibility (Windows, macOS, Linux)