Skip to content

Commit a9587e6

Browse files
authored
Document CLI MCP (#659)
* Document CLI MCP * Fix install link
1 parent cb4c009 commit a9587e6

File tree

2 files changed

+52
-2
lines changed

2 files changed

+52
-2
lines changed

docs/.vuepress/sidebar.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ export const getSidebar = (locale: string) =>
413413
],
414414
},
415415
{
416-
text: 'Solana',
416+
text: "Solana",
417417
link: `${locale}/indexer/quickstart/quickstart_chains/solana.md`,
418418
},
419419
{
@@ -569,6 +569,7 @@ export const getSidebar = (locale: string) =>
569569
collapsible: true,
570570
children: [
571571
`${locale}/indexer/miscellaneous/faq.md`,
572+
`${locale}/indexer/miscellaneous/ai.md`,
572573
`${locale}/indexer/miscellaneous/ipfs.md`,
573574
`${locale}/indexer/miscellaneous/avalanche-eth-migration.md`,
574575
`${locale}/indexer/miscellaneous/env-support.md`,
@@ -687,7 +688,7 @@ export const getSidebar = (locale: string) =>
687688
`${locale}/subquery_network/architects/publish.md`,
688689
`${locale}/subquery_network/architects/publish-subgraph.md`,
689690
`${locale}/subquery_network/architects/next-steps.md`,
690-
`${locale}/subquery_network/architects/cost-comparison.md`,
691+
`${locale}/subquery_network/architects/cost-comparison.md`,
691692
],
692693
},
693694
{

docs/indexer/miscellaneous/ai.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# AI integration
2+
3+
## Model Context Protocol (MCP)
4+
5+
The SubQuery SDK supports MCP for supercharging development of SubQuery projects with AI tools. MCP allows you to create, build, and deploy SubQuery projects using AI IDEs like Cursor.
6+
7+
The integration runs locally in the same way the CLI is run, it requires no login, authentication or access to any private keys.
8+
9+
### Features
10+
11+
The SubQuery MCP integration supports all the same functionality as the CLI, including:
12+
* Creating new SubQuery projects
13+
* Building SubQuery projects
14+
* Publishing SubQuery projects to IPFS
15+
* Importing Contract ABIs into your project to generate datasources
16+
* Deploying to OnFinality managed services
17+
18+
19+
### Installing SubQuery MCP
20+
21+
For easy installation you can click the following buttons to install SubQuery MCP:
22+
23+
[![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/install-mcp?name=SubQuery&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBzdWJxbC9jbGkiLCJtY3AiXX0=)
24+
25+
<!-- {"name":"SubQuery","gallery":true,"command":"npx","args":["-y","@subql/cli","mcp"]} -->
26+
[![VSCode Install MCP Server](https://img.shields.io/badge/VS_Code-NPM-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=SubQuery&inputs=%7B%22id%22%3A%22workingDirectory%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Working%20Directory%22%7D&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22cwd%22%3A%22%24%7Binput%3AworkingDirectory%7D%22%2C%22args%22%3A%5B%22-y%22%2C%22%40subql%2Fcli%22%2C%22mcp%22%5D%7D)
27+
28+
29+
#### Manual configuration
30+
31+
For adding SubQuery MCP into other tools, the following command needs be run by the client. This will vary depending on the client that
32+
33+
```bash
34+
npx -y @subql/cli mcp
35+
```
36+
37+
An example manual configuration:
38+
39+
```json
40+
"subquery": {
41+
"command": "npx",
42+
"args": ["-y", "@subql/cli", "mcp"]
43+
}
44+
```
45+
46+
### Examples
47+
48+
* `Create a new subquery project called new-subquery for the base network`
49+
* `Import a contract with the address 0x08e587bc0F634F5a97Cd38F73a9F55bC53B4e054 and it was deployed at block 32364699. It should index the Transfer event.`

0 commit comments

Comments
 (0)