{"_id":"@aiuluna/knowledge-graph-mcp","_rev":"6-6460d129786dea1fe8d2d5889ef43d00","name":"@aiuluna/knowledge-graph-mcp","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.1":{"name":"@aiuluna/knowledge-graph-mcp","version":"0.0.1","keywords":["knowledge-graph","mcp","visualization","graph","model-context-protocol"],"author":{"name":"aiuluna"},"license":"MIT","_id":"@aiuluna/knowledge-graph-mcp@0.0.1","maintainers":[{"name":"aiuluna","email":"604401072@qq.com"}],"homepage":"https://github.com/aiuluna/knowledge-graph-mcp#readme","bugs":{"url":"https://github.com/aiuluna/knowledge-graph-mcp/issues"},"bin":{"knowledge-graph-mcp":"dist/index.js"},"dist":{"shasum":"504c91919b40a582d616c169bb9f4c1c134435a4","tarball":"https://registry.npmjs.org/@aiuluna/knowledge-graph-mcp/-/knowledge-graph-mcp-0.0.1.tgz","fileCount":5,"integrity":"sha512-6E2l4EU4POA+ZK9lNqRFxBJ7LUv75FraHHBAuSKh2ttRMoLjqKoqHTcZ3fPmJglJarrIeZmFQHhAM5EAllzG4Q==","signatures":[{"sig":"MEQCIBACFdAs8NCKr3q4H0QB8qtu+LnhQx5sRlUlxqZyP94DAiBfad+yaEfANwbqNFY/gws1LBFjyX/R8Nf1vMwguW9ebQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":648278},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=16.0.0","pnpm":">=7.0.0"},"gitHead":"5bfd519e0ed94c12f111cbb8ea0093320aa955ff","scripts":{"dev":"vite build --watch","lint":"eslint src --ext .ts","test":"vitest","build":"vite build && chmod +x dist/index.js","start":"node dist/index.js","dev:start":"node --loader ts-node/esm src/index.ts","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"aiuluna","email":"604401072@qq.com"},"repository":{"url":"git+https://github.com/aiuluna/knowledge-graph-mcp.git","type":"git"},"_npmVersion":"10.7.0","description":"A Model Context Protocol (MCP) service for managing and visualizing knowledge graphs","directories":{},"_nodeVersion":"18.20.3","dependencies":{"zod":"^3.24.2","uuid":"^9.0.1","cross-env":"^7.0.3","@modelcontextprotocol/sdk":"^1.6.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.1.4","eslint":"^8.38.0","vitest":"^1.3.1","ts-node":"^10.9.2","typescript":"^5.3.3","@types/node":"^20.11.24","@types/uuid":"^9.0.8","@typescript-eslint/parser":"^5.59.0","@typescript-eslint/eslint-plugin":"^5.59.0"},"_npmOperationalInternal":{"tmp":"tmp/knowledge-graph-mcp_0.0.1_1744782839418_0.833257284370317","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@aiuluna/knowledge-graph-mcp","version":"0.0.2","keywords":["knowledge-graph","mcp","visualization","graph","model-context-protocol"],"author":{"name":"aiuluna"},"license":"MIT","_id":"@aiuluna/knowledge-graph-mcp@0.0.2","maintainers":[{"name":"aiuluna","email":"604401072@qq.com"}],"homepage":"https://github.com/aiuluna/knowledge-graph-mcp#readme","bugs":{"url":"https://github.com/aiuluna/knowledge-graph-mcp/issues"},"bin":{"knowledge-graph-mcp":"dist/index.js"},"dist":{"shasum":"73743c2f355c1f16826f1dd0492fb624b10af8be","tarball":"https://registry.npmjs.org/@aiuluna/knowledge-graph-mcp/-/knowledge-graph-mcp-0.0.2.tgz","fileCount":5,"integrity":"sha512-NPsmbFPVeH2kWsQxwJzzMWbQegLXa7kytJyR5dqotlTEkr4R3EKQ0gGMMbNAl+h4+LPiwwaIZ1l+kOBbFxkdYA==","signatures":[{"sig":"MEUCIQCtxVIOfJpxlgPKTPsReap3R4iKYY6Lu5FZkQuubpGbyAIgc8FmfXNvyl286T98AsUfF612J7lBj9yxUkAzH1MK0yQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":648278},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=16.0.0","pnpm":">=7.0.0"},"gitHead":"15f03e3a66b1e7fe755e9820a87808d8c97d04db","scripts":{"dev":"vite build --watch","lint":"eslint src --ext .ts","test":"vitest","build":"vite build && chmod +x dist/index.js","start":"node dist/index.js","dev:start":"node --loader ts-node/esm src/index.ts","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"aiuluna","email":"604401072@qq.com"},"repository":{"url":"git+https://github.com/aiuluna/knowledge-graph-mcp.git","type":"git"},"_npmVersion":"10.7.0","description":"A Model Context Protocol (MCP) service for managing and visualizing knowledge graphs","directories":{},"_nodeVersion":"18.20.3","dependencies":{"zod":"^3.24.2","uuid":"^9.0.1","cross-env":"^7.0.3","@modelcontextprotocol/sdk":"^1.6.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.1.4","eslint":"^8.38.0","vitest":"^1.3.1","ts-node":"^10.9.2","typescript":"^5.3.3","@types/node":"^20.11.24","@types/uuid":"^9.0.8","@typescript-eslint/parser":"^5.59.0","@typescript-eslint/eslint-plugin":"^5.59.0"},"_npmOperationalInternal":{"tmp":"tmp/knowledge-graph-mcp_0.0.2_1744783032822_0.20386662387406007","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@aiuluna/knowledge-graph-mcp","version":"0.0.3","keywords":["knowledge-graph","mcp","visualization","graph","model-context-protocol"],"author":{"name":"aiuluna"},"license":"MIT","_id":"@aiuluna/knowledge-graph-mcp@0.0.3","maintainers":[{"name":"aiuluna","email":"604401072@qq.com"}],"homepage":"https://github.com/aiuluna/knowledge-graph-mcp#readme","bugs":{"url":"https://github.com/aiuluna/knowledge-graph-mcp/issues"},"bin":{"knowledge-graph-mcp":"dist/index.js"},"dist":{"shasum":"9ec250af0a58ba78cb4955d32c3a367eac11983f","tarball":"https://registry.npmjs.org/@aiuluna/knowledge-graph-mcp/-/knowledge-graph-mcp-0.0.3.tgz","fileCount":6,"integrity":"sha512-Ar9KeyP0+Wwik5GU/44hZyeZnAg35vHc7sr5/owleeN3zq6BxjIET3pEU2SU8MVDx1wRFqNMu8tV1YZnC7ll6g==","signatures":[{"sig":"MEQCICFk7HoOqFuKUl1PXyimizJVgVM8YTemAMXpE9+j+2WIAiAe/NxXbMM7k6PotyArxXoeciw4vYJadZqfMj3hlQC9rw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":656160},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=16.0.0","pnpm":">=7.0.0"},"gitHead":"a5bd17f316847c963ae816f69496c4d6d9d9ef37","scripts":{"dev":"vite build --watch","lint":"eslint src --ext .ts","test":"vitest","build":"vite build && chmod +x dist/index.js","start":"node dist/index.js","dev:start":"node --loader ts-node/esm src/index.ts","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"aiuluna","email":"604401072@qq.com"},"repository":{"url":"git+https://github.com/aiuluna/knowledge-graph-mcp.git","type":"git"},"_npmVersion":"10.7.0","description":"A Model Context Protocol (MCP) service for managing and visualizing knowledge graphs","directories":{},"_nodeVersion":"18.20.3","dependencies":{"zod":"^3.24.2","uuid":"^9.0.1","cross-env":"^7.0.3","@modelcontextprotocol/sdk":"^1.6.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.1.4","eslint":"^8.38.0","vitest":"^1.3.1","ts-node":"^10.9.2","typescript":"^5.3.3","@types/node":"^20.11.24","@types/uuid":"^9.0.8","@typescript-eslint/parser":"^5.59.0","@typescript-eslint/eslint-plugin":"^5.59.0"},"_npmOperationalInternal":{"tmp":"tmp/knowledge-graph-mcp_0.0.3_1744783392409_0.022253782347702478","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@aiuluna/knowledge-graph-mcp","version":"0.0.4","keywords":["knowledge-graph","mcp","visualization","graph","model-context-protocol"],"author":{"name":"aiuluna"},"license":"MIT","_id":"@aiuluna/knowledge-graph-mcp@0.0.4","maintainers":[{"name":"aiuluna","email":"604401072@qq.com"}],"homepage":"https://github.com/aiuluna/knowledge-graph-mcp#readme","bugs":{"url":"https://github.com/aiuluna/knowledge-graph-mcp/issues"},"bin":{"knowledge-graph-mcp":"dist/index.js"},"dist":{"shasum":"1793cab4d2340d189fa187a15293091dbeeb8890","tarball":"https://registry.npmjs.org/@aiuluna/knowledge-graph-mcp/-/knowledge-graph-mcp-0.0.4.tgz","fileCount":6,"integrity":"sha512-7efviNJkHyT7MJr32A2aJunFP0/X2bBLQJHW0lMtX1MX9I05DCmBR11o43Z7L93WeE12cMQW66cf+WsT00GeRw==","signatures":[{"sig":"MEYCIQC1dz40I+vHB84OprO8KY1QnlLsa6OQQ+unLX/ikD3ZlAIhAKoh0keMXbr2YVe4Y2YDHQqAP09IEU7pJnmPPtPuWgF/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":656159},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=16.0.0","pnpm":">=7.0.0"},"gitHead":"a5bd17f316847c963ae816f69496c4d6d9d9ef37","scripts":{"dev":"vite build --watch","lint":"eslint src --ext .ts","test":"vitest","build":"vite build && chmod +x dist/index.js","start":"node dist/index.js","dev:start":"node --loader ts-node/esm src/index.ts","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"aiuluna","email":"604401072@qq.com"},"repository":{"url":"git+https://github.com/aiuluna/knowledge-graph-mcp.git","type":"git"},"_npmVersion":"10.7.0","description":"A Model Context Protocol (MCP) service for managing and visualizing knowledge graphs","directories":{},"_nodeVersion":"18.20.3","dependencies":{"zod":"^3.24.2","uuid":"^9.0.1","cross-env":"^7.0.3","@modelcontextprotocol/sdk":"^1.6.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.1.4","eslint":"^8.38.0","vitest":"^1.3.1","ts-node":"^10.9.2","typescript":"^5.3.3","@types/node":"^20.11.24","@types/uuid":"^9.0.8","@typescript-eslint/parser":"^5.59.0","@typescript-eslint/eslint-plugin":"^5.59.0"},"_npmOperationalInternal":{"tmp":"tmp/knowledge-graph-mcp_0.0.4_1744783625318_0.787579052640641","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@aiuluna/knowledge-graph-mcp","version":"0.0.5","keywords":["knowledge-graph","mcp","visualization","graph","model-context-protocol"],"author":{"name":"aiuluna"},"license":"MIT","_id":"@aiuluna/knowledge-graph-mcp@0.0.5","maintainers":[{"name":"aiuluna","email":"604401072@qq.com"}],"homepage":"https://github.com/aiuluna/knowledge-graph-mcp#readme","bugs":{"url":"https://github.com/aiuluna/knowledge-graph-mcp/issues"},"bin":{"knowledge-graph-mcp":"dist/index.js"},"dist":{"shasum":"c5fa7395f4e45b9d1297bedc7c2d42d71139d11a","tarball":"https://registry.npmjs.org/@aiuluna/knowledge-graph-mcp/-/knowledge-graph-mcp-0.0.5.tgz","fileCount":6,"integrity":"sha512-ugUOuVu9bQ8Kp5RooEh3DeT0AWujMwcL2u8SYb4HhqQAFQtFz47aaGcduxLNv+Xo5cQUqC7fKloQjXuYhALcoA==","signatures":[{"sig":"MEYCIQCV8dQ/rDyf5TPspAdJyCJMgJoqxjYHWWF7YLBGGPQUQwIhAOQD6L/PH5iEM3SILG9xzgvoElLyUl2ci7b636dI51Pr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":659474},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=16.0.0","pnpm":">=7.0.0"},"gitHead":"87b8c3382f3f2146c042653359b7ecde8c783ef8","scripts":{"dev":"vite build --watch","lint":"eslint src --ext .ts","test":"vitest","build":"vite build && chmod +x dist/index.js","start":"node dist/index.js","dev:start":"node --loader ts-node/esm src/index.ts","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"aiuluna","email":"604401072@qq.com"},"repository":{"url":"git+https://github.com/aiuluna/knowledge-graph-mcp.git","type":"git"},"_npmVersion":"10.7.0","description":"A Model Context Protocol (MCP) service for managing and visualizing knowledge graphs","directories":{},"_nodeVersion":"18.20.3","dependencies":{"zod":"^3.24.2","uuid":"^9.0.1","cross-env":"^7.0.3","@modelcontextprotocol/sdk":"^1.6.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.1.4","eslint":"^8.38.0","vitest":"^1.3.1","ts-node":"^10.9.2","typescript":"^5.3.3","@types/node":"^20.11.24","@types/uuid":"^9.0.8","@typescript-eslint/parser":"^5.59.0","@typescript-eslint/eslint-plugin":"^5.59.0"},"_npmOperationalInternal":{"tmp":"tmp/knowledge-graph-mcp_0.0.5_1744786131024_0.9270478233754276","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@aiuluna/knowledge-graph-mcp","version":"0.0.6","description":"A Model Context Protocol (MCP) service for managing and visualizing knowledge graphs","type":"module","main":"dist/index.js","types":"dist/index.d.ts","bin":{"knowledge-graph-mcp":"dist/index.js"},"scripts":{"build":"vite build && chmod +x dist/index.js","start":"node dist/index.js","dev":"vite build --watch","dev:start":"node --loader ts-node/esm src/index.ts","test":"vitest","lint":"eslint src --ext .ts","prepublishOnly":"pnpm run build"},"keywords":["knowledge-graph","mcp","visualization","graph","model-context-protocol"],"author":{"name":"aiuluna"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/aiuluna/knowledge-graph-mcp.git"},"bugs":{"url":"https://github.com/aiuluna/knowledge-graph-mcp/issues"},"homepage":"https://github.com/aiuluna/knowledge-graph-mcp#readme","dependencies":{"@modelcontextprotocol/sdk":"^1.6.1","cross-env":"^7.0.3","uuid":"^9.0.1","zod":"^3.24.2"},"devDependencies":{"@types/node":"^20.11.24","@types/uuid":"^9.0.8","@typescript-eslint/eslint-plugin":"^5.59.0","@typescript-eslint/parser":"^5.59.0","eslint":"^8.38.0","ts-node":"^10.9.2","typescript":"^5.3.3","vite":"^5.1.4","vitest":"^1.3.1"},"engines":{"node":">=16.0.0","pnpm":">=7.0.0"},"_id":"@aiuluna/knowledge-graph-mcp@0.0.6","gitHead":"87b8c3382f3f2146c042653359b7ecde8c783ef8","_nodeVersion":"18.20.3","_npmVersion":"10.7.0","dist":{"integrity":"sha512-qZJkGx5A9HRbaM58DfJaWMx62SY105VkmgBOoh7iXvZBMUyNedKyenMjh0gl6VjK1gBdup/EjqmuY8IxTnWXiw==","shasum":"c1e0e4be106642c1d94abd7064b8605498386836","tarball":"https://registry.npmjs.org/@aiuluna/knowledge-graph-mcp/-/knowledge-graph-mcp-0.0.6.tgz","fileCount":6,"unpackedSize":659474,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEGP+yROFndIGw4QvGlSntJOkre5d+V58ltNcTbJm1jyAiEA9MqVxUu+rpwDMwNgVP4P0Awb4ldkeR/8bPrOZ7wvm5k="}]},"_npmUser":{"name":"aiuluna","email":"604401072@qq.com"},"directories":{},"maintainers":[{"name":"aiuluna","email":"604401072@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/knowledge-graph-mcp_0.0.6_1744787394623_0.033256452243953794"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-16T05:53:59.349Z","modified":"2025-04-16T07:09:54.963Z","0.0.1":"2025-04-16T05:53:59.595Z","0.0.2":"2025-04-16T05:57:13.071Z","0.0.3":"2025-04-16T06:03:12.656Z","0.0.4":"2025-04-16T06:07:05.554Z","0.0.5":"2025-04-16T06:48:51.250Z","0.0.6":"2025-04-16T07:09:54.788Z"},"bugs":{"url":"https://github.com/aiuluna/knowledge-graph-mcp/issues"},"author":{"name":"aiuluna"},"license":"MIT","homepage":"https://github.com/aiuluna/knowledge-graph-mcp#readme","keywords":["knowledge-graph","mcp","visualization","graph","model-context-protocol"],"repository":{"type":"git","url":"git+https://github.com/aiuluna/knowledge-graph-mcp.git"},"description":"A Model Context Protocol (MCP) service for managing and visualizing knowledge graphs","maintainers":[{"name":"aiuluna","email":"604401072@qq.com"}],"readme":"# Knowledge Graph MCP Server\n\n一个基于 Model Context Protocol (MCP) 的知识图谱服务，为 AI 助手提供知识图谱的创建、管理、分析和可视化能力。本服务完全遵循 MCP 标准，可以与支持 MCP 的 AI 助手（如 Claude）无缝集成。\n\n[English](./README.md)\n\n## 核心特性\n\n* **多种图谱类型**: 支持拓扑结构、时间线、变更日志、需求文档、知识库、本体论等多种图谱类型\n* **完整的错误处理**: 为常见问题提供清晰的错误信息和处理建议\n* **资源管理**: 支持 SVG 和 Markdown 资源的关联和管理\n* **版本状态**: 支持草稿、已发布、已归档等多种状态管理\n\n## 安装与配置\n\n### 环境要求\n- Node.js >= 16.0.0\n- pnpm >= 7.0.0\n\n### 配置知识图谱目录\n创建一个目录用于存储知识图谱数据，例如：\n```bash\nmkdir ~/knowledge_graph\n```\n\n### 在 Cursor 中使用\n将以下配置添加到 Cursor 的配置文件中：\n\n```json\n{\n  \"mcpServers\": {\n    \"knowledge-graph\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@aiuluna/knowledge-graph-mcp\"\n      ],\n      \"env\": {\n        \"KNOWLEDGE_GRAPH_DIR\": \"/path/to/your/knowledge_graph/dir\"\n      }\n    }\n  }\n}\n```\n\n注意：\n- 将 `KNOWLEDGE_GRAPH_DIR` 替换为您实际的知识图谱存储目录路径\n- 可以根据需要指定特定的版本号，如 `@0.0.1`\n\n### 在 Claude Desktop 中使用\n将以下配置添加到 `claude_desktop_config.json` 中：\n\n```json\n{\n  \"mcpServers\": {\n    \"knowledge-graph\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@aiuluna/knowledge-graph-mcp\"\n      ],\n      \"env\": {\n        \"KNOWLEDGE_GRAPH_DIR\": \"/path/to/your/knowledge_graph/dir\"\n      }\n    }\n  }\n}\n```\n\n## Prompt 使用指南\n\n### 项目结构\n项目中的 prompt 文件位于 `/src/rules/prompts` 目录下, 请将该文件拷贝到您 cursor 中并添加为 Agent 模式下的默认 rule（具体请参考 [Cursor Rules配置](https://docs.cursor.com/context/rules)）：\n```\n.cursor/\n  └── rules/\n      └── graph-query.mdc    # 知识图谱查询的 prompt 文件\n```\n\n### Agent 模式使用\n在 Cursor 中使用 Agent 模式时，可以通过以下方式触发知识图谱查询：\n\n1. 在编辑器中输入 `/ck` 命令\n2. Agent 将自动调用 `@graph-query.mdc` 中定义的 prompt\n3. prompt 会执行以下操作：\n   - 分析当前上下文\n   - 查询相关的知识图谱节点\n   - 生成总结性内容\n   - 将查询结果整合到对话中\n\n### 使用示例\n\n1. 查询特定主题的知识：\n   ```\n   /ck 请查找关于微服务架构的最佳实践\n   ```\n\n2. 分析代码依赖关系：\n   ```\n   /ck 分析当前文件的组件依赖关系\n   ```\n\n3. 获取项目时间线：\n   ```\n   /ck 显示项目近三个月的重要里程碑\n   ```\n\n4. 查询技术栈演进：\n   ```\n   /ck 分析项目技术栈的变更历史\n   ```\n\n### 其他的 rules\n项目中另有生成手绘风格的 prompt 和生成 markdown 的 prompt 用来生成作为知识图谱的 resources 存储。因 cursor 不支持 prompt 的 mcp 标准，因此本项目使用 tool 的方式获取该规则，您也可以将其与上面的 rules 一样，集成到 cursor 的 rules中去自己修改成期望的风格，并在 cursor Agent 模式下使用。\n\n## 工具列表\n\n### 图谱管理\n\n1. `create_graph`\n   * 创建新的知识图谱\n   * 输入参数：\n     * `name` (string): 图谱名称\n     * `description` (string, 可选): 图谱描述\n     * `type` (string): 图谱类型（topology/timeline/changelog/requirement/kb/ontology）\n\n2. `list_graphs`\n   * 列出所有知识图谱\n   * 输入参数：\n     * `status` (string, 可选): 按状态筛选（draft/published/archived）\n     * `type` (string, 可选): 按类型筛选\n\n3. `publish_graph`\n   * 发布知识图谱\n   * 输入参数：\n     * `graphId` (string): 图谱ID\n\n### 节点管理\n\n1. `add_node`\n   * 向图谱添加节点\n   * 输入参数：\n     * `graphId` (string): 图谱ID\n     * `type` (string): 节点类型\n     * `name` (string): 节点名称\n     * `description` (string, 可选): 节点描述\n     * `filePath` (string, 可选): 关联文件路径\n     * `metadata` (object, 可选): 节点元数据\n\n2. `update_node`\n   * 更新节点信息\n   * 输入参数：\n     * `graphId` (string): 图谱ID\n     * `nodeId` (string): 节点ID\n     * `name` (string, 可选): 新的节点名称\n     * `description` (string, 可选): 新的节点描述\n     * `filePath` (string, 可选): 新的文件路径\n     * `metadata` (object, 可选): 新的元数据\n\n3. `delete_node`\n   * 删除节点\n   * 输入参数：\n     * `graphId` (string): 图谱ID\n     * `nodeId` (string): 节点ID\n     * `confirmDelete` (boolean): 删除确认\n\n4. `get_node_details`\n   * 获取节点详细信息\n   * 输入参数：\n     * `graphId` (string): 图谱ID\n     * `nodeId` (string): 节点ID\n\n### 边管理\n\n1. `add_edge`\n   * 添加边\n   * 输入参数：\n     * `graphId` (string): 图谱ID\n     * `type` (string): 边类型\n     * `sourceId` (string): 源节点ID\n     * `targetId` (string): 目标节点ID\n     * `label` (string, 可选): 边标签\n     * `weight` (number, 可选): 边权重\n     * `metadata` (object, 可选): 边元数据\n\n2. `update_edge`\n   * 更新边信息\n   * 输入参数：\n     * `graphId` (string): 图谱ID\n     * `edgeId` (string): 边ID\n     * `label` (string, 可选): 新的边标签\n     * `weight` (number, 可选): 新的边权重\n     * `metadata` (object, 可选): 新的元数据\n\n3. `delete_edge`\n   * 删除边\n   * 输入参数：\n     * `graphId` (string): 图谱ID\n     * `edgeId` (string): 边ID\n     * `confirmDelete` (boolean): 删除确认\n\n### 资源管理\n\n1. `get_creation_guidelines`\n   * 获取资源创建规范\n   * 输入参数：\n     * `type` (string): 规范类型（svg/markdown/all）\n   * 详细说明：\n     * 用于获取创建 SVG 图形或 Markdown 文档的详细规范\n     * SVG 规范包含：手绘风格指南、布局建议、颜色方案、常用组件等\n     * Markdown 规范包含：文档结构模板、格式规范、常用语法示例等\n     * 建议在创建任何资源前先调用此工具获取规范\n\n2. `save_resource`\n   * 保存资源\n   * 输入参数：\n     * `graphId` (string): 图谱ID\n     * `nodeId` (string, 可选): 关联的节点ID\n     * `resourceType` (string): 资源类型（svg/markdown）\n     * `title` (string): 资源标题\n     * `description` (string, 可选): 资源描述\n     * `content` (string): 资源内容\n\n3. `update_resource`\n   * 更新资源信息\n   * 输入参数：\n     * `graphId` (string): 图谱ID\n     * `resourceId` (string): 资源ID\n     * `name` (string, 可选): 新的资源名称\n     * `title` (string, 可选): 新的资源标题\n     * `description` (string, 可选): 新的资源描述\n\n4. `delete_resource`\n   * 删除资源\n   * 输入参数：\n     * `graphId` (string): 图谱ID\n     * `resourceId` (string): 资源ID\n     * `confirmDelete` (boolean): 删除确认\n\n5. `unlink_resource`\n   * 解除资源与节点的关联\n   * 输入参数：\n     * `graphId` (string): 图谱ID\n     * `nodeId` (string): 节点ID\n     * `resourceId` (string): 资源ID\n\n## 开发\n\n```bash\n# 安装依赖\npnpm install\n\n# 开发模式\npnpm dev\n\n# 构建项目\npnpm build\n\n# 运行测试\npnpm test\n\n# 代码检查\npnpm lint\n```\n\n## 错误处理\n\n服务使用标准的错误处理机制，所有错误都会被记录到 `md/error_log.txt` 文件中，包含时间戳、错误信息和堆栈跟踪。\n\n## 许可证\n\n本项目采用 MIT 许可证 - 详见 [LICENSE](LICENSE) 文件。 ","readmeFilename":"README.zh-CN.md"}