MCP文档评分服务器
一种模型上下文协议服务器,使用高级神经处理来分析和评估GitHub README文档的质量,提供评分和改进建议。
可用工具 (1 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
evaluate_readme 1 个参数 需填 1 项
リポジトリ内の全てのREADMEファイルの構成を評価し、改善点を提案します
必填参数:projectPath
服务介绍
🌐 DocuMind MCP 服务器
"文档与数字智能的交汇点"
下一代模型上下文协议(MCP)服务器,通过先进的神经处理技术革新了文档质量分析。
⚡ 核心系统
- 🧠 神经文档分析: 高级算法用于全面的 README 评估
- 🔮 全息头部扫描: 先进的 SVG 分析用于视觉元素
- 🌍 多维语言支持: 跨语言文档验证
- 💫 量子建议引擎: 基于 AI 的改进建议
🚀 系统启动序列
系统要求
- Node.js 18+
- npm || yarn
初始化核心
npm install
编译矩阵
npm run build
神经开发链接
建立实时神经连接:
npm run watch
🛸 操作协议
系统配置
与 Claude Desktop 主机集成:
Windows 终端:
// %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"documind-mcp-server": {
"command": "/path/to/documind-mcp-server/build/index.js"
}
}
}
神经接口命令
evaluate_readme
启动文档结构的量子分析。
参数:
projectPath: 目标目录的神经路径
示例请求:
{
name: "evaluate_readme",
arguments: {
projectPath: "/path/to/project"
}
}
示例响应:
{
content: [
{
type: "text",
text: JSON.stringify({
filePath: "/path/to/project/README.md",
hasHeaderImage: true,
headerImageQuality: {
hasGradient: true,
hasAnimation: true,
// ... other quality metrics
},
score: 95,
suggestions: [
"Consider adding language badges",
// ... other suggestions
]
})
}
]
}
🔮 开发矩阵
调试协议
通过 MCP Inspector 访问神经网络:
npm run inspector
故障排除指南
常见问题及解决方案
-
未检测到标题图片
- 确保 SVG 文件放置在
assets/目录中 - 验证 SVG 文件包含正确的 XML 结构
- 检查文件权限
- 确保 SVG 文件放置在
-
语言徽章未被识别
- 确认徽章使用 shields.io 格式
- 检查 HTML 结构是否遵循推荐模式
- 确保正确居中对齐
-
构建错误
- 清除
node_modules并重新安装依赖 - 确保 TypeScript 版本符合项目要求
- 检查修改文件中的语法错误
- 清除
-
MCP 连接问题
- 验证 stdio 传输配置
- 检查 Claude Desktop 配置
- 确保配置文件中的文件路径正确
性能优化
-
SVG 分析
- 减少 SVG 复杂度以加快解析速度
- 使用高效的渐变和动画
- 在保持质量的同时优化文件大小
-
README 扫描
- 结构化内容以便于最优解析
- 使用推荐的 markdown 模式
- 遵循徽章放置指南
🔬 API 文档
核心类
ReadmeService
用于 README 分析和评估的主要服务。
class ReadmeService {
// Analyzes all README files in a project
async evaluateAllReadmes(projectPath: string): Promise<ReadmeEvaluation[]>
// Evaluates a single README file
private async evaluateReadme(dirPath: string, readmePath: string): Promise<ReadmeEvaluation>
// Evaluates language badge configuration
private evaluateLanguageBadges(content: string): BadgeEvaluation
}
SVGService
专门用于 SVG 头部图像分析的服务。
class SVGService {
// Evaluates SVG header image quality
public evaluateHeaderImageQuality(imgSrc: string, content: string): HeaderImageQuality
// Checks for project-specific elements in SVG
private checkProjectSpecificImage(svgContent: string, readmeContent: string): boolean
}
核心接口
interface ReadmeEvaluation {
filePath: string;
hasHeaderImage: boolean;
headerImageQuality: HeaderImageQuality;
isCentered: {
headerImage: boolean;
title: boolean;
badges: boolean;
};
hasBadges: {
english: boolean;
japanese: boolean;
isCentered: boolean;
hasCorrectFormat: boolean;
};
score: number;
suggestions: string[];
}
interface HeaderImageQuality {
hasGradient: boolean;
hasAnimation: boolean;
hasRoundedCorners: boolean;
hasEnglishText: boolean;
isProjectSpecific: boolean;
}
错误处理
服务器实现了全面的错误处理:
try {
const evaluations = await readmeService.evaluateAllReadmes(projectPath);
// Process results
} catch (error) {
const errorMessage = error instanceof Error ? error.message : String(error);
return {
content: [{
type: 'text',
text: `Evaluation error: ${errorMessage}`
}],
isError: true
};
}
⚡ 许可证
遵循 MIT 协议。