MCP system me 3 main components hote hain:
| Component | Responsibility | Examples |
|---|---|---|
| MCP Host | Wo AI application jo user se interact karti hai aur MCP connections ko initiate karti hai. | Claude Desktop, Cursor IDE, VS Code, AI Chatbots |
| MCP Client | MCP Host ke andar ka module jo MCP Server ke sath 1-to-1 connection maintain karta hai. | Internal client connection protocol |
| MCP Server | Ek lightweight application jo specific capabilities, data, ya tools expose karti hai. | GitHub MCP Server, Postgres MCP Server, Brave Search Server |
MCP Servers teen mukhya cheezein AI model ko provide karte hain:
- Resources: Read-only data sources jo context provide karte hain (e.g., local files, database records, API logs, system status).
- Tools: Actionable functions jo LLM execution ke waqt trigger kar sakta hai (e.g., “Create a Github Issue”, “Send an Email”, “Run SQL Query”).
- Prompts: Pre-defined templates ya workflows jo complex tasks ko repeatably trigger karte hain (e.g., code review workflow, database schema generator).
- Build: Aap Python ya TypeScript/Node.js SDK ka use karke ek custom MCP Server banate hain jo aapke private API ya database se connect hota hai.
- Connect: MCP Host (jaise Cursor ya Claude Desktop) ke configuration JSON file (
claude_desktop_config.json) me aap apne MCP Server ka path ya command register karte hain. - Deploy: STDIO (local) ya SSE (Server-Sent Events / Remote over HTTP) transport channel ke zariye MCP Client aur Server aapas me secure communication karte hain.