# GrACE-MCP 快速开始指南
本文档是 GrACE-MCP 安装和配置的**唯一参考来源**。请按照以下步骤完成环境搭建。
## 🎯 概览
1. 安装 Python 依赖
2. 启动 Neo4j 数据库
3. 配置 MCP Client (Cursor, Claude Desktop 等)
4. 初始化服务
## 📦 1. 安装依赖
确保 Python版本 >= 3.10。
```bash
pip install -r requirements.txt
```
## 🐳 2. 启动 Neo4j
GrACE-MCP 需要连接 Neo4j 数据库。最简单的方法是使用 Docker。
**方式 A: 使用 Docker Compose (推荐)**
```bash
docker-compose up -d
```
*默认账号: `neo4j` / 密码: `password`*
*详细 Docker 配置请参考 [DOCKER.md](DOCKER.md)*
**方式 B: 使用 Docker 命令**
```bash
docker run -d \
--name neo4j \
-p 7474:7474 -p 7687:7687 \
-e NEO4J_AUTH=neo4j/password \
neo4j:latest
```
## 🔌 3. 配置 MCP Client
请根据您使用的客户端工具修改配置文件。
⚠️ **注意**:请将下方配置中的 `/path/to/grace-mcp` 替换为您实际的项目绝对路径。
### 通用配置 JSON
```json
{
"mcpServers": {
"grace-mcp": {
"command": "python",
"args": ["-m", "src.server"],
"cwd": "/path/to/grace-mcp",
"env": {
"PYTHONPATH": "/path/to/grace-mcp"
}
}
}
}
```
### 配置文件位置
| 客户端 | 操作系统 | 配置文件路径 |
| :--- | :--- | :--- |
| **Claude Desktop** | Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
| | macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
| **Cursor** | Windows | `%USERPROFILE%\.cursor\mcp.json` |
| | macOS | `~/.cursor/mcp.json` |
| | Linux | `~/.config/cursor/mcp.json` |
| **VS Code** | Windows | `%APPDATA%\Code\User\globalStorage\mcp-servers.json` |
| | macOS | `~/Library/Application Support/Code/User/globalStorage/mcp-servers.json` |
### 4. 验证与初始化
1. **重启您的 MCP Client**。
2. 在对话框中输入:
> "请帮我配置 GrACE-MCP Server:Neo4j URI 为 bolt://localhost:7687,用户 neo4j,密码 password"
3. 如果 AI 自动调用 `configure_neo4j` 工具并返回成功,说明安装完成!🎉
## 📚 下一步
- 查看 [使用指南 (USAGE.md)](USAGE.md) 了解所有可用工具。
- 查看 [示例场景 (EXAMPLES.md)](EXAMPLES.md) 学习如何高效使用。