Home▸Free interview questions▸MCP interview questions
free · no sign-up · no loginMCP interview questions, answered
20 questions with short answers, picked from the Q&A in the AI Engineer course. Tap a question to see the answer.
What is MCP (Model Context Protocol)?
MCP is an open standard, introduced by Anthropic, for connecting AI apps to tools and data through one common interface. An MCP server offers tools, resources and prompts. Any MCP client, such as an assistant or an agent, can find and use them, so you build an integration once instead of once per app.
- Client: the AI app or agent
- Server: offers tools, resources, prompts
- Transport: stdio locally, HTTP remotely
- Security: least privilege, check every call
No question matches that search. Try a shorter word.
MCP interview questions
The full set, with labs and mock interviews, is in the AI Engineer course.
Tools, Function Calling & MCP
1What is function calling?
The model doesn't run the tool itself. It asks for a tool with some inputs. Your code runs the tool and sends back the result. Then the model writes the answer.
2What are structured outputs?
Structured outputs force the model to reply in a fixed JSON shape. Every field is there, with the right type, so your code can read it safely.
3What is MCP?
MCP (Model Context Protocol) is an open standard for connecting AI apps to tools and data. Each system is wrapped once as a server, and any MCP app can use it.
4What is the difference between JSON mode and schema-enforced outputs?
JSON mode only promises valid JSON, so fields can be missing or have the wrong type. Schema-enforced, or structured, outputs make the reply match your exact schema: every field, the right type, only allowed values. For anything your code reads, use the schema.
5How do you validate tool arguments?
Check every argument in code before running the tool: types, required fields, allowed values, ranges, and that this user is allowed to do it. If something is wrong, return a clear error so the model can correct itself and retry.
6What does the 'tool choice' setting control?
It decides whether the model may use tools: auto lets it decide, any forces it to call some tool, naming a tool forces that one, and none turns tools off. Forcing a tool is handy for structured extraction.
7What are the host, client and server in MCP?
The host is the AI app, like a chat app or a code editor. Inside it, an MCP client connects to each MCP server. The server wraps one system, like GitHub or a database, and offers its tools and data.
8How do you build an MCP server?
Pick an official SDK, like the Python or TypeScript one, define your tools with names, descriptions and input schemas, connect them to your system, and run the server over stdio or HTTP. Test it with an MCP client before sharing it.
9What is the difference between an MCP resource and a tool?
A tool is an action the model decides to call, like create_ticket. A resource is data the app can read and give to the model, like a file or a customer record. Tools do things; resources provide information.
10MCP vs A2A: competing or complementary?
They work together. MCP connects an agent to its tools and data. A2A lets agents talk to other agents and hand over tasks.
11What is 'code execution with MCP'?
Instead of loading every MCP tool into the context and passing every result through the model, the agent writes code that calls the tools as functions, and only the final result comes back. It saves a lot of tokens when there are many tools or large data in between.
12Structured outputs guarantee the shape. Do they guarantee the truth?
No. The JSON shape will be right, but the values can still be wrong. Always check amounts, dates and IDs against your real systems.
13How do parallel tool calls work?
The model asks for several tool calls at once. Your code runs them at the same time. The model then combines all the results into one answer. It saves time.
14What three things can an MCP server offer?
Tools: actions the model can call. Resources: data the app can read. Prompts: ready-made templates.
15Should tools mirror API endpoints or whole tasks?
Usually whole tasks. One tool like refund_order that does the checks inside is much easier for the model than five low-level API calls it must chain in the right order. Fewer, task-shaped tools mean fewer mistakes.
16How should a tool report errors?
With a short, clear message the model can act on: what went wrong and what to try, like 'Order not found. Order IDs look like ORD-1234.' Don't return raw stack traces, and never fail silently.
17What is the most important security rule for tool calling?
Who the user is and what they can do must come from your login system, never from what the model says. Otherwise someone could trick the model into acting as another user.
18How do you make tool calls safe for money-moving actions?
Give tools only the access they need, check limits on the server, ask a human to confirm risky steps, stop the same payment from running twice, and log everything.
19Tools keep getting called at the wrong time. Fix?
Give tools clear names. Write when to use each one and when not to. Use fewer tools. Test with real questions until the right tool is picked.
20Why is code execution such a powerful tool for agents?
With one tool the agent can do exact maths, clean and analyse data, use any library and draw charts, instead of needing a special tool for each job. It must run in a sandbox with no secrets and limits on time and network.
More free interview questions by topic
All 91 free questionsAgentic AIRAGLLMAI system designLLM evaluation and guardrailsFDE
Now test yourself
Play the free quiz, or try a mock interview where you answer out loud and get a score.