Domain 3 is worth 19% of the CCAR-P blueprint — the single largest slice — because integration is where architecture stops being a diagram and starts being a system that pages someone at 3am. The scenarios here are rarely about whether a single feature works. They hand you a production integration that is degrading — retrieval that returns plausible-but-wrong passages, an MCP server whose tool surface has grown until the model calls the wrong function, per-user data leaking across a shared token, a cost graph bending upward with no one able to say which agent step is responsible — and ask which architectural decision prevents it.
Four subsystems recur across every question: retrieval (how you get the right context in front of Claude), the Model Context Protocol (how you expose tools, data, and prompts to the model at scale), identity and secrets (how each call carries exactly the authority it should and no more), and observability (how you see, price, and evaluate what happened). The exam rewards candidates who can reason about the seams between these — the timeout that should trip a circuit breaker, the token that should be scoped per user rather than per service, the retrieval metric that should gate a deploy.
The throughline is least-authority, most-visibility: every integration should carry the minimum privilege it needs and emit enough structured signal to be debugged after the fact. Read every scenario asking 'what is the smallest thing that could be wrong here, and would the design let me find it?' That question, more than any single API detail, is what this domain tests.
RAG vs long-context vs fine-tuning: choosing the retrieval strategy
The first architectural decision is whether you need retrieval at all. Claude's large context windows mean that for a bounded corpus — a single contract, a policy handbook, a few dozen pages — you can often place the whole document in the prompt and skip the entire RAG pipeline. RAG earns its complexity when the knowledge base is too large to fit, changes frequently, requires access controls per document, or when you need citations traceable to specific sources. Fine-tuning is not an option to reach for on this exam: Anthropic does not offer customer fine-tuning of Claude models, so any answer proposing 'fine-tune the model on the knowledge base' is wrong by construction. The real trade-off is retrieval versus long-context, and you make it on corpus size, freshness, access control, and cost-per-call.
| Signal | Prefer long-context | Prefer RAG |
|---|---|---|
| Corpus size | Fits comfortably in the window | Exceeds the window or is unbounded |
| Freshness | Static or versioned per request | Updates constantly; re-embedding beats re-prompting |
| Access control | Uniform — everyone sees the same doc | Per-document / per-user filtering required |
| Cost profile | Few calls, large docs tolerable | Many calls; paying for full doc each time is wasteful |
| Citations | Whole doc present, easy to quote | Need provenance back to specific chunks |
A common hybrid the exam likes: use RAG to narrow a huge corpus down to a handful of candidate documents, then place those full documents in the context window rather than tiny fragments. This preserves the grounding of retrieval while giving Claude enough surrounding text to reason well — retrieval for selection, long-context for comprehension.
RAG architecture: chunking, retrieval quality, and re-ranking
A RAG pipeline has three quality-determining stages, and architects are tested on knowing which stage a symptom points to. Chunking decides what a retrievable unit is. Retrieval (usually vector similarity, often combined with keyword/BM25 as hybrid search) decides which units are candidates. Re-ranking re-scores those candidates with a stronger model to put the truly relevant ones on top. A frequent trap: the answer improves recall by retrieving more chunks, but that pushes precision down and floods the context with noise. The architecture-grade fix for 'right document exists but ranks low' is a re-ranking stage, not simply raising top-k.
- Chunk on semantic boundaries (sections, headings), not fixed character counts that split sentences mid-thought.
- Add overlap between chunks so a fact spanning a boundary is not lost; too much overlap wastes storage and blurs retrieval.
- Store metadata (source, section, timestamp, ACL) alongside each chunk — you filter and cite on it later.
- Use hybrid retrieval (semantic + lexical) so exact identifiers, error codes, and names are not lost by pure embeddings.
- Add a re-ranker over the top candidates to fix ordering; retrieve broad, then re-rank narrow.
- Consider contextual retrieval — prepend a short chunk-specific summary before embedding so isolated chunks retrieve on their true meaning.
Evaluate the two stages separately. Retrieval quality is measured with metrics like recall@k and precision@k against a labeled set of question-to-passage pairs; answer quality is measured on the generated output. Conflating them hides where a regression lives — a good answer can mask poor retrieval when the model already knew the fact, and a bad answer can come from perfect retrieval poorly synthesized.
Grounding and citations: making retrieval trustworthy
Retrieval is only useful if the model actually grounds its answer in the retrieved text and can point to where each claim came from. At enterprise scale, citations are not a nicety — they are how reviewers audit answers, how you detect retrieval drift, and how legal accepts the system at all. Design the prompt so Claude cites the specific source or chunk id for each assertion, and so it is explicitly permitted to say the answer is not in the provided context rather than filling the gap from parametric memory.
- Tag each retrieved passage with a stable identifier the model can cite verbatim.
- Instruct the model to answer only from provided context and to abstain when the context is insufficient — abstention is a feature, not a failure.
- Surface citations in the response so downstream review and evaluation can check that quoted spans actually support the claim.
- Log retrieved-chunk ids with each answer so a wrong answer can be traced to whether retrieval or synthesis failed.
MCP server design at enterprise scale: tools, resources, and prompts
The Model Context Protocol exposes three distinct primitives, and choosing the right one is a recurring exam theme. Tools are model-controlled actions — the model decides when to invoke them, and they can have side effects (send an email, query a database, create a ticket). Resources are application-controlled context — addressable read-only data (a file, a record, a schema) the host application attaches to context. Prompts are user-controlled templates — reusable, parameterized interactions a user deliberately selects. The mistake is modeling everything as a tool; read-only reference data belongs as a resource, and a canned workflow a user triggers belongs as a prompt.
| Primitive | Controlled by | Typical use |
|---|---|---|
| Tool | Model | Actions with effects: write, query, call an API |
| Resource | Application | Read-only context: documents, records, schemas |
| Prompt | User | Reusable templated workflows the user invokes |
At scale the dominant failure is tool-surface bloat. When a single server exposes dozens of overlapping tools, the model's tool-selection accuracy drops and token cost per call rises. The architectural remedies are consolidation (fewer, well-scoped tools with clear, non-overlapping purposes), precise descriptions and schemas so the model can disambiguate, and segmentation of tools behind scopes so a given session only sees the tools its role needs. Treat the tool list as an API surface you version and curate, not a junk drawer.
MCP transports, schemas, and error contracts
MCP defines two standard transports. stdio is for local servers the host launches as a subprocess — lowest latency, no network exposure, ideal for developer machines and desktop tooling. Streamable HTTP is for remote servers reached over the network — the right choice for a centrally hosted, multi-tenant enterprise server, and the transport that participates in the OAuth authorization flow. Choosing stdio for a service that must serve many users centrally, or HTTP for a purely local dev tool, is a classic mismatched-transport trap.
| Concern | stdio | Streamable HTTP |
|---|---|---|
| Location | Local subprocess of the host | Remote, network-reachable |
| Multi-tenant | No — one process per client | Yes — central, many clients |
| Auth | Inherits local process trust | OAuth 2.1 authorization flow |
| Best for | Local dev tools, desktop apps | Enterprise shared servers |
Tool schemas are a contract. Each tool declares a JSON Schema input, and the server should validate against it and return structured, actionable errors rather than free-text or silent failures. A tool that returns a 200 with an error buried in prose teaches the model nothing about how to recover; a tool that returns an explicit error result with a machine-readable reason lets the model retry, adjust arguments, or surface the failure cleanly.
{
"name": "lookup_invoice",
"description": "Fetch a single invoice by its exact id. Read-only.",
"inputSchema": {
"type": "object",
"properties": {
"invoiceId": { "type": "string", "description": "Exact invoice id, e.g. INV-10432" }
},
"required": ["invoiceId"]
}
}
// A well-formed error result the model can act on:
{
"isError": true,
"content": [{ "type": "text", "text": "NOT_FOUND: no invoice with id INV-99999. Verify the id and retry." }]
}Authentication, secrets, and least-privilege
Identity is the highest-stakes seam in an integration. A remote MCP server serving multiple users must carry each user's identity through to the downstream system so that access checks and audit logs reflect the actual person — not a single shared service account. The exam's canonical anti-pattern is a shared static token or service credential used for every user: it collapses per-user authorization, makes least-privilege impossible, and turns one leaked secret into total compromise. The correct pattern is OAuth-based, per-user tokens with the narrowest scopes the task requires.
- Use OAuth 2.1 for remote MCP servers so each user authenticates and the server acts with that user's authority, not a global one.
- Scope tokens to least privilege — a read-only reporting agent should never hold write or admin scopes 'just in case'.
- Never hardcode secrets in server code or config; inject them via environment variables / a secrets manager, and reference them by expansion (e.g. ${DB_PASSWORD}) so the value never lives in the repo.
- Rotate and revoke: per-user, short-lived tokens contain a breach; a long-lived shared key turns any leak into a full compromise.
- Keep authorization server-side — never trust the client to tell you what it is allowed to do.
Secrets hygiene extends to configuration. Environment-variable expansion in MCP/client config lets you reference a secret by name so the actual value stays in a vault or the deployment environment, never checked into source control. If a scenario shows a password literal sitting in a committed config file, the finding is 'move it to an env var / secrets manager and expand by reference,' regardless of what else is going on.
Observability: tracing, cost, latency, and evaluating retrieval in prod
You cannot operate what you cannot see. An agent run is a tree of steps — model turns, tool calls, retrievals — and the unit of observability is the trace that ties them together under one correlation id. For each step you want inputs, outputs, token counts (input, output, and cache-read/write), latency, and the tool result or error. Without per-step attribution, a cost spike or latency regression is unattributable, and 'the agent got slow' is as far as anyone can diagnose.
| Signal | What it answers | Design implication |
|---|---|---|
| Trace / span tree | What did this run actually do? | One correlation id spanning all steps |
| Token & cost metrics | Which step is expensive? | Record input/output/cache tokens per call |
| Latency per step | Where is the time going? | Set per-step latency budgets and alert |
| Tool-call logs | Which tool failed and why? | Log structured tool errors, not just successes |
| Retrieval eval | Is retrieval still good? | Sample prod queries against a labeled set |
Evaluating retrieval quality in production is its own discipline. Offline metrics drift as the corpus and query mix change, so architects sample real production queries, score retrieval against a maintained labeled set, and gate deploys on those metrics. Prompt caching adds a wrinkle worth tracking: cache-read tokens are far cheaper than uncached input, so cost dashboards should separate cache hits from misses — a rising bill can be a falling cache-hit rate, not more traffic.
Reliability of integrations: timeouts, retries, and circuit-breaking
Every external dependency — an MCP tool, a retrieval backend, a downstream API — will eventually be slow or down, and the architecture has to degrade rather than collapse. The core patterns: bounded timeouts so no call hangs indefinitely; retries with exponential backoff and jitter for transient failures, but only on idempotent operations; and circuit breakers that stop hammering a failing dependency and fail fast until it recovers. Retrying a non-idempotent action (charge a card, send an email) is a classic wrong answer — it duplicates side effects.
- Set explicit timeouts on every tool and retrieval call; an unbounded call is a latent outage.
- Retry only idempotent operations, with exponential backoff and jitter to avoid synchronized retry storms.
- Wrap flaky dependencies in a circuit breaker so repeated failures fail fast instead of piling up latency.
- Return structured errors the model (and your logs) can act on, so a partial failure degrades gracefully instead of poisoning the whole run.
- Prefer graceful degradation — a cached or partial answer with a clear caveat beats a hung request or a crash.
These patterns compose with observability: a circuit breaker's state transitions, timeout trips, and retry counts are themselves telemetry. When the exam asks how to keep an agent responsive while a dependency flaps, the complete answer pairs a reliability pattern (timeout, breaker) with the signal that makes it visible (log the trip, alert on the open breaker).
Key takeaways
- 01Fine-tuning Claude is not an option — the real retrieval choice is RAG vs long-context, decided on corpus size, freshness, per-document access control, and cost; caching often makes long-context win for large-but-stable docs.
- 02Fix low-ranking-but-present passages with a re-ranking stage, not by raising top-k; retrieve broad, re-rank narrow, and evaluate retrieval and answer quality separately.
- 03Enterprise RAG must both force citations and permit abstention — grounded-but-uncited is an audit gap, ungrounded-but-fluent is a hallucination.
- 04MCP has three primitives: tools (model-controlled actions), resources (application-controlled read-only data), prompts (user-controlled templates); modeling read-only data as a tool is a design smell.
- 05Tool-surface bloat degrades model tool-selection and raises cost — consolidate and scope tools rather than adding more; treat the tool list as a curated, versioned API.
- 06Use stdio for local subprocess servers and Streamable HTTP for central multi-tenant servers; remote servers authenticate with per-user OAuth 2.1 tokens, never one shared service credential.
- 07Secrets belong in env vars / a secrets manager and are referenced by expansion; a literal credential in a committed config is always a finding.
- 08Observability means a per-run trace with a correlation id carrying token/cost, latency, and structured tool-call outcomes per step — and sampling prod queries against a labeled set to catch retrieval drift.
- 09Reliability = bounded timeouts + backoff-with-jitter retries on idempotent ops only + circuit breakers, each emitting telemetry so failures degrade gracefully and stay visible.
Common mistakes
Proposing to fine-tune Claude on the knowledge base to improve grounding.
Customer fine-tuning of Claude is not offered; use RAG for large/dynamic corpora or long-context (often with caching) for bounded, stable ones.
Improving retrieval by increasing top-k to pull in more chunks.
That lowers precision and floods context; add a re-ranking stage and hybrid search, then trim — precision at the top of the list drives answer quality.
Modeling every MCP capability as a tool, including read-only reference data.
Expose read-only context as resources and user-triggered workflows as prompts; reserve tools for model-controlled actions with effects.
Using one shared service token so a remote MCP server can reach the backend for all users.
Authenticate each user via OAuth 2.1 and carry per-user, least-scope tokens so authorization, audit, and blast radius are all correct.
Retrying every failed tool call uniformly, including payments and sends.
Retry only idempotent operations with backoff and jitter; make side-effecting calls idempotent (idempotency keys) or don't retry them, and use a circuit breaker for persistent failures.
Frequently asked
When should I choose RAG over just putting documents in Claude's context window?
Choose RAG when the corpus is too large to fit, changes often, needs per-document access control, or requires citations traceable to specific chunks. For a bounded, stable document reused across requests, long-context with prompt caching is usually simpler and cheaper. A strong hybrid is to use retrieval to select a few candidate documents, then place those full documents in context for comprehension.
What is the difference between MCP tools, resources, and prompts?
Tools are model-controlled actions the model decides to invoke, often with side effects. Resources are application-controlled, addressable read-only context (documents, records, schemas) the host attaches. Prompts are user-controlled, reusable templated workflows a user deliberately selects. The common mistake is turning read-only data or user workflows into tools, which bloats the tool surface and hurts selection accuracy.
Which MCP transport should an enterprise use, stdio or Streamable HTTP?
Use stdio for local servers the host launches as a subprocess — lowest latency, no network exposure, good for desktop and dev tooling. Use Streamable HTTP for centrally hosted, multi-tenant servers reached over the network; it is also the transport that participates in the OAuth authorization flow. A central shared service on stdio, or a purely local tool on HTTP, is a transport mismatch.
How do I evaluate retrieval quality in production rather than just offline?
Maintain a labeled set of question-to-passage pairs, sample real production queries, and score retrieval with metrics like recall@k and precision@k, keeping that measurement separate from answer-quality evaluation. Gate deploys on the retrieval metrics and monitor for drift as the corpus and query mix change. Log retrieved-chunk ids with each answer so a bad answer can be traced to whether retrieval or synthesis failed.
What telemetry does an agent run need to be debuggable and cost-attributable?
A per-run trace with a single correlation id spanning every step, and per step: inputs/outputs, token counts (input, output, and cache read/write), latency, and the structured tool result or error. That lets you attribute a cost spike or latency regression to a specific step, separate cache hits from misses on the cost dashboard, and see which tool failed and why — turning 'the agent got slow' into a specific, fixable finding.
Independent, unofficial study material. Not affiliated with, endorsed by, or authorized by Anthropic. Every example is original and written to teach the public exam objectives — no real exam questions are reproduced. Technical details reflect Claude, the Anthropic API, Claude Code, and MCP as of July 25, 2026; always confirm specifics against current official documentation.
Test yourself
Turn what you just read into answers you can check.