基于Spring AI MCP的服务,用于检索ONES Wiki内容并将其转换为适合AI处理的文本格式。
mvn clean package
编辑 src/main/resources/application.properties:
ones.host=your-ones-host.com
ones.email=your-email@example.com
ones.password=your-password
java -jar target/ones-wiki-mcp-server-0.0.1-SNAPSHOT.jar \
--ones.host=your-ones-host.com \
--ones.email=your-email@example.com \
--ones.password=your-password
export ONES_HOST=your-ones-host.com
export ONES_EMAIL=your-email@example.com
export ONES_PASSWORD=your-password
./start-mcp-server.sh
添加到Claude Desktop配置文件:
{
"mcpServers": {
"ones-wiki": {
"command": "java",
"args": [
"-jar",
"/path/to/ones-wiki-mcp-server-0.0.1-SNAPSHOT.jar",
"--ones.host=your-ones-host.com",
"--ones.email=your-email@example.com",
"--ones.password=your-password"
]
}
}
}
在使用工具时提供完整的Wiki页面URL:
请获取此Wiki页面的内容:https://your-ones-host.com/wiki/#/team/TEAM_UUID/space/SPACE_UUID/page/PAGE_UUID
支持的Wiki URL格式:
https://{host}/wiki/#/team/{team_uuid}/space/{space_uuid}/page/{page_uuid}
自动转换为API端点:
https://{host}/wiki/api/wiki/team/{team_uuid}/online_page/{page_uuid}/content
服务将Wiki页面HTML内容转换为结构化的Markdown格式,包括:
src/main/java/org/springframework/ai/mcp/sample/server/
├── McpServerApplication.java # 主应用
└── OnesWikiService.java # ONES Wiki服务
mvn test
git clone https://github.com/your-username/ones-wiki-mcp-server.git
cd ones-wiki-mcp-server
mvn clean package
您可以在OnesWikiService中添加更多工具方法,例如:
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)Apache License 2.0