Package Exports
- mcp-prd-server
- mcp-prd-server/build/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mcp-prd-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
MCP PRD Server
这是一个基于MCP(Model Context Protocol)的PRD内容管理服务器,用于获取和管理PRD文档内容。
功能特性
- 获取PRD文档内容
- 支持按章节获取PRD内容
- 提供PRD资源访问
- 自动爬取和缓存PRD数据
- 支持项目列表和版本管理
安装
作为依赖安装
npm install mcp-prd-server
全局安装
npm install -g mcp-prd-server
使用方法
作为 MCP 服务器使用
# 直接运行
node build/index.js
# 或者使用全局命令
prd-server
在代码中使用
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
// 创建MCP服务器
const server = new McpServer({
name: "PRD-Server",
version: "1.0.0",
});
// 启动服务器
const transport = new StdioServerTransport();
await server.connect(transport);
开发
本地开发
# 安装依赖
npm install
# 开发模式(监听文件变化)
npm run dev
# 构建项目
npm run build
# 运行项目
npm start
发布到 npm
1. 准备发布
# 构建项目
npm run build
# 检查将要发布的文件
npm pack --dry-run
2. 登录 npm
npm login
3. 发布包
# 发布到 npm
npm publish
# 或者发布到特定 scope
npm publish --access public
4. 更新版本
# 更新补丁版本 (1.0.0 -> 1.0.1)
npm version patch
# 更新次要版本 (1.0.0 -> 1.1.0)
npm version minor
# 更新主要版本 (1.0.0 -> 2.0.0)
npm version major
配置说明
package.json 关键字段
main
: 指定包的入口文件bin
: 指定可执行文件files
: 指定要发布的文件prepublishOnly
: 发布前自动执行的脚本
发布文件结构
mcp-prd-server/
├── build/ # 编译后的 JavaScript 文件
├── README.md # 项目说明文档
└── package.json # 包配置文件
许可证
MIT License
贡献
欢迎提交 Issue 和 Pull Request!