入门指南
这个项目公开了简单的MCP风格的HTTP端点,用于列出工具和调用文件搜索工具。这些通过HTTP镜像MCP工具语义,以便在Spring Boot中轻松集成。
获取 /mcp/tools --返回可用工具和输入模式。
发布 /mcp/tools/search_in_file
请求正文:
{
"filePath": "/absolute/or/relative/path.txt",
"keyword": "needle",
"caseSensitive": false
}响应主体:
{
"file": "/abs/path.txt",
"keyword": "needle",
"caseSensitive": false,
"matchCount": 2,
"matches": [{ "lineNumber": 3, "start": 10, "end": 16, "line": "..." }]
}邮差收藏
MCPServer.postman_collection.json
运行应用程序
mvn spring-boot:run申请将于 http://localhost:8080
