
captaincrouton89/mcp-boilerplate
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
captaincrouton89/mcp-boilerplateは[https://github.com/captaincrouton89/mcp-boilerplate.から輸入されるMCPサーバーの候補者です
概要
captaincrouton89/mcp-boilerplateは[https://github.com/captaincrouton89/mcp-boilerplate.から輸入されるMCPサーバーの候補者です
概要(AI 翻訳)
MCP (Model Context Protocol) サーバを構築するスターターテンプレート。 このボイラープレートは、Claude Desktop、Cursor、Claude Code、Gemini、その他のMCP対応AIアシスタントと統合できる独自のMCPサーバーを作成するためのクリーンな基盤を提供します。
目的
このボイラプレートは、すぐに構築を開始するのに役立ちます:
- AIアシスタントのためのカスタムツール
- 動的コンテンツのリソースプロバイダ
- 一般的な操作のためのプロンプトテンプレート
- 外部 API およびサービスの統合ポイント
##特徴
- 「hello-world」と「get-mcp-docs」の2つの例のツール
- ES2022 ターゲットと ES モジュールの TypeScript サポート
- マルチクライアントインストールスクリプト(デスクトップ、カーソル、クロードコード、ジェミニなど)
- 自動npm公開ワークフロー
- [
.env.localによる環境変数サポート - Zodの検証とクリーンなプロジェクト構造
使い方
このMCPサーバーテンプレートは以下を提供します。
- MCP SDK を使用した基本的なサーバ設定
- 導入事例
- ビルドとインストールスクリプト
- 開発のためのTypeScript構成
含まれた例は、name パラメータを取り、挨拶を返す簡単なツールを作成する方法を示します。
はじめる
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCP Server Boilerplate
A starter template for building MCP (Model Context Protocol) servers. This boilerplate provides a clean foundation for creating your own MCP server that can integrate with Claude Desktop, Cursor, Claude Code, Gemini, and other MCP-compatible AI assistants.
Purpose
This boilerplate helps you quickly start building:
- Custom tools for AI assistants
- Resource providers for dynamic content
- Prompt templates for common operations
- Integration points for external APIs and services
Features
- Two example tools: “hello-world” and “get-mcp-docs”
- TypeScript support with ES2022 target and ES modules
- Multi-client installation scripts (Claude Desktop, Cursor, Claude Code, Gemini, etc.)
- Automatic npm publishing workflow
- Environment variable support via
.env.local - Clean project structure with Zod validation
How It Works
This MCP server template provides:
- A basic server setup using the MCP SDK
- Example tool implementation
- Build and installation scripts
- TypeScript configuration for development
The included example demonstrates how to create a simple tool that takes a name parameter and returns a greeting.
Getting Started
Option 1: Use the Published Package (Recommended)
You can use this MCP server directly without cloning:
# Run the server directly with npx
npx @r-mcp/boilerplate
Option 2: Customize and Develop
# Clone the boilerplate
git clone
cd mcp-server-boilerplate
# Install dependencies
pnpm install
# Build the project
pnpm run build
# Start the server
pnpm start
Installation Scripts
This boilerplate includes convenient installation scripts for different MCP clients:
# Install to all MCP clients (Claude Desktop, Cursor, Claude Code, Gemini, MCP)
pnpm run install-server
# Install to specific clients
pnpm run install-desktop # Claude Desktop
pnpm run install-cursor # Cursor IDE
pnpm run install-code # Claude Code CLI
pnpm run install-code-library # Claude Code Library (~/.claude/mcp-library/)
pnpm run install-mcp # Local .mcp.json for development
# You can also combine multiple targets:
node scripts/update-config.js cursor code desktop
These scripts will:
- Build the project automatically (TypeScript compilation + chmod permissions)
- Configure clients to use
npx @r-mcp/@latest(auto-updating) - Only the local
.mcp.jsonuses the development version (node dist/index.js) - Include environment variables from
.env.localif present
Publishing Your Server
To publish your customized MCP server:
# Build, commit, and publish to npm in one command
pnpm run release
This script (scripts/build-and-publish.js) will:
- Commit any pending changes first
- Update package name to
@r-mcp/ - Update bin name to match directory
- Increment patch version automatically
- Build the TypeScript project
- Commit version bump to git
インストール
npx -y @r-mcp/boilerplate@latest設定
{
"mcpServers": {
"boilerplate": {
"command": "npx",
"args": ["-y", "@r-mcp/boilerplate@latest"],
"env": {
// Environment variables from .env.local are included here
}
}
}
}