AI integration
July 24, 2025Less than 1 minute
AI integration
Model Context Protocol (MCP)
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.
The integration runs locally in the same way the CLI is run, it requires no login, authentication or access to any private keys.
Features
The SubQuery MCP integration supports all the same functionality as the CLI, including:
- Creating new SubQuery projects
- Building SubQuery projects
- Publishing SubQuery projects to IPFS
- Importing Contract ABIs into your project to generate datasources
- Deploying to OnFinality managed services
Installing SubQuery MCP
For easy installation you can click the following buttons to install SubQuery MCP:
Manual configuration
For adding SubQuery MCP into other tools, the following command needs be run by the client. This will vary depending on the client that
npx -y @subql/cli mcp
An example manual configuration:
"subquery": {
"command": "npx",
"args": ["-y", "@subql/cli", "mcp"]
}
Examples
Create a new subquery project called new-subquery for the base network
Import a contract with the address 0x08e587bc0F634F5a97Cd38F73a9F55bC53B4e054 and it was deployed at block 32364699. It should index the Transfer event.