Claude Developer Interview Questions for Beginners (with Answers)

📚 Exam guide v1.1 (exams from 7 Dec 2026)🔄 Checked against official sources: 24 Nov 2026⏱️ 9 min read🎯 Interview preparation · all domains

👋 In plain words: These are the questions interviewers ask when they want to know whether you understand the basics of building with Claude. Each answer is short and direct, the way you would say it in an interview, with code where it helps. Read a section, answer aloud without looking, then check.

Advertisement

Entry-level AI engineering and QA automation interviews now include Claude and MCP questions. This page collects 30 common beginner questions grouped by topic, from “what is the Messages API?” to “how do you keep an API key safe?”. Each answer gives the core point in two to five sentences, links to the lesson that teaches it, and avoids hype. Practise them step by step, one section a day.

📖 What You’ll Learn: You will be able to answer 30 common beginner interview questions on the Claude API, Python SDK, prompting, tools, MCP, Claude Code, RAG and security clearly and correctly.

🔑 Key terms

  • Interview answer: a short, direct explanation, ideally with one concrete example.
  • Follow-up: the next question an interviewer asks to check depth.

🧠 Claude and the API basics

Q1. What is the Claude Messages API?

The single HTTP endpoint (POST /v1/messages) for talking to Claude. You send a model ID, max_tokens and a list of messages; Claude returns content blocks plus stop_reason and usage. Tools, streaming, vision and structured outputs are all features of this one endpoint (Lesson 4).

Q2. Is the Claude API stateful?

No. Each request must include the conversation history you want Claude to see. Long conversations therefore cost more input tokens on every call (Lessons 4 and 19).

Q3. What are the main roles in a request?

user and assistant in messages, plus a separate top-level system prompt for the application’s instructions. The first message must be from the user (Lesson 6).

Q4. What does stop_reason tell you?

Why Claude stopped: end_turn (finished), max_tokens (cut off), stop_sequence, tool_use (waiting for a tool), pause_turn or refusal. Check it before trusting the text (Lesson 4).

Q5. What is a token, and why does it matter?

The unit the model reads and writes. Tokens decide whether a request fits the context window, how long the reply can be and what it costs. Count them with messages.count_tokens for the model you use (Lesson 5).

Q6. How do Opus, Sonnet and Haiku differ?

They are tiers of capability, speed and price: Opus is the most capable of the three, Sonnet balances quality and cost, Haiku is fastest and cheapest for simple high-volume tasks. Choose by measured quality against latency and cost constraints (Lesson 8).

Q7. What is adaptive thinking and effort?

Current models think before answering and decide how much to think. You control depth and token spend with output_config.effort (low to max); fixed budget_tokens is rejected on current models (Lessons 8 and 16).

Q8. Can you set temperature to 0 for consistent output?

Not on current models: sampling parameters are rejected, and API version 2026-10-21 rejects them on every model. Use precise criteria, examples and structured outputs instead (Lesson 7).

Advertisement

🐍 Python SDK

Q9. How do you make a basic call in Python?

📄 q9.py

import anthropic

client = anthropic.Anthropic()  # reads ANTHROPIC_API_KEY
r = client.messages.create(model="claude-opus-5-5", max_tokens=500,
                           messages=[{"role": "user", "content": "Hello"}])
print(next(b.text for b in r.content if b.type == "text"))

Loop over content blocks and check their type rather than assuming content[0] is text (Lesson 4).

Q10. How do you stream a response?

Use client.messages.stream(...), iterate text_stream, and call get_final_message() to get stop_reason and usage. Stream for long outputs to avoid timeouts (Lesson 9).

Q11. Which errors should you retry?

429 (except spend-cap errors), 500, 529 overloaded, timeouts and connection errors. Never retry 400, 401, 403 or 404. The SDK retries twice by default (Lesson 11).

Q12. How do you get JSON reliably?

Use structured outputs: client.messages.parse(..., output_format=MyPydanticModel) or output_config.format with a JSON schema. Still check stop_reason and business rules (Lesson 22).

Q13. When would you use the Message Batches API?

For large, non-urgent jobs: requests are processed asynchronously within 24 hours (usually under an hour) at 50% of the price. Match results by custom_id (Lesson 13).

✍️ Prompting

Q14. What makes a good system prompt?

A concrete role, the task, explicit rules with reasons, and the exact output format. Untrusted data stays out of the system prompt (Lessons 6 and 14).

Q15. What is few-shot prompting?

Including a few diverse examples of input and ideal output in the prompt. It helps most with borderline judgement and format; measure it on a golden set (Lesson 15).

Q16. Why use XML tags in prompts?

They separate data (logs, documents, reports) from instructions, and let you refer to sections by name. Put long documents first and the question last (Lesson 14).

Q17. What is prompt chaining?

Splitting a task into several calls where each output feeds the next, with your code controlling the order, for example extract rules → generate tests → review (Lesson 17).

🔧 Tools and MCP

Q18. How does tool use work?

You describe tools with names, descriptions and JSON schemas. Claude returns tool_use blocks; your code runs them and returns tool_result blocks (all results for a turn in one message), looping while stop_reason is tool_use (Lesson 23).

Q19. What should a tool return when it fails?

A tool_result with is_error: true and a clear message, ideally with an error code and a hint, so Claude can recover (Lesson 24).

Advertisement

Q20. What is MCP?

The Model Context Protocol, an open standard for connecting AI apps to tools and data. A server exposes tools, resources and prompts; hosts such as Claude Code connect to it through a client (Lesson 26).

Q21. What are MCP tools, resources and prompts?

Tools are model-invoked actions, resources are read-only data the app attaches, and prompts are user-selected templates (Lesson 26).

Q22. stdio or HTTP for an MCP server?

stdio for a local, single-user server started as a subprocess; Streamable HTTP for remote, shared servers that need authentication (Lessons 27–28).

💻 Claude Code

Q23. What is Claude Code?

Anthropic’s agentic coding tool for the terminal, IDEs, desktop, web and mobile. It reads code, runs commands and edits files under a permission model (Lesson 37).

Q24. What is CLAUDE.md?

A Markdown file of project instructions (commands, conventions) that Claude Code loads automatically. It exists at user, project and subfolder levels and can import other files with @path (Lesson 38).

Q25. How do you run Claude Code in CI?

Headless with claude -p "…", --output-format json, minimal --allowedTools, --max-turns and a pinned --model, with the key from CI secrets (Lesson 41).

📚 RAG, testing and security

Q26. What is RAG, and do you always need it?

Retrieval-augmented generation: search your documents and send only relevant passages. With large context windows, small stable document sets can often be sent whole with caching; large or fast-changing ones need retrieval (Lesson 21).

Q27. How do you reduce hallucinations?

Ground answers in supplied documents with citations, provide a “not found” answer, require tool use for facts, and test with unanswerable questions (Lesson 20).

Q28. How do you test code that calls Claude?

Unit-test your code with a mocked client (fast and offline), and evaluate model behaviour separately with a golden set and thresholds (Lessons 45 and 47).

Q29. What is prompt injection?

Instructions hidden in content the model reads (emails, pages, tickets) that try to take over its behaviour. Defend in layers: isolate data, give the fewest tools, and enforce risky-action checks in code (Lesson 49).

Q30. How do you keep an API key safe?

Only on the server (never in browser or mobile apps), in environment variables or a secrets manager, one key per application and environment, scanned for in Git, rotated, and revoked immediately if leaked (Lesson 51).

Advertisement

🛠️ Practise with code

This tiny quiz runner lets you drill the questions above at random. It runs locally:

📄 drill.py

import random

CARDS = {
    "Which stop_reason means Claude wants a tool?": "tool_use",
    "Default number of SDK retries?": "2",
    "Batch API discount?": "50%",
    "MCP primitive chosen by the model?": "tools",
    "Header used to send an MCP access token?": "Authorization: Bearer",
}
random.seed(7)
for q in random.sample(list(CARDS), 3):
    print(f"Q: {q}\n   A: {CARDS[q]}")

⌨️ Terminal

python drill.py

🖥️ Output

Q: Batch API discount?
   A: 50%
Q: Default number of SDK retries?
   A: 2
Q: MCP primitive chosen by the model?
   A: tools

🧪 Practice Questions

Question 1. An interviewer asks why your chatbot “forgot” what the user said two messages ago. What is the most likely answer?

  • A. The API is stateless and the code did not send the earlier messages again
  • B. Claude has a two-message memory limit
  • C. The temperature was too high
  • D. Streaming was enabled
Show answer

Answer: A. Each request must include the history you want Claude to see.

Question 2. Which answer best describes MCP to an interviewer?

  • A. A Claude-only plugin format
  • B. An open protocol for connecting AI applications to tools and data through servers
  • C. A database for prompts
  • D. A model fine-tuning method
Show answer

Answer: B. MCP standardises how hosts connect to tools, resources and prompts.

Question 3. Which two answers about API errors are correct? (Choose 2.)

  • A. Retry 429 and 529 with backoff
  • B. Retry 401 until it succeeds
  • C. Do not retry 400 invalid_request_error
  • D. Retry max_tokens cut-offs
Show answer

Answer: A and C. Transient capacity errors are retryable; request and auth errors and deterministic cut-offs are not.

Question 4. How should you get guaranteed JSON from Claude in Python?

  • A. Prefill the assistant turn with {
  • B. Use messages.parse with a Pydantic model (structured outputs)
  • C. Ask politely for JSON only
  • D. Set temperature to 0
Show answer

Answer: B. Structured outputs constrain the reply to your schema; prefill is rejected on current models.

📝 Assignment

  1. Task 1: Answer all 30 questions aloud without looking, and mark the ones you struggled with.
    ✅ Done when: you have a list of weak questions.
  2. Task 2: For each weak question, re-read the linked lesson and write your own two-sentence answer.
    ✅ Done when: you can answer each without notes.
  3. Stretch: Add 10 cards to drill.py from your weak list and run it daily for a week.
    ✅ Done when: you get all cards right three days in a row.
Advertisement

❓ Frequently Asked Questions

🤔 What Claude questions are asked in AI engineer interviews?

Typically: the Messages API and stop reasons, the Python SDK, streaming, errors and retries, structured outputs, prompting, tool use, MCP, Claude Code, RAG, testing and security.

🤔 How should I prepare for a Claude developer interview?

Build small projects (a tool-using agent, an MCP server, an eval), practise explaining them, and drill the questions on this page and the experienced-level page.

🤔 Do interviewers ask for code?

Often. Be ready to write a basic API call, a tool loop and a structured-output parse in Python.

🤔 Are these official exam questions?

No. They are original interview-style questions based on public documentation and this course.

🏁 Summary

  • Know the Messages API basics: stateless, roles, stop reasons, tokens, models, effort.
  • Know the Python SDK patterns: calls, streaming, retries, structured outputs, batches.
  • Explain prompting, tool use and MCP in one or two clear sentences each.
  • Cover Claude Code, RAG, testing and security with concrete practices.
  • Practise aloud and fix weak answers with the linked lessons.
📝 Test yourself: CCDV-F Mock Exam 1 (70 questions, 120 minutes), or browse all CCDV-F mock tests (3 full 70-question exams and 8 domain practice tests, with explanations).

Next, continue with Claude Developer Interview Questions for Experienced Engineers (Scenarios).

🎬 Prefer video? Watch QA, automation and AI testing tutorials on the SQA Tools YouTube channel.

Independent study material by SQA Tools. Not affiliated with, endorsed by or sponsored by Anthropic. Claude is a trademark of Anthropic. Practice questions are original, not real exam content. Code outputs marked “sample run” come from running the exact code against a local stand-in for the Claude API, so real replies, IDs and token counts will differ. Exam facts checked against Anthropic’s official CCDV-F exam guide v1.1 on 24 Nov 2026.