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