Model Context Protocol Concepts
This lesson explains MCP hosts, clients, servers and tools, the two transports, and how SQL MCP Server exposes databases safely.
Learning outcomes
After completing this lesson, you will be able to:
- Describe how MCP clients discover and call server tools.
- Distinguish between the stdio and streamable HTTP transports.
- Explain how SQL MCP Server differs from a generic SQL execution tool.
Clients, servers and tools
An MCP host, such as VS Code with GitHub Copilot, runs an MCP client for each configured MCP server. When a session starts, the client asks each server for its capabilities and its list of tools; each tool has a name, a description and a JSON schema for its inputs. During a conversation, the model decides to call a tool, the client sends the call to the server (after the user approves it), and the server returns the result, which goes back to the model. Servers can also expose resources and prompts, but tools are the main way agents act on data.
An MCP tool call
Transports
MCP messages use JSON-RPC over one of two transports, compared in the following table.
stdio or Streamable HTTP?
Database MCP servers and safety
A database MCP server decides what an agent can do. Some servers expose a generic tool that runs any SQL the model writes, which is flexible but risky because the model's SQL is non-deterministic and can be wrong or destructive. SQL MCP Server, part of Data API builder from version 1.7, takes a different approach: it intentionally does not run free-form SQL. It exposes only the tables, views and stored procedures listed in the DAB configuration through a fixed set of DML tools, and DAB's query builder generates the T-SQL deterministically under the configured role permissions, field restrictions and policies. Its tools are describe_entities, read_records, create_record, update_record, delete_record, execute_entity and aggregate_records, and stored procedures can be registered as named custom tools.
The following diagram contrasts a generic SQL tool with SQL MCP Server.

SQL MCP Server tools
Choosing a server design
A company wants a support agent to look up orders and create return requests in an Azure SQL database. Security requires that the agent can read only three views and call one procedure, and that it can never run arbitrary SQL. Which MCP approach meets the requirement?
Use SQL MCP Server in Data API builder with entities for the three views and the procedure only, permissions for the agent's role limited to read on the views and execute on the procedure, and the create, update and delete tools disabled. The agent can call only the generated tools, which never accept free-form SQL. A generic SQL-execution MCP server would let the model run any statement the login permits, so the restriction would depend entirely on database permissions and the model's behaviour.
Does SQL MCP Server let an agent run any SQL statement it writes?
Show answer
No. It exposes only configured entities through fixed DML tools and generates the T-SQL itself under DAB's permissions.
Exam Tips
Remember for the exam
- MCP: clients discover and call server tools described by JSON schemas.
- Local process: stdio; shared or hosted server: streamable HTTP.
- SQL MCP Server (DAB 2.0 and later) exposes configured entities only and does not run free-form SQL.
- Tool calls are approved by the user and governed by the server's permissions.