The Problem MCP Solves
Every AI app used to need custom code to connect to every tool, such as files, databases or chat systems. MCP is an open protocol that gives AI apps one common way to talk to tools and data. Build a tool server once and many MCP-capable apps can use it.
The Parts
| Part | Role |
|---|---|
| Host | The AI app the user works in |
| Client | Part of the host that talks to one server |
| Server | A program that offers capabilities |
What a Server Can Offer
| Type | Meaning | Example |
|---|---|---|
| Tools | Actions the model can ask to run | create_ticket, run_query |
| Resources | Data the app can read | A file or a database record |
| Prompts | Reusable prompt templates | Summarize this document |
Messages use JSON-RPC. MCP supports local servers over standard input and output, and remote servers over HTTP.
Shape of a Tool Request
A tool call is a JSON-RPC request. This demo builds and reads one to show the structure. Check the specification for the exact current fields.
{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get_weather", "arguments": {"city": "Pune"}}} | {"jsonrpc": "2.0", "id": 1, "result": {"content": [{"type": "text", "text": "Sunny in Pune"}]}}
In practice you do not write this by hand. You use an official SDK, which handles messages and lets you write ordinary functions as tools.
Security Tips
- Install and run only servers you trust
- Give each server the least access it needs
- Treat tool output as untrusted data. It may contain hidden instructions
- Ask users to approve sensitive actions
- Keep secrets out of tool descriptions and logs
Practice
- Change the demo to add a second tool
- Read the introduction page of the official MCP documentation
- List the access a file-reading server really needs
Conclusion
MCP is a shared plug standard for AI tools. Use SDKs, follow the current spec and apply least privilege.

