Skip to content

Commit 9935848

Browse files
committed
docs: update installation with npm package option
1 parent da0f37a commit 9935848

File tree

1 file changed

+43
-17
lines changed

1 file changed

+43
-17
lines changed

README.md

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ The system uses a dual-schema approach:
5050

5151
### Installation
5252

53+
Choose the installation method that works best for you:
54+
55+
#### Option 1: Development Install (From Source)
56+
57+
Best for: Contributing to the project or customizing the code
58+
5359
1. **Clone the repository:**
5460
```bash
5561
git clone https://github.com/drewdrewH/code-graph-context.git
@@ -73,45 +79,63 @@ This will start Neo4j with:
7379

7480
4. **Configure environment variables:**
7581
```bash
76-
# Create .env file
7782
cp .env.example .env
78-
79-
# Edit .env with your configuration:
80-
OPENAI_API_KEY=your_openai_api_key_here
81-
NEO4J_URI=bolt://localhost:7687
82-
NEO4J_USER=neo4j
83-
NEO4J_PASSWORD=PASSWORD
83+
# Edit .env with your configuration
8484
```
8585

8686
5. **Build the project:**
8787
```bash
8888
npm run build
8989
```
9090

91-
### Adding to Claude Code
92-
93-
**Method 1: Direct (Recommended)**
91+
6. **Add to Claude Code:**
9492
```bash
9593
claude mcp add code-graph-context node /absolute/path/to/code-graph-context/dist/mcp/mcp.server.js
9694
```
9795

98-
**Method 2: With Debug Shell** (useful for troubleshooting)
96+
#### Option 2: NPM Install (Global Package)
97+
98+
Best for: Easy setup and automatic updates
99+
100+
1. **Install the package globally:**
99101
```bash
100-
claude mcp add code-graph-context /absolute/path/to/code-graph-context/debug-mcp.sh
102+
npm install -g code-graph-context
101103
```
102104

103-
**Method 3: Manual Configuration**
105+
2. **Set up Neo4j** (choose one):
104106

105-
Add to your Claude Code MCP configuration file:
107+
**Option A: Docker (Recommended)**
108+
```bash
109+
docker run -d \
110+
--name code-graph-neo4j \
111+
-p 7474:7474 -p 7687:7687 \
112+
-e NEO4J_AUTH=neo4j/PASSWORD \
113+
-e NEO4J_PLUGINS='["apoc"]' \
114+
neo4j:5.15
115+
```
116+
117+
**Option B: Neo4j Desktop**
118+
- Download from [neo4j.com/download](https://neo4j.com/download/)
119+
- Install APOC plugin
120+
- Start database
106121

122+
**Option C: Neo4j Aura (Cloud)**
123+
- Create free account at [neo4j.com/cloud/aura](https://neo4j.com/cloud/platform/aura-graph-database/)
124+
- Note your connection URI and credentials
125+
126+
3. **Add to Claude Code:**
127+
```bash
128+
claude mcp add code-graph-context code-graph-context
129+
```
130+
131+
Then configure in your MCP config file (`~/.config/claude/config.json`):
107132
```json
108133
{
109134
"mcpServers": {
110135
"code-graph-context": {
111-
"command": "node",
112-
"args": ["/path/to/code-graph-context/dist/mcp/mcp.server.js"],
136+
"command": "code-graph-context",
113137
"env": {
114-
"OPENAI_API_KEY": "your_openai_api_key_here",
138+
"OPENAI_API_KEY": "sk-your-key-here",
115139
"NEO4J_URI": "bolt://localhost:7687",
116140
"NEO4J_USER": "neo4j",
117141
"NEO4J_PASSWORD": "PASSWORD"
@@ -121,6 +145,8 @@ Add to your Claude Code MCP configuration file:
121145
}
122146
```
123147

148+
**Note:** The env vars can be configured for any Neo4j instance - local, Docker, cloud (Aura), or enterprise.
149+
124150
## Tool Usage Guide & Sequential Workflows
125151

126152
### Sequential Tool Usage Patterns

0 commit comments

Comments
 (0)