MCP.so
登录

MCP サーバーサンプル

@ykitaza

基本信息

分类

其他

传输方式

stdio

作者

ykitaza

关于 MCP サーバーサンプル

暂无概览

#mcp#server#number-comparison

MCP サーバーサンプル 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mcp-server-example-ykitaza": {
      "command": "bun",
      "args": [
        "build"
      ]
    }
  }
}

MCP サーバーサンプル 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is MCP サーバーサンプル?

MCP サーバーサンプル is a sample implementation of a Model Context Protocol (MCP) server that provides a number comparison tool. It is designed for developers and users of MCP‑compatible clients (such as Claude Desktop App, Cline, or Cursor) who need a reference for building or using MCP servers.

How to use MCP サーバーサンプル?

Install dependencies with bun install, build the project with bun build, then configure your MCP client to point to the server using an absolute path to src/index.ts. Once configured, invoke the compare-numbers tool via the client to compare two numbers.

Key features of MCP サーバーサンプル

  • Provides a compare-numbers tool that returns the larger of two numbers.
  • Runs on the Bun runtime (v1.0.0+).
  • Fully compatible with MCP clients like Claude Desktop, Cline, and Cursor.
  • Configuration uses absolute paths and supports auto‑approve settings.
  • Easily extensible: custom tools can be added by creating new files and registering them.
  • Serves as a reusable sample for developers building their own MCP servers.

Use cases of MCP サーバーサンプル

  • Learning how to implement a basic MCP server step by step.
  • Verifying AI‑generated calculations by comparing numbers with a reliable tool.
  • Prototyping new MCP tools by extending the sample server with custom logic.
  • Testing MCP client configurations and auto‑approve workflows.

常见问题

1

What runtime does MCP サーバーサンプル require?

The server requires Bun runtime version 1.0.0 or higher.

2

Which clients can connect to MCP サーバーサンプル?

It works with any MCP‑compatible client, including Claude Desktop App, Cline, and Cursor.

3

How do I add a custom tool to MCP サーバーサンプル?

Create a new tool implementation file in `server/src/tools/`, then register it in `server/src/index.ts` using the `server.tool()` method with Zod parameters and a handler function.

4

How do I configure the server for my MCP client?

Edit the client’s MCP configuration to include a server entry with `command` set to `"bun"`, `args` set to `["run", "/absolute/path/to/server/src/index.ts"]`, and optional settings like `disabled` and `autoApprove`.

5

Where does the server store data or logs?

The README does not mention any persistent data storage or logging; the server appears stateless with no external database.

评论

其他 分类下的更多 MCP 服务器