Hello World MCP服务器
这个项目是一个使用@modelcontextprotocol/sdk库在TypeScript中实现的简单MCP服务器。
特性
- 提供“Hello World”工具。
- 使用标准I/O传输进行通信。
设置
- 安装依赖项:```bash
npm install
1. 构建项目:```bash
npm run build
- 运行服务器:```bash
node build/index.js
或者,直接从TypeScript源代码运行服务器:```bash
npx ts-node src/index.ts
或```bash
node --require ts-node/register src/index.ts
或者运行带有跟踪警告的服务器:```bash
node --trace-warnings --require ts-node/register src/index.ts
或```bash
npx tsx src/index.ts
``````
Development
- Source files are located in the
srcdirectory. - Build output is located in the
builddirectory.
License
This project is licensed under the ISC License.
```