MCP cover image
See in Github
2025-04-14

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

相关推荐

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • langgenius
  • alibaba
  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • hkr04
  • 轻巧的C ++ MCP(模型上下文协议)SDK

  • nbonamy
  • Witsy:桌面AI助手

  • sigoden
  • 使用普通的bash/javascript/python函数轻松创建LLM工具和代理。

  • evilsocket
  • 简单的代理开发套件。

    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!