create-mcp-server

create-mcp-server

0

This project guides you in building a simple MCP calculator server to integrate with AI assistants like Claude for Desktop. It illustrates how to extend the functionality of an assistant using Model Context Protocol by enabling basic arithmetic operations through a custom server.

Create a Custom Server

Get started building your own server to use in Claude for Desktop and other clients.

In this tutorial, we'll build a simple MCP calculator server and connect it to a host, Claude for Desktop.

What is MCP?

MCP stands for Model Context Protocol — it’s a protocol that allows developers to extend AI assistants (like Claude) with custom tools and servers.

  • Think of it like giving your AI assistant extra powers.
  • These servers expose tools or functionalities that the assistant can use during a conversation.
  • For example: you can build weather servers, calculators, finance assistants, or anything you imagine.

What We'll Be Building

We'll build a server that exposes four tools: add, subtract, multiply, and divide. Then we'll connect the server to an MCP host (in this case, Claude for Desktop):

Note: Servers can connect to any client. We've chosen Claude for Desktop here for demonstration purposes.

Core MCP Concepts

MCP servers can provide three main types of capabilities:

  1. Resources: File-like data that can be read by clients (like API responses or file contents).
  2. Tools: Functions that can be called by the LLM (with user approval).
  3. Prompts: Pre-written templates that help users accomplish specific tasks.

This tutorial will primarily focus on tools.