# node-mcp-server **Repository Path**: zenglianping/node-mcp-server ## Basic Information - **Project Name**: node-mcp-server - **Description**: node mcp demo - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-20 - **Last Updated**: 2025-10-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Echo MCP Server 这是一个简单的MCP (Model Context Protocol) server,提供echo工具功能和ONES知识库内容获取功能。 ## 功能 - **echo工具**: 接收用户输入的文本,在前面添加"hello "前缀并返回 ## 安装和运行 1. 安装依赖: ```bash npm install ``` ``` 2. 构建项目: ```bash npm run build ``` 4. 运行服务器: ```bash npm start ``` 或者直接运行开发版本: ```bash npm run dev ``` ## 工具说明 ### echo - **描述**: 在用户输入文本前添加"hello "前缀 - **参数**: - `text` (string): 要处理的文本 - **返回**: 带有"hello "前缀的文本 ### 使用示例 **echo工具**: - 输入: "world" - 输出: "hello world" ## 文件结构 ``` node-mcp-server/ ├── src/ │ └── index.ts # MCP server主文件 ├── dist/ # 编译后的JavaScript文件 ├── package.json # 项目配置 ├── tsconfig.json # TypeScript配置 └── README.md # 项目说明 ``` ## 开发 这个项目使用TypeScript开发,基于@modelcontextprotocol/sdk构建。 ## 依赖 - @modelcontextprotocol/sdk: MCP SDK - zod: 数据验证 - typescript: TypeScript编译器 - ts-node: TypeScript运行器