Get the FREE Ultimate OpenClaw Setup Guide →

template

MCP server from BoLiDev/template-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio bolidev-template-mcp-server npm run dev \
  --env ENV_KEY="Sample environment variable"

How to use

This MCP server template provides a ready-to-use starting point for building a Model Context Protocol (MCP) server in TypeScript. The project uses npm scripts to manage development, including building, watching for changes, linting, formatting, and running the server in development mode. To start the server during development, the recommended command is npm run dev, which typically compiles TypeScript sources (if needed) and launches the main entry point for the MCP server. The repository's structure indicates the main entry is src/index.ts, which will be compiled or executed depending on the setup. You can also use npm run build to produce a production-ready bundle and npm run watch to auto-rebuild on file changes. Tools provided by this template include a built-in linting step, formatting, and an Inspector-based test workflow via npm run inspect (as described by the development section).

How to install

Prerequisites:

  • Node.js (LTS version) and npm installed on your system
  • Git for cloning the repository

Installation steps:

  1. Clone the repository: git clone <repository-url>
  2. Navigate to the project directory: cd bolidev-template-mcp-server
  3. Install dependencies: npm install
  4. Build the project (if you plan to run a production build): npm run build
  5. Run the server in development mode: npm run dev

Optional development tools:

  • Start watch mode (auto-rebuild on changes): npm run watch
  • Lint the code: npm run lint
  • Format the code: npm run format
  • Run tests with Inspector: npm run inspect

Additional notes

Environment variables:

  • ENV_KEY: Sample environment variable (as noted in the README). Add any additional environment-specific configuration here.

Common issues:

  • If npm install fails due to network restrictions, configure npm to use a proxy or check your network settings.
  • Ensure TypeScript compiler options align with your runtime target when building.
  • If the dev script relies on a compiled output, ensure the build step completes successfully before starting the dev server.

Configuration tips:

  • Use npm run watch during development to automatically rebuild on changes.
  • Use npm run lint and npm run format to maintain code quality and consistency.
  • If you publish or reuse this template, consider adjusting the npm package name or scripts to fit your project workflow.

Related MCP Servers

Sponsor this space

Reach thousands of developers