MCP.so
登录

Local MCP Server Tutorial

@7nohe

基本信息

分类

其他

传输方式

stdio

作者

7nohe

关于 Local MCP Server Tutorial

ローカルMCPサーバー(stdio)を作成するためのチュートリアルです。

#local-mcp-server#tutorial#mcp-server

Local MCP Server Tutorial 配置

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

{
  "mcpServers": {
    "local-mcp-server-tutorial": {
      "command": "npx",
      "args": [
        "giget@latest",
        "gh:7nohe/local-mcp-server-tutorial",
        "my-mcp-server"
      ]
    }
  }
}

Local MCP Server Tutorial 工具

工具列表暂未提供

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

点击上方按钮,在临时沙箱中运行此服务器并实时获取工具列表。

概览

What is Local Mcp Server Tutorial?

A tutorial for creating a local MCP (Model Context Protocol) server. It guides users through building a Node.js/TypeScript MCP server with resources, prompts, and tools, and integrating it with MCP clients like Claude Desktop.

How to use Local Mcp Server Tutorial?

Follow the tutorial steps: initialize a project using npx giget, install dependencies (@modelcontextprotocol/sdk, zod), implement the server code, build with npm run build, and run with ./dist/index.js. Debug using the MCP Inspector and configure Claude Desktop to connect.

Key features of Local Mcp Server Tutorial

  • Step-by-step setup for a local MCP server.
  • Implements static and dynamic resources.
  • Implements prompts for language translation.
  • Implements a BMI calculation tool.
  • Covers debugging with MCP Inspector.
  • Guides publishing to npm.

Use cases of Local Mcp Server Tutorial

  • Learning to build a custom MCP server from scratch.
  • Creating a local MCP server for personal tools or automation.
  • Prototyping MCP resources and tools for Claude Desktop.

常见问题

1

What prerequisites are needed?

Node.js (v22) and an MCP client like Claude Desktop.

2

How do I debug the server?

Use the MCP Inspector: run `npx @modelcontextprotocol/inspector ./dist/index.js` and open http://127.0.0.1:6274.

3

How do I connect the server to Claude Desktop?

Edit `claude_desktop_config.json` to point to the server’s executable path.

4

How do I publish the server?

Run `npm login` and `npm publish`. Ensure the package name follows `@username/package` convention.

5

What transport does the server use?

The server uses `StdioServerTransport` for communication over standard input/output.

评论

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