Simple MCP Server

by 3eer

Integrations

  • Integrates with Biome for code formatting and linting within the project.

简单 MCP 服务器

使用 fastMCP 构建的最小 TypeScript MCP 服务器,返回“hello”响应。

特征

  • 使用fastMCP实现简单的 MCP 服务器
  • TypeScript 支持
  • Biome 用于格式化和 linting
  • pnpm 作为包管理器

入门

先决条件

  • Node.js 18+
  • 下午

安装

pnpm install

发展

# Build the project pnpm build # Run the development server with fastMCP CLI pnpm mcp:dev # Use the MCP Inspector with a web UI pnpm mcp:inspect # Format code pnpm format # Lint code pnpm lint

项目结构

  • src/server.ts - 主要的 MCP 服务器实现
  • biome.json - 用于 linting 和格式化的 Biome 配置
  • tsconfig.json - TypeScript 配置

关于服务器

这是一个简单的 MCP(模型上下文协议)服务器,提供“hello”工具。它使用 fastMCP TypeScript 框架来简化服务器实现。

已知问题

  • 客户端功能警告:使用pnpm mcp:dev或直接运行服务器时,您可能会看到类似[warning] FastMCP could not infer client capabilities警告。这是正常现象,当客户端未提供功能信息时会发生。服务器仍可正常运行。

如何与 Claude Desktop 一起使用

要将此 MCP 服务器与 Claude Desktop 一起使用,请添加以下配置:

{ "mcpServers": { "Simple Hello Server": { "url": "http://localhost:3000/mcp" } } }

执照

国际学习中心

-
security - not tested
F
license - not found
-
quality - not tested

一个最小的 TypeScript MCP 服务器,使用 fastMCP 框架提供“hello”工具。

  1. Features
    1. Getting Started
      1. Prerequisites
      2. Installation
      3. Development
    2. Project Structure
      1. About the Server
        1. Known Issues
        2. How to Use with Claude Desktop
      2. License
        ID: mycfvk4mph