@@ -355,3 +355,77 @@ err := client.DropAllNamespaces(context.TODO())
355
355
```
356
356
357
357
## Model Context Protocol (MCP) Server
358
+
359
+ The [ Model Context Protocol] ( https://modelcontextprotocol.io/introduction ) (MCP)
360
+ is a standard for making tools, data, and prompts available to AI models. It can
361
+ be especially useful in bringing context on your stack into coding assistants.
362
+
363
+ Version 25 of Dgraph introduces two MCP servers with common tools for AI coding
364
+ assistants:
365
+
366
+ - ` mcp ` – a server that provides tools and data from your Dgraph cluster
367
+ - ` mcp-ro ` – a server that provides tools and data from your Dgraph cluster in
368
+ read-only mode
369
+
370
+ ### Configuration
371
+
372
+ To add the MCP server to your coding assistant, add the following to your
373
+ configuration file:
374
+
375
+ When using Hypermode Graphs, the MCP configuration is available on the graph
376
+ details screen in the console.
377
+
378
+ <CodeGroup >
379
+
380
+ ``` json Hypermode
381
+ {
382
+ "mcpServers" : {
383
+ "hypermode-graph" : {
384
+ "command" : " npx" ,
385
+ "args" : [
386
+ " mcp-remote" ,
387
+ " https://<graph-workspace>.hypermode.host/mcp/sse" ,
388
+ " --header" ,
389
+ " Authorization: Bearer <bearer-token>"
390
+ ]
391
+ }
392
+ }
393
+ }
394
+ ```
395
+
396
+ ``` json local
397
+ {
398
+ "mcpServers" : {
399
+ "dgraph" : {
400
+ "command" : " npx" ,
401
+ "args" : [" mcp-remote" , " https://localhost:9080/mcp/sse" ]
402
+ }
403
+ }
404
+ }
405
+ ```
406
+
407
+ </CodeGroup >
408
+
409
+ <Tip >
410
+ We're continuing to refine the resources available on the MCP servers. Please
411
+ share feedback via [ Discord] ( https://discord.hypermode.com ) or
412
+ [ GitHub] ( https://github.com/hypermodeinc/dgraph ) .
413
+ </Tip >
414
+
415
+ ### Tools
416
+
417
+ The MCP servers provide the following tools:
418
+
419
+ - ` Get-Schema ` – fetch the schema of your cluster
420
+ - ` Run-Query ` – run a query on your cluster
421
+ - ` Run-Mutation ` – run a mutation on your cluster
422
+ - ` Alter-Schema ` – modify the schema of your cluster
423
+ - ` Get-Common-Queries ` – provides reference queries to aide in query syntax
424
+
425
+ ### Prompt
426
+
427
+ For clients that support prompts over the MCP protocol, a prompt is available to
428
+ provide an introduction to the agent.
429
+
430
+ The full text of the prompt is
431
+ [ available in the Dgraph repo] ( https://github.com/hypermodeinc/dgraph/blob/8a774a03ac2558ad027bd86ead8b0059d3bfa3f5/dgraph/cmd/mcp/prompt.txt ) .
0 commit comments