DEV Community

ASHDEEP SINGH
ASHDEEP SINGH

Posted on

MCP server

Hi
So this week was spent learning AI in which I learnt MCP server. So an MCP server is model context protocol. We can understand it easily using a below scenario.
Assume for a moment you're using an AI agent , which runs a logic using a tool you designed. Now you decide to use another AI agent, so you'll have to write the tool logic again. Introduce a new more AI agents / users and you'll see things going hay-wire. On top of it complexities are introduced if we need more tools.
Now you might have guessed , MCP is the answer to such a problem of having a shared common logic to be used accross various agents. A few benfits of MCP is :

  1. Separation of Logic & Model

Your tools (APIs, DB queries, logic) stay outside the AI model.

You can update tools without retraining or redeploying the AI.

  1. Standardized Communication

MCP gives a common protocol — any AI client (Cursor, OpenAI, Claude, etc.) can use your tools without code changes.

  1. Security Sandbox

The AI can only access what you explicitly expose via MCP tools — no accidental file or DB access.

  1. Reusability

One MCP server = reusable by many projects or AIs.
(e.g., same “weather” server used by GPT and Cursor)

  1. Scalability

You can deploy MCP servers as microservices and plug them into multiple AIs.

  1. Observability & Control

You can log, monitor, or throttle how AI uses each tool — full control over access.

  1. Future Compatibility

MCP is becoming the universal plugin standard for AI models (like HTTP for web).
Future IDEs, apps, and LLMs will support it natively.

Now have a look at the code : https://github.com/Ashdeep-Singh-97/MCP-server

The code is self explanatory , it exposes a logic as a tool which always returns a unified answer to the questioner. And with this we have come to an end of our AI journey.
This post officially marks the end of learning AI. In future we'll try to build more projects and see where things take us. Till then , take care eat healthy and enjoy life.
Peace....

Top comments (0)