You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Install [Claude for Desktop](https://claude.ai/download).
42
43
3. Add the Memgraph server to Claude config:
43
44
44
-
45
45
Open the config file in your favorite text editor. The location of the config
46
46
file depends on your operating system:
47
47
@@ -75,23 +75,170 @@ Add the following config:
75
75
}
76
76
```
77
77
78
-
<Callouttype="info">
79
-
You may need to put the full path to the uv executable in the command field. You can get this by running `which uv` on MacOS/Linux or `where uv` on Windows. Make sure you pass in the absolute path to your server.
78
+
<Callouttype="info">
79
+
You may need to put the full path to the uv executable in
80
+
the command field. You can get this by running `which uv` on MacOS/Linux or
81
+
`where uv` on Windows. Make sure you pass in the absolute path to your server.
80
82
</Callout>
81
83
82
-
<h2className="custom-header"> Chat with the database</h2>
84
+
<h4className="custom-header"> Chat with the database</h4>
85
+
83
86
1. Run Memgraph MAGE:
84
87
```bash
85
88
docker run -p 7687:7687 memgraph/memgraph-mage --schema-info-enabled=True
86
89
```
87
90
88
-
The `--schema-info-enabled` configuration setting is set to `True` to allow LLM to run `SHOW SCHEMA INFO` query.
89
-
2. Open Claude Desktop and see the Memgraph tools and resources listed. Try it out! (You can load dummy data from Memgraph Lab [Datasets](/memgraph-lab/getting-started/data-migration#datasets))
91
+
The `--schema-info-enabled` configuration setting is set to `True` to allow
92
+
LLM to run `SHOW SCHEMA INFO` query.
93
+
2. Open Claude Desktop and see the Memgraph tools and resources listed. Try it
This will install your local `memgraph-toolbox` into the image.
113
+
114
+
115
+
<h3className="custom-header">Run the Docker image</h3>
116
+
117
+
**1. Streamable HTTP mode (recommended)**
118
+
119
+
To expose the MCP HTTP server locally:
120
+
121
+
```
122
+
docker run --rm mcp-memgraph:latest
123
+
```
124
+
125
+
The server will be available at `http://localhost:8000/mcp/`
126
+
127
+
**2. Stdio mode (for integration with MCP stdio clients)**
128
+
129
+
Configure your MCP host to run the docker command and utilize stdio:
130
+
131
+
```
132
+
docker run --rm -i -e MCP_TRANSPORT=stdio mcp-memgraph:latest
133
+
```
134
+
135
+
<Callouttype="info">
136
+
By default, the server will connect to a Memgraph instance running on
137
+
localhost docker network `bolt://host.docker.internal:7687`. If you have a
138
+
Memgraph instance running on a different host or port, you can specify it
139
+
using environment variables.
140
+
</Callout>
141
+
142
+
**3. Custom Memgraph connection (external instance, no host network)**
143
+
144
+
To avoid using host networking, or to connect to an external Memgraph instance:
145
+
146
+
```
147
+
docker run --rm \
148
+
-p 8000:8000 \
149
+
-e MEMGRAPH_URL=bolt://memgraph:7687 \
150
+
-e MEMGRAPH_USER=myuser \
151
+
-e MEMGRAPH_PASSWORD=password \
152
+
mcp-memgraph:latest
153
+
```
154
+
155
+
<h3className="custom-header">Connect from developer tools</h3>
156
+
157
+
**Visual Studio Code (HTTP MCP extension)**
158
+
159
+
If you are using VS Code MCP extension or similar, your configuration for an
160
+
HTTP server would look like:
161
+
162
+
```json
163
+
{
164
+
"servers": {
165
+
"mcp-memgraph-http": {
166
+
"url": "http://localhost:8000/mcp/"
167
+
}
168
+
}
169
+
}
170
+
```
171
+
172
+
<Callouttype="info">
173
+
The URL must end in /mcp/
174
+
</Callout>
175
+
176
+
**Visual Studio Code (stdio using Docker)**
177
+
178
+
You can also run the server using stdio for integration with MCP stdio clients:
179
+
180
+
1. Open Visual Studio Code, open Command Palette (Ctrl+Shift+P or Cmd+Shift+P on
181
+
Mac), and select `MCP: Add server...`.
182
+
2. Choose `Command (stdio)`
183
+
3. Enter `docker` as the command to run.
184
+
4. For Server ID enter `mcp-memgraph`.
185
+
5. Choose "User" (adds to user-space `settings.json`) or "Workspace" (adds to
186
+
`.vscode/mcp.json`).
187
+
188
+
When the settings open, enhance the args as follows:
189
+
190
+
```json
191
+
{
192
+
"servers": {
193
+
"mcp-memgraph": {
194
+
"type": "stdio",
195
+
"command": "docker",
196
+
"args": [
197
+
"run",
198
+
"--rm",
199
+
"-i",
200
+
"-e", "MCP_TRANSPORT=stdio",
201
+
"mcp-memgraph:latest"
202
+
]
203
+
}
204
+
}
205
+
}
206
+
```
207
+
208
+
To connect to a remote Memgraph instance with authentication, add environment
209
+
variables to the `args` list:
210
+
211
+
```json
212
+
{
213
+
"servers": {
214
+
"mcp-memgraph": {
215
+
"type": "stdio",
216
+
"command": "docker",
217
+
"args": [
218
+
"run",
219
+
"--rm",
220
+
"-i",
221
+
"-e", "MCP_TRANSPORT=stdio",
222
+
"-e", "MEMGRAPH_URL=bolt://memgraph:7687",
223
+
"-e", "MEMGRAPH_USER=myuser",
224
+
"-e", "MEMGRAPH_PASSWORD=mypassword",
225
+
"mcp-memgraph:latest"
226
+
]
227
+
}
228
+
}
229
+
}
230
+
```
231
+
232
+
Then open GitHub Copilot in Agent mode, and interact with Memgraph using natural
233
+
language.
90
234
235
+
</Steps>
91
236
92
237
<h3className="custom-header">Resources</h3>
93
238
94
-
-[Introducing the Memgraph MCP Server](https://memgraph.com/blog/introducing-memgraph-mcp-server): A blog post on how to run Memgraph MCP Server and what are the future plans.
239
+
-[Introducing the Memgraph MCP
240
+
Server](https://memgraph.com/blog/introducing-memgraph-mcp-server): A blog
241
+
post on how to run Memgraph MCP Server and what are the future plans.
0 commit comments