By Deepak Singh — CodeWithDks
MCP means Model Context Protocol. You can think of it like a "USB port" for AI models.
Normally, an AI model (like Claude) can only chat with you. It cannot check your files, cannot add data in your database, cannot call any API on its own. MCP solves this problem.
MCP is a protocol (a set of rules) which allows an AI app (called Host/Client, for example Claude Desktop) to talk to a small program (called MCP Server) which you build yourself. This server exposes some tools, resources, or prompts which the AI can use.
Simple example: Suppose you build an Expense Tracker MCP server. Now inside Claude Desktop, you can simply type:
"Add ₹500 expense for food today"
And Claude will call your MCP server's add_expense tool, and it will save the data in your database. This is real work happening, not just chatting — Claude is actually using your code to do the task.
There are 3 main parts, please understand this clearly:
| Part | What it means |
|---|---|
| Host | The AI application, for example Claude Desktop, Claude Code, Cursor |
| Client | This is present inside the Host itself, and it talks to the Server using MCP protocol |
| Server | Your own code — where tools, resources, and prompts are defined |
So the flow looks like this:
User (you) → Host (Claude Desktop) → Client (built-in) → Server (your MCP server) → Response comes back
add_expense, get_total). Through this, the AI can take an "action".