On this page
Learning objectives
- Explain the MCP host, client, server, tool, resource, and prompt roles
- Decide when MCP is useful compared with a direct API integration
- Apply authentication, approval, and trust controls around servers
Prerequisites
Tool calling · Client-server and authentication basics
Answer first
Canonical definition
Model Context Protocol is an open protocol for connecting AI applications to external tools and context through a shared client-server interface.
Operating context
Why it matters
MCP can reduce repeated integration work across AI hosts, but it does not automatically authorize users, validate tool behavior, or make third-party servers trustworthy.
The host still owns the user experience, consent, tool exposure, and enforcement of local policy.
Method
Step by step
- 01
Choose the boundary
Use MCP when a capability should be reusable across compatible hosts; keep tightly coupled internal actions behind a direct service when that is simpler.
- 02
Publish narrow capabilities
Expose explicit tools and resources with clear schemas, descriptions, and failure responses.
- 03
Authenticate both sides
Verify server identity, bind user or service authorization, and avoid forwarding ambient credentials.
- 04
Review trust continuously
Inventory servers, pin or review changes, monitor calls, and remove capabilities that exceed the agent's mandate.
Hands-on lab
Build a read-only MCP server
Expose one internal knowledge lookup through a local server with no write capability.
Deliverable
A server manifest, typed tool or resource, auth decision, test client, and threat checklist.
What breaks
Common failure modes
- F1Assuming an MCP server is safe because it follows the protocol
- F2Exposing broad filesystem or network access to simplify development
- F3Installing servers without ownership, version review, or removal procedure
Beyond the demo
Production notes
- Treat every MCP server as a supply-chain and data-egress boundary.
- Keep an allowlist of servers and capabilities per environment, user role, and agent.
Further reading
Sources
Related Tenten resources