Get the FREE Ultimate OpenClaw Setup Guide →

mcp -typescript-template

MCP Server Typescript Template

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio minimind-org-mcp-server-typescript-template node dist/index.js

How to use

This MCP server template exposes two simple tools implemented in TypeScript: an Example operation and an Addition tool. The Example operation demonstrates a basic, demonstrative command that can be invoked by an AI model to verify tool invocation and response formatting. The Addition tool performs a straightforward arithmetic addition of two numbers. The server uses the Model Context Protocol SDK to handle communication with clients, enabling structured tool calls, argument passing, and result reporting. To use these tools, start the server (e.g., via node dist/index.js after building) and configure an MCP client to point to the server’s endpoint. Once connected, you can request the Example operation or the Addition tool through the MCP client, pass the required inputs, and receive a structured response with the operation’s result.

The template is designed for experimentation and extension. You can extend the existing operations or add new tools by following the project’s TypeScript structure under common/ and operations/. Each tool should implement a command pattern compatible with the MCP SDK so that models can discover, invoke, and receive results in a consistent format.

How to install

Prerequisites:

  • Node.js v16 or higher
  • npm (or yarn) to install dependencies

Installation steps:

  1. Clone the repository: git clone <repository-url>
  2. Navigate to the project directory: cd mcp-server-typescript-template
  3. Install dependencies: npm install
  4. Build the TypeScript project (if a build step is present): npm run build
  5. Run tests (optional): npm run test
  6. Start the MCP server for testing: npm run start

Notes:

  • Ensure you have your environment set up to compile TypeScript if you’re developing locally (tsconfig.json is provided).
  • If you customize the server entry point, update the start script in package.json accordingly.
  • For client configuration (Claude Desktop or other MCP clients), point to the built server entry (e.g., dist/index.js).

Additional notes

Tips:

  • The template includes a minimal set of tools to demonstrate MCP tool invocation. You can add more operations under the operations/ directory and wire them into the server accordingly.
  • If you encounter path issues after building, ensure the server entry path used in mcp_config matches the actual build output location (commonly dist/index.js).
  • Environment variables can be added if your tools require API keys or configuration (e.g., env: { "API_KEY": "<your-key>" }).
  • When deploying, consider packaging the built dist folder and ensuring the runtime environment has Node.js v16+ installed.

Related MCP Servers

Sponsor this space

Reach thousands of developers