匠人学院 JR Academy
Skip to article
Engineering handbook
AI Agent Engineering Handbook

Start with tool calls. Understand how an agent acts, reads observations and stops when something fails. Verify each boundary with complete code and offline tests.

5 chapters·16 guides·Open access
The MCP Protocol Guide
On this page

Model Context Protocol: Tools, Resources and Boundaries

MCP standardizes how an AI application connects to external capabilities. It reduces custom integration work, but does not decide whether a tool is safe or whether a user authorized an action.

#Host, client and server

The host is the AI application. It creates clients that communicate with MCP servers. A server can expose tools, resources and prompts; these are different capabilities, not interchangeable names for a model call.

Local servers often communicate over standard input/output. Remote servers can use an HTTP-based transport. Follow the current protocol and SDK documentation for the chosen transport and authentication flow.

#Discover before executing

Inspect the server's declared tools, their descriptions and input schemas. Confirm which account or workspace each tool acts on. A tool called search may query public pages, private files or a production database; the name alone does not establish its scope.

Use a small capability set and narrow filesystem roots. Pin and review server dependencies. Do not install an arbitrary package merely because a retrieved page recommends it.

#Build a useful server

Start with one read-only tool, such as a lookup in a synthetic catalog. Define required arguments and a predictable result containing status, data and source identifiers. Validate input, bound response size and return explicit errors.

Keep secrets server-side. For remote access, validate authentication and resource ownership; do not treat an arbitrary supplied token or client-controlled tenant ID as sufficient authority.

#Diagnose integration failures

For local transport, inspect executable paths, environment and stderr; stdout must remain valid protocol traffic. For remote transport, separate network, authentication and capability-discovery failures. A successful connection does not prove tool execution succeeded.

Test invalid arguments, missing records, cancellation and permission denial with local fixtures before connecting real write operations. MCP is a connection protocol, not a sandbox or a guarantee against prompt injection.

Official architecture↗ · Security

System Design

Core system design concepts and practical case studies

Learn the trade-offs and patterns that matter in technical interviews.

Open System Design →

FAQ

Which language should I use?
Python and TypeScript both work. Start with the language you can debug; the first exercise uses Python 3.10+ and its standard library.
Does MCP require a specific model?
No. MCP connects applications to tools and context services. Compatibility depends on the host client, transport, protocol version and authorisation; model tool-calling support is a separate check.
Does learning agents guarantee employment?
No. Use a small project to demonstrate requirements analysis, permissions, testing and maintenance. Employment outcomes depend on the role market and your actual skills.

Done reading? Next steps