CloudQuery MCP Server
The CloudQuery MCP (Model Context Protocol) Server lets you query your CloudQuery asset inventory using Claude Desktop, Cursor IDE, or any LLM tool that supports the MCP protocol.
This server supports two operating modes:
Platform Mode β for CloudQuery Platform customers
PostgreSQL Mode β for CLI users syncing to a PostgreSQL destination
π Quick Start
Download the latest version of the MCP binary for your platform: https://github.com/cloudquery/mcp-releases/releases/latest
Unzip the binary and ensure it's executable.
π§ Requirements
Platform Mode
This mode is for CloudQuery Platform customers. Youβll need:
Your CloudQuery Platform API Key
Your deploymentβs API URL
PostgreSQL Mode
This mode is available to all CloudQuery CLI users who sync to a PostgreSQL destination. You'll need:
The Connection String or DSN to the PostgreSQL database
Note: The MCP server must be able to reach the Postgres database from where it is running.
βοΈ Environment Variables
Required
Use one of the following sets depending on the mode:
Platform Mode
CQ_PLATFORM_API_URL
CQ_PLATFORM_API_KEY
Postgres Mode
POSTGRES_CONNECTION_STRING
Optional
CQAPI_LOG_LEVEL
: Log level (debug
,info
,warn
,error
, default:info
)LOG_PRETTY
: Enable pretty console logging (auto-detected by default)LOG_COLOR
: Enable colored logging (auto-detected by default)
You can place these in a .env
file or export them in your shell.
π₯οΈ IDE Integration
Claude Desktop
Add the following config to:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Linux:
~/.config/Claude/claude_desktop_config.json
Platform Mode
{
"mcpServers": {
"cloudquery": {
"command": "/absolute/path/to/cq-platform-mcp",
"args": [],
"env": {
"CQ_PLATFORM_API_KEY": "your_api_key",
"CQ_PLATFORM_API_URL": "https://your-deployment.cloudquery.io/api"
}
}
}
}
Postgres Mode
{
"mcpServers": {
"cloudquery": {
"command": "/absolute/path/to/cq-platform-mcp",
"args": [],
"env": {
"POSTGRES_CONNECTION_STRING": "postgres://user:pass@localhost:5432/db?sslmode=disable"
}
}
}
}
The
"command"
must be an absolute path to the binary.
Cursor IDE
Open Cursor
Go to Settings β Cursor Settings β Tools and Integrations
Add a new MCP server configuration:
Platform Mode Example
{
"name": "cloudquery",
"command": "/path/to/cq-platform-mcp",
"args": [],
"env": {
"CQ_PLATFORM_API_KEY": "your_api_key",
"CQ_PLATFORM_API_URL": "https://your-deployment.cloudquery.io/api"
}
}
π macOS Security Note
If macOS blocks the binary, use:
xattr -d com.apple.quarantine /absolute/path/to/cq-platform-mcp
Or allow it in System Preferences β Security & Privacy β General.
π About MCP
MCP (Model Context Protocol) is a standard for tools like Claude Desktop to interact with external structured data sources. The CloudQuery MCP Server exposes your asset inventory to these tools.
Last updated
Was this helpful?