使用说明
🌐 DocuMind MCP服务器
“文档与数字智能相遇的地方”
下一代模型上下文协议(MCP)服务器,通过先进的神经处理彻底改变了文档质量分析。
⚡ 核心系统
- 🧠 神经文档分析:用于全面README评估的高级算法
- 🔮 全息头扫描:视觉元素的尖端SVG分析
- 🌍 多维语言支持:跨语言文档验证
- 💫 量子建议引擎:基于人工智能的改进建议
🚀 系统引导序列
系统要求
- Node.js 18+
- npm ||纱线
初始化核心
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桌面配置
- 确保配置中的文件路径正确
性能优化
-
SVG分析
- 将SVG复杂性降至最低,以实现更快的解析
- 使用高效的渐变和动画
- 在保持质量的同时优化文件大小
-
README扫描
- 优化解析的结构内容
- 使用推荐的降价模式
- 遵循徽章放置指南
🔬 API文档
核心类
Readme服务
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
}
SVG 服务
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协议下运行。
