AI

Engineering

How we made our IDEs data-aware with a Go MCP Server

How we made our IDEs data-aware with a Go MCP Server header

TL;DR:
We built a Go-based MCP server that bridges the gap between AI code assistants and our cloud infrastructure data. By exposing database schemas, queries, and insights directly to Claude, Cursor (or any client that supports MCP), our AI assistant now understands both our code and data. This eliminated context-switching, sped up workflows (from hours to minutes), and unlocked new ways to audit, analyze, and troubleshoot infrastructure. Any data-heavy team could adopt this pattern for massive productivity gains.

Most developers (and our own team) have been fully using AI code assistance to help with all aspects of building software. We have found that our AI-assisted IDEs know our functions, suggest completions, and help debug issues. However, their usefulness stopped dead at our database. AI assistants have zero understanding of what's actually in our tables, what queries make sense, or how your data connects together. This often results in hallucinations/bad data if you ever were to ask it a question about cloud infrastructure.

At CloudQuery, we've been running an experiment for months: what happens when you bridge that gap? We built an MCP server in Go (in fact, our entire stack runs on Go) that gives Claude or Cursor direct access to our cloud infrastructure database, and the results have fundamentally changed how our engineering team works.

This post covers what we learned about making LLMs truly data-aware, the technical gotchas nobody talks about, and why this pattern could transform how any team with substantial data operates.

We noticed something…

We noticed something frustrating: our engineers (and users) were constantly switching between an AI assistant for code analysis and our platform for actual data queries.

The workflow looked like this:

  • Claude/Cursor helps us write Go code for infrastructure analysis
  • Engineer switches to CloudQuery to understand available tables
  • Copy-paste table schemas back to Claude
  • Manually explain column meanings and relationships
  • Write more SQL queries, debug them separately
  • Go back to Claude with the results for further analysis
Meme with two panels: left shows a woman yelling and pointing while another woman holds her back, captioned: ‘Engineers frantically switching between Claude for code and CloudQuery for data, copy-pasting schemas, manually explaining relationships.’ Right panel shows a cat sitting at a dinner table looking indifferent, captioned: ‘Claude completely clueless about what’s actually in your database.’

We realized: What if AI Assistants could directly explore our data layer?

By building an MCP server that exposes our database schemas, query capabilities, and data insights directly to your AI Assistant, we bridged this gap. Now Claude/Cursor/whatever doesn't just know our Go code - it knows our actual cloud infrastructure data.

What We Built

When Anthropic dropped the Model Context Protocol in November with SDKs for Python, TypeScript, Java, and Kotlin, but not Go, we had a problem. But also an opportunity.

We built our MCP server specifically to expose our data layer to Claude. We're using the mark3labs/mcp-go library since Anthropic doesn't have an official Go SDK yet (though they're working on it).

Here's what a bare bones MCP server looks like:

package main

import (
"context"
"log"
"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
)

func main() {
s := server.NewMCPServer(
"cloudquery-mcp",
"1.0.0",
server.WithLogging(),
)

s.AddTool(mcp.Tool{
Name: "list_tables",
Description: "List all available tables in the database",
InputSchema: mcp.ToolInputSchema{
Type: "object",
Properties: map[string]interface{}{
"pattern": {
"type": "string",
"description": "Optional regex pattern to filter table names",
},
},
},
}, handleListTables)

if err := s.Serve(context.Background()); err != nil {
log.Fatal(err)
}
}

We created six specific tools that give your AI Assistant complete access to our data layer:

Data Discovery Tools:

  • list_installed_plugins - Shows what cloud providers and services are available
  • table_search_regex - Finds tables using pattern matching across all data sources
  • table_schemas - Retrieves detailed schema information for specific tables

Data Analysis Tools:

  • column_search - Locates specific fields across all tables (finding "tag" columns across different cloud providers)
  • execute_clickhouse_sql_query - Runs analytical queries against our ClickHouse cluster
  • known_good_queries - Provides working SQL examples for common infrastructure analysis

Each tool is designed around data exploration workflows rather than just exposing database operations. When your AI Assistant needs to understand our AWS security groups, it can now:

  1. Discover that the AWS integration exists and is syncing data
  2. Search for security-related tables
  3. Retrieve the aws_ec2_security_groups schema
  4. Execute queries to find groups allowing port 22 access
  5. Cross-reference with instance data to assess actual risk

Coding when the LLM Knows Your Data

The transformation in our engineering workflow has been dramatic. Here are specific examples of how bridging the code-data gap changed our day-to-day operations:

Infrastructure Troubleshooting

Before MCP server: We suspected our CloudQuery sync wasn't converging properly. Resources would appear, disappear, then reappear in our database. To investigate required:

  1. SSH into our server cluster
  2. Write complex SQL queries joining sync metadata tables
  3. Analyze patterns across multiple time windows
  4. Cross-reference with CloudQuery's internal state tables
  5. Document findings for the team

Total time: 2-3 hours, requiring deep SQL knowledge.

After MCP server: “Check if our asset sync data is converging properly for the production AWS account."

Claude uses our MCP tools to:

  • Query sync run metadata across time windows
  • Analyze resource count patterns and state transitions
  • Cross-reference with expected AWS API responses
  • Generate a comprehensive convergence report

Security Analysis

Our security team regularly needs to audit cloud configurations. Previously, this meant:

  1. Engineer receives security question about EC2 instances
  2. Manually explores CloudQuery tables to understand schema
  3. Writes queries to find relevant security groups, NACLs, instances
  4. Cross-references data across multiple tables
  5. Formats findings for security team

Now: "Audit our production AWS environment for instances with overly permissive security groups."

Composite image showing a chat interface where a user asks: ‘Can you help me find some security risks in my CloudQuery asset inventory?’ The assistant replies with a plan to identify EC2 instances with public IPs and unrestricted SSH, and to create a dashboard. On the right, an AWS EC2 Security Dashboard is displayed, highlighting 7 instances with unrestricted SSH, 23 public instances, 34.2% permissive security group ratio, and 156 total instances.

Your AI Assistant automatically:

  • Explores EC2 instance and security group tables
  • Identifies problematic configurations
  • Cross-references with actual instance usage
  • Provides remediation priorities

The security team gets actionable insights instead of raw data dumps.

Final Thoughts

By giving Claude/Cursor direct access to our data layer through structured tools, we've created something genuinely new: an AI assistant that understands both our code AND our data.

Epic Handshake meme. Left arm labeled ‘Your Code,’ right arm labeled ‘Your Data,’ and the handshake labeled ‘MCP Server.’

This pattern isn't specific to CloudQuery. Any team with substantial databases could benefit from this approach:

  • E-commerce teams: AI Assistants could explore user behavior tables, understand purchase patterns, and suggest optimizations
  • SaaS companies: Expose usage analytics, feature adoption data, and customer segments
  • Financial services: Bridge the gap between trading algorithms and market data
  • Healthcare platforms: Connect clinical code with patient data insights (with proper privacy controls)

The productivity gains compound when your AI assistant has full context of both code and data layers.

The Bigger Picture

Building an MCP server taught me more about how LLMs actually work than months of reading papers. When you watch your AI assistants make decisions about data exploration, tool selection, and query optimization, you start understanding the practical potential of AI-assisted development.

The code-data bridge we built isn't just a productivity hack. It's a preview of how software development changes when your AI assistant has full context of both your code and your data.

I'd argue 99.99% of developers haven't thought of this pattern yet. But exposing your data layer to LLMs through MCP servers genuinely supercharges what's possible with AI-assisted development. The barrier between "I have a question about our data" and "I have a comprehensive answer" basically disappears.

That changes everything.

Try CloudQuery yourself

Self-hosted, open source, and free to start. Or schedule a demo to see the managed version.

Related posts

AI

Engineering

Tutorials

Scale GitHub Issues semantic search with CloudQuery, BigQuery, and Vertex AI

Sync GitHub issues to BigQuery with CloudQuery, generate Vertex AI embeddings via BigQuery remote models, and power fast, fully managed semantic search.

Mariano Gappa

Mariano Gappa

October 9, 2025

AI

Engineering

Tutorials

Improve GitHub Issues search effortlessly with CloudQuery, pgvector and OpenAI

Turn GitHub issues into instant insights by syncing with CloudQuery, generating pgvector embeddings in PostgreSQL, and querying with natural language.

Mariano Gappa

Mariano Gappa

October 1, 2025

AI

Cloud Asset Inventory

Product News

CloudQuery Platform Adds Business Context and Scheduled Exports to Cloud Inventory

CloudQuery Platform now groups cloud resources into apps and environments, and lets you schedule automated data exports to your data warehouse on a cron.

Zeen Rachidi

Zeen Rachidi

August 31, 2026

Engineering

We benchmarked our ETL tool and synced 1 million rows in 2 seconds on a MacBook

We benchmarked our ETL tool and synced 1 million rows in 2 seconds on laptop hardware, which is 68% faster than enterprise platforms.

Joe Karlsson

Joe Karlsson

August 27, 2026

AI

Product News

What's new in the CloudQuery Platform AI Assistant

The CloudQuery Platform AI Assistant just got a major upgrade enabling you to build reports from chat, revisit past conversations, manage policies conversationally, and more.

Zeen Rachidi

Zeen Rachidi

July 16, 2026

AI

Product News

Try CloudQuery Platform Today: Self-Service Signup Is Here

CloudQuery's Platform now offers self-service signup

Zeen Rachidi

Zeen Rachidi

June 18, 2026

AI

Product News

Introducing the CloudQuery Platform AI Assistant

CloudQuery's new AI Assistant lets you ask questions about your cloud infrastructure in plain English - no SQL required.

Joe Karlsson

Joe Karlsson

May 18, 2026

AI

Cloud Infrastructure

Cloud Operations

What Makes a Cloud Data Layer AI-Ready

AI for cloud operations is only as good as the data behind it. Learn what makes a cloud data layer AI-ready and which use cases it enables first.

Joe Karlsson

Joe Karlsson

February 28, 2026

Engineering

Third Normal Form (3NF) vs Star Schema: When to Use Each

Learn the differences between Third Normal Form (3NF) and star schema with SQL examples, table diagrams, and guidance on when to use each in a data warehouse.

Tim Armstrong

Tim Armstrong

February 25, 2026

Own your pipeline.
Own your data.