๐๐๐ถ๐น๐ฑ๐ถ๐ป๐ด ๐๐ป ๐ ๐๐ฃ ๐ฆ๐ฒ๐ฟ๐๐ฒ๐ฟ ๐ช๐ถ๐๐ต ๐ก๐ผ๐ฑ๐ฒ.๐ท๐
Stop building custom plugins for every AI tool. Use the Model Context Protocol (MCP).
MCP is an open standard. It connects AI hosts like Claude and ChatGPT to your data and actions.
The setup is simple. The AI host runs the client. Your app is the server. They communicate using JSON-RPC.
Your server provides three things:
- Tools: Actions the AI invokes.
- Resources: Read-only data the AI fetches.
- Prompts: Reusable message templates.
You build this with Node.js. Use the @modelcontextprotocol/sdk and Zod for schemas.
Pick your transport method:
- Stdio: Use this for local apps like Claude Desktop or Cursor. It is the simplest setup.
- Streamable HTTP: Use this for cloud apps like ChatGPT.
Follow these steps to start:
- Install @modelcontextprotocol/sdk and zod.
- Register your tools with clear descriptions.
- Define your resources with fixed URIs.
- Connect your server to the transport.
Keep these tips in mind:
- Use stderr for logs in stdio servers.
- Use HTTPS for remote servers.
- Validate all tool inputs to stay secure.
Source: https://dev.to/zsevic/building-an-mcp-server-with-nodejs-55b1 Optional learning community: https://t.me/GyaanSetuAi