Cover image
Try Now
2025-04-14

3 years

Works with Finder

0

Github Watches

1

Github Forks

0

Github Stars

my-mcp-server

A Model Context Protocol (MCP) server built with mcp-framework.

Quick Start

# Install dependencies
npm install

# Build the project
npm run build

Project Structure

my-mcp-server/
├── src/
│   ├── tools/        # MCP Tools
│   │   └── ExampleTool.ts
│   └── index.ts      # Server entry point
├── package.json
└── tsconfig.json

Adding Components

The project comes with an example tool in src/tools/ExampleTool.ts. You can add more tools using the CLI:

# Add a new tool
mcp add tool my-tool

# Example tools you might create:
mcp add tool data-processor
mcp add tool api-client
mcp add tool file-handler

Tool Development

Example tool structure:

import { MCPTool } from "mcp-framework";
import { z } from "zod";

interface MyToolInput {
  message: string;
}

class MyTool extends MCPTool<MyToolInput> {
  name = "my_tool";
  description = "Describes what your tool does";

  schema = {
    message: {
      type: z.string(),
      description: "Description of this input parameter",
    },
  };

  async execute(input: MyToolInput) {
    // Your tool logic here
    return `Processed: ${input.message}`;
  }
}

export default MyTool;

Publishing to npm

  1. Update your package.json:

    • Ensure name is unique and follows npm naming conventions
    • Set appropriate version
    • Add description, author, license, etc.
    • Check bin points to the correct entry file
  2. Build and test locally:

    npm run build
    npm link
    my-mcp-server  # Test your CLI locally
    
  3. Login to npm (create account if necessary):

    npm login
    
  4. Publish your package:

    npm publish
    

After publishing, users can add it to their claude desktop client (read below) or run it with npx


## Using with Claude Desktop

### Local Development

Add this configuration to your Claude Desktop config file:

**MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`

```json
{
  "mcpServers": {
    "my-mcp-server": {
      "command": "node",
      "args":["/absolute/path/to/my-mcp-server/dist/index.js"]
    }
  }
}

After Publishing

Add this configuration to your Claude Desktop config file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "my-mcp-server": {
      "command": "npx",
      "args": ["my-mcp-server"]
    }
  }
}

Building and Testing

  1. Make changes to your tools
  2. Run npm run build to compile
  3. The server will automatically load your tools on startup

Learn More

相关推荐

  • av
  • Exécutez sans effort LLM Backends, API, Frontends et Services avec une seule commande.

  • 1Panel-dev
  • 🔥 1Panel fournit une interface Web intuitive et un serveur MCP pour gérer des sites Web, des fichiers, des conteneurs, des bases de données et des LLM sur un serveur Linux.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 LLM 资料总结 (数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Résumé des meilleures ressources LLM du monde.

  • rulego
  • ⛓️RULEGO est un cadre de moteur de règle d'orchestration des composants de nouvelle génération légère, intégrée, intégrée et de nouvelle génération pour GO.

  • sigoden
  • Créez facilement des outils et des agents LLM à l'aide de fonctions Plain Bash / JavaScript / Python.

  • hkr04
  • SDK C ++ MCP (Protocole de contexte modèle léger)

  • RockChinQ
  • 😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 QQ / 微信 (企业微信、个人微信) / 飞书 / 钉钉 / Discord / Telegram / Slack 等平台 | 支持 Chatgpt 、 Deepseek 、 Dify 、 Claude 、 GEMINI 、 XAI 、 PPIO 、 OLLAMA 、 LM Studio 、阿里云百炼、火山方舟、 Siliconflow 、 Qwen 、 Moonshot 、 ChatGlm 、 Sillytraven 、 MCP 等 LLM 的机器人 / Agent | Plateforme de bots de messagerie instantanée basés sur LLM, prend en charge Discord, Telegram, WeChat, Lark, Dingtalk, QQ, Slack

  • dmayboroda
  • Rag de conversation sur site avec des conteneurs configurables

  • modelscope
  • Commencez à construire des applications multi-agents LLM, plus facilement.

  • paulwing
  • Un référentiel de test créé à l'aide du service MCP

    Reviews

    1.9 (9)
    Avatar
    user_7YIJHiyL
    2025-04-24

    I've been using mcp-test for a while now and it's a phenomenal tool. Developed by RajanGit86, it offers an intuitive interface and robust functionality that makes my work much smoother. The welcome information and comprehensive start URL make it beginner-friendly as well. If you’re looking for a reliable application, mcp-test should definitely be on your list!

    Avatar
    user_sq4UyRM4
    2025-04-24

    I have been using mcp-test for a while, and it has exceeded my expectations! The functionalities provided are both innovative and practical, making it an essential tool in my workflow. RajanGit86 has done an excellent job crafting this application, and it's clear a lot of thought went into its development. Highly recommend giving it a try!

    Avatar
    user_EMxFzDbt
    2025-04-24

    I recently tried mcp-test by RajanGit86 and found it incredibly useful! The interface is straightforward, making it accessible for users at any level. The application's functionality exceeded my expectations, and the seamless integration is a great bonus. Highly recommended for anyone looking for a reliable MCP application.

    Avatar
    user_CUpjMbTV
    2025-04-24

    As a loyal user of the mcp-test by RajanGit86, I am highly impressed with its functionality and user-friendly interface. The product delivers exactly what it promises, making the testing process smooth and efficient. Highly recommended for anyone in need of reliable application testing!

    Avatar
    user_UCp9fxHt
    2025-04-24

    As an avid MCP application user, I find the mcp-test incredibly user-friendly and efficient. The author, RajanGit86, has done a fantastic job ensuring the interface is seamless and intuitive. It's evident that a lot of thought went into the design and functionality, making it a joy to use. Highly recommend to anyone in need of a reliable MCP tool!

    Avatar
    user_C2SXyUIP
    2025-04-24

    As a dedicated user of mcp-test, I am impressed with its functionality and ease of use. RajanGit86 has done an excellent job in creating a robust application that simplifies my workflow. The intuitive interface and seamless integration make it a must-have tool for anyone. Highly recommended!

    Avatar
    user_HkxChSpG
    2025-04-24

    I've been extensively using the mcp-test by RajanGit86 and it has significantly streamlined my work processes. The intuitive design and seamless functionality are impressive. Although the description and language specifics weren't provided, I found the welcome information and start URL straightforward, making the application easy to navigate. Highly recommend for anyone seeking efficiency!

    Avatar
    user_qxUfsckZ
    2025-04-24

    As a dedicated user of mcp-test created by RajanGit86, I find it to be an exceptional tool. Its features are well thought out and it’s highly user-friendly. The seamless start URL and comprehensive welcome information make it easy to get started. Highly recommend!

    Avatar
    user_n7vijxEm
    2025-04-24

    I have been using mcp-test by RajanGit86, and it has proven to be an outstanding tool. The user-friendly interface and clear starting URL make it easy to navigate. The welcoming information is thorough and helpful, guiding new users efficiently. Overall, a highly recommended application for anyone in need of such a solution!