Cover image
Try Now
2025-03-15

MCP服务器脚手架工具

3 years

Works with Finder

1

Github Watches

1

Github Forks

3

Github Stars

mcpc

MCP (Model Context Protocol) Server Template Generator

Introduction

mcpc is a command-line tool that generates scaffolding for MCP (Model Context Protocol) server projects. It helps you quickly set up a properly structured project with all necessary files and configurations.

Features

  • Generate MCP server templates for TypeScript or Python
  • Support for multiple package managers (pnpm, yarn, npm for TypeScript; uv for Python)
  • Automatic dependency installation
  • System dependency validation
  • Git repository initialization
  • Complete project structure following official MCP documentation
  • Python test mode for verifying server functionality without Claude
  • Configuration files and best practices included

Installation

Prerequisites

  • Rust and Cargo (can be installed via rustup)

Build and Install

Using Make:

# Build and install in one step
make install

Or using Cargo directly:

# Install from local repository
cargo install --path .

Usage

Basic usage:

mcpc project_name [options]

Options:

  • -l, --language: Programming language to use (py/python, ts/typescript, default: typescript)
  • -t, --tool: Package manager tool to use:
    • For TypeScript: pnpm (default), yarn, npm
    • For Python: uv (default)

Examples:

# Create a TypeScript project named 'weather-api' using pnpm
mcpc weather-api -l ts -t pnpm

# Create a Python project named 'mcp-server' using uv
mcpc mcp-server -l py -t uv

Generated Project Structure

TypeScript Project

project_name/
├── .gitignore
├── .prettierignore
├── .prettierrc
├── package.json
├── README.md
├── tsconfig.json
├── build/
└── src/
    └── index.ts

Python Project

project_name/
├── .gitignore
├── pyproject.toml
├── README.md
├── requirements.txt
├── server.py
└── .venv/

Using Generated Projects

Python

# Activate virtual environment
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies (if not already installed)
uv pip install -r requirements.txt

# Test server functionality without Claude
python server.py --test

# Run server for Claude integration
python server.py

TypeScript

# Install dependencies (if not already installed)
pnpm install  # or: yarn / npm install

# Build the project
pnpm run build  # or: yarn build / npm run build

# Run server
node build/index.js

Claude for Desktop Integration

To integrate with Claude for Desktop, configure your server in Claude's configuration file:

{
  "mcpServers": {
    "weather": {
      "command": "uv",  // or "node" for TypeScript
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/PROJECT",
        "run",
        "server.py"  // or "build/index.js" for TypeScript
      ]
    }
  }
}

Development

Available Make Commands

make              # Build the project (same as 'make build')
make build        # Build the project in debug mode
make release      # Build the project in release mode
make install      # Build in release mode and install
make run          # Run the project in debug mode
make run-release  # Run the project in release mode
make test         # Run tests
make docs         # Generate and open documentation
make clean        # Clean build artifacts
make fmt          # Format code with rustfmt
make check        # Check for compilation errors
make clippy       # Run Clippy lints

Build from Source

git clone https://github.com/yourusername/mcpc.git
cd mcpc
make install

License

This project is licensed under the MIT License - see the LICENSE file for details.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

    Reviews

    1 (1)
    Avatar
    user_npDCYvCW
    2025-04-16

    As a dedicated user of MCP applications, I found Gitcode to be an incredibly efficient and user-friendly coding platform. The interface is intuitive and helps streamline my workflow significantly. Additionally, the support and documentation provided by gitcode-org-com are top-notch. I highly recommend Gitcode for developers looking for a reliable and robust coding tool.