codingwithswapnil/my-mcp-server
3.1
If you are the rightful owner of my-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This document provides a comprehensive overview of an example Model Context Protocol (MCP) server implementation using Node.js and TypeScript.
Tools
5
Resources
0
Prompts
0
Example MCP Server
An example implementation of a Model Context Protocol (MCP) server using src/index.ts.
Prerequisites
- Node.js v18 or newer
- npm
Installation
npm install
Build
Compile the TypeScript source code:
npm run build
Run the Server
Start the MCP server:
npm start
Or directly:
node build/index.js
Development
To automatically rebuild and restart on changes:
npm run dev
MCP Inspector
To inspect the server with the MCP Inspector:
npm run mcp-inspector
Usage
The server exposes several tools:
echo: Echoes back input text.add_numbers: Adds two numbers.multiply_numbers: Multiplies two numbers.get_time: Returns the current time.file_operations: Read, write, or list files/directories.
See src/index.ts for implementation details.
License
MIT