Courses · The Ambush Method

Pick your exam.

Every guide follows the same method: short daily sessions, the traps each topic sets, and exam-style questions with an explanation for every option.

  • 100% free · no paywalls, subscriptions or ads
  • 30–60 min a day
  • Exam-style questions
  • Taught in English

Databricks MCP and Genie: Managed vs Custom Servers, Tables vs Documents

Databricks MCP and Genie study guide: managed MCP server, external server with key in Secrets, and Genie answering count questions over governed tables

A research assistant needs live figures from a market-data source, answers from a third-party search service that wants an API key, and a way to tell users how many orders shipped late last week. The tempting move is to write one tidy server that wraps all of it. That is exactly the instinct Databricks MCP and Genie questions are built to catch. The exam is not asking whether you can build the integration. It is asking how little of it you should build, and which specialist should answer which kind of question.

This is the newest corner of the Generative AI Engineer Associate, and in my book it lives in the same chapter as Agent Bricks. The idea that ties them together is what I call the Abstraction Ladder: every piece of an agent sits somewhere between “write it yourself” and “rent it from Databricks,” and each rung up trades some control for speed and less to maintain. The skill being tested is naming the rung a requirement needs. Not climbing to the top, and not clinging to the bottom to prove you can code.

If you are still mapping the whole exam, start with my Databricks Generative AI Engineer Associate study guide. If you want the top rung of the ladder (renting a whole agent), read Databricks Agent Bricks: when to rent and when to build. This post covers the two lower rungs: MCP servers for tools, and Genie for structured data.

Where Databricks MCP and Genie sit in the exam

The two objectives live in different sections, which is a hint in itself. “Integrate managed, external, and custom MCP servers based on a given application requirements” sits in Assembling and Deploying Apps. “Enable multi-agent systems to leverage Genie Spaces or conversational API to retrieve data” sits in Application Development. According to the official certification page, those sections weigh 22% and 30%, the two heaviest on the paper. The exam has 45 scored questions in 90 minutes and costs US$200.

So you won’t see a dozen MCP questions. But the rent-or-build judgment shows up across design, development and deployment, and it is a cheap one to get right once you see the pattern.

What an MCP server actually is

MCP stands for Model Context Protocol, an open standard that gives an agent a set of tools it can discover and call through one uniform interface. An MCP server is simply a program that speaks that protocol. Instead of wiring each tool into the agent by hand, the agent points at a server and asks what tools are available.

Here is the part people miss: MCP is the transport, not a new kind of tool. A Unity Catalog function reached over MCP is still a Unity Catalog function, still governed by EXECUTE. A retriever reached over MCP is still the retriever you built for RAG on Databricks. MCP changes how the agent reaches the tool, not what the tool is or who is allowed to run it.

Managed, external, custom: three rungs, not three flavors

The exam objective names three kinds of server. It is easy to read them as three equal options that differ only in where they run. They are not. They differ in how much you build and how much you agree to keep alive.

Managed: nothing to host

A managed server is run by Databricks. You don’t deploy it, patch it or scale it; you reference it in the agent’s configuration and move on. When a scenario says Databricks “provides a managed server” for a source, the work for that source is already done. Your job is to use it.

One honest note on naming. When I checked the Databricks MCP docs in November 2026, the platform called these “Databricks-provided MCPs” (including Genie One, Databricks SQL, GitHub and Slack) and listed them under Unity Gateway. The exam guide still says “managed.” Same rung, newer label.

External: rent the floor, hold the key

An external server is hosted by someone else: a third-party service or a server your team runs outside Databricks. You can’t manage what you don’t own, so your only job is letting the agent in, which usually means holding a credential.

That credential is where the trap lives. For the exam, the API key belongs in Databricks Secrets, fetched at run time. Never in the agent code, never in a notebook cell, never in a config file the next person will open.

# External server: a third party hosts it, you only hold the key.
# The key comes from Databricks Secrets at run time, never from code or config.
search_key = dbutils.secrets.get(scope="research_agent", key="web_search_api_key")

Past the exam, the docs now let you register an external server through the MCPs UI and manage credentials in Unity Gateway, so the platform can hold the secret for you. That is the same instinct carried one rung further. On exam day, the answer the guide wants is still “store the key in Databricks Secrets.” I wrote more about keeping credentials and permissions in their governed homes in Databricks GenAI guardrails and governance.

Custom: build it only when the tool is truly yours

A custom server is one you write and host yourself, on Databricks Apps. The docs describe it as the way to build custom tools or turn an HTTP REST API into MCP tools. It is real and supported, and sometimes it is exactly right: an internal API only your company has, business logic no provided server could know about, a legacy system with a shape only you can wrap.

What it is not is a way to “unify” sources that already have servers. Every line of a custom server is a line you patch, scale and get paged about. If it exists only to re-expose what a managed server already serves, you bought all of that cost and none of the benefit.

The MCP ambush: the unified custom wrapper

This is the trap I’d bet on seeing in some form. A scenario lists a source Databricks already serves and a third-party API that needs a key. One answer proposes a single custom MCP server that wraps both “for a consistent interface” or “full control.” It reads like the senior engineer’s answer. It is the wrong one.

How I sort these, in about ten seconds:

  • Source already served by Databricks: use the managed (Databricks-provided) server.
  • Third-party service that needs a key: use the external server, with the key in Databricks Secrets.
  • A tool that exists nowhere else: that is when a custom server on Databricks Apps earns its upkeep.
  • Any answer with a hard-coded key: wrong, even if the rest looks fine.
  • Any answer that caches everything in tables to “avoid” the servers: it quietly changes the requirement and gives you stale data.

If an option’s main selling point is that it centralizes or unifies, check whether the thing it unifies was already handled by someone whose job it is to handle it.

If you like learning these traps one at a time, in short daily sessions, that is how my free Databricks Generative AI Engineer Associate course is built: 30-60 minutes a day, one objective at a time, no dumps.

Genie: the analyst, not the librarian

Now the second objective. Picture an assistant with a vector index full of policy PDFs, support transcripts and help articles. Someone asks “how many refunds did we process last week?” The index does the only thing it knows: it finds passages that sound similar to the question and hands them to the model. The model reads a sentence about refunds taking five business days, a transcript where someone mentions a refund, and produces a confident number that nobody ever counted.

A vector index retrieves by meaning. It cannot count, sum or look up a specific record. That is not a tuning problem; it is the wrong desk.

I think of it as two desks. The librarian reads documents and answers “what does the policy say?” That is Databricks Vector Search (now branded AI Search). The analyst reads the ledger and answers “how many,” “which customer” and “where does this order stand.” On Databricks, that analyst is Genie.

What Genie does

Genie is a natural-language layer over governed Unity Catalog tables. You ask in plain English, it writes a read-only SQL query, runs it on a SQL warehouse, and returns the answer along with the SQL it wrote. The curated unit is a Genie Space on the exam. The current Genie Agents API docs say Genie Agents were formerly known as Genie Spaces, so if a screenshot says “Genie Agent,” it is the same thing.

Genie is deliberately narrow: it works over structured data. Hand it a folder of contracts and it has nothing useful to say. That narrowness is a feature. A specialist that refuses the wrong questions keeps the right ones from being answered by guesswork.

Calling Genie from a multi-agent system

The objective says “multi-agent systems,” and that word matters. Genie rarely works alone. A coordinating agent (a supervisor) reads each question, decides whether it is an analyst question or a librarian question, and routes it. Genie is one member of that team.

You reach it in one of two ways. Genie can sit behind a Databricks-provided MCP server, which is the lighter wiring. Or you call it through its conversation API, which gives you stateful conversations, so a follow-up like “and how many of those were over 500 dollars?” knows what “those” means. The docs describe these as Chat mode APIs with follow-up questions and history.

from databricks.sdk import WorkspaceClient

w = WorkspaceClient()

# Curated in the UI first: a Genie Agent (formerly Genie Space) over governed tables.
space_id = "<your-genie-space-id>"

reply = w.genie.start_conversation_and_wait(
    space_id=space_id,
    content="How many support tickets were reopened last month?",
)

for att in reply.attachments or []:
    if att.query:
        print(att.query.query)    # the read-only SQL Genie wrote
    if att.text:
        print(att.text.content)   # the plain-English answer

The heavy lifting is not the call. It is the curation: the docs recommend well-annotated tables with clear column comments, company-specific instructions, at least five tested example SQL queries and at least five benchmark questions. A badly curated space returns bad SQL even with a perfect integration.

Why Genie’s numbers are safer

The quiet reason the exam likes Genie is governance. The docs say Genie evaluates data access with the user’s own Unity Catalog permissions, so responses include only data that user can access. Row filters and column masks still apply, and activity shows up in audit logs. A number from Genie can be traced to the query and the tables that produced it. A number assembled from retrieved passages carries none of that.

The Genie ambush: tuning the wrong tool

A scenario says the assistant gives made-up figures for “how many” or “what was the total” questions. The options offer better chunking, a stronger embedding model, more documents, a reranker. All real techniques. All useless here, because no amount of better retrieval turns a similarity search into a COUNT. The fix is routing the question to Genie over the governed tables.

The mirror image also shows up: a hand-built Unity Catalog function that runs one fixed SQL query, bolted on as a tool. It works until the question changes shape, and then you write another, and another. Genie turns any question over those tables into SQL, one rung up the ladder. Unless the scenario gives a reason to hand-code it, renting the specialist is the stronger answer.

  • Counts, totals, record lookups over tables: Genie.
  • “What does the document say”: the retriever.
  • Mixed questions in one assistant: a supervisor routing to both.
  • Wrong numbers from the document index: not a retrieval tuning problem.

How the two objectives connect

Put both on the ladder and the pattern is the same. At the bottom you write every tool and every query by hand. One rung up, a managed MCP server rents you a tool. Another rung, a Genie space rents you a whole capability: answering any question over a set of tables. At the top, an Agent Brick rents you a whole agent. What never changes is the agent’s loop underneath, and what never disappears is your responsibility for scoring it. That is the subject of Databricks agent evaluation vs monitoring, and serving it behind an endpoint is covered in Model Serving vs ai_query.

FAQ

What is the difference between managed, external and custom MCP servers on Databricks?

Managed (now called Databricks-provided) servers are hosted by Databricks for sources it already serves. External servers are hosted by a third party or your own team outside Databricks, and you supply the credential. Custom servers are ones you build and host on Databricks Apps, for tools that exist nowhere else.

Where should the API key for an external MCP server go?

For the exam, in Databricks Secrets, read at run time. Never hard-coded in the agent code or configuration. In current Databricks, Unity Gateway can also manage credentials for registered servers.

When should a question go to Genie instead of vector search?

When the answer is a count, a total or a specific record in a table. Questions about what a document says go to the retriever.

Is a Genie Space the same as a Genie Agent?

Yes. Databricks renamed Genie Spaces to Genie Agents. The exam guide still uses “Genie Spaces.”

Does Genie respect Unity Catalog permissions?

Yes. Genie runs queries with the asking user’s own Unity Catalog permissions, so each user only gets data they are allowed to see.

Learn the rest of the exam the same way

MCP and Genie are small objectives with clean traps: the unified custom wrapper, the hard-coded key, and the document index asked to count. Learn to spot those three and you have this corner of the exam.

If you want every objective broken down like this, with the traps called out and short daily sessions instead of a cram weekend, take my free Databricks Generative AI Engineer Associate course. It is built for 30-60 minutes a day, and it never uses exam dumps.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *