MCP Orders Server MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/connect-abdullah/simple_orders_mcp
cd simple_orders_mcp

Then follow the repository README for any remaining dependency or build steps before continuing.

2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add simple-orders -- python "<FULL_PATH_TO_SIMPLE_ORDERS_MCP>/dist/index.js"

Replace <FULL_PATH_TO_SIMPLE_ORDERS_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

A practice project to learn how the Model Context Protocol works.

MCP Orders Server — Practice Project

A small practice project to learn how the Model Context Protocol (MCP) works. It exposes an in-memory “orders” API as MCP tools so an MCP client (e.g. Cursor) can create and list orders via the protocol.

What’s in this repo

  • app/ — Core domain: Pydantic models (Order, CreateOrderRequest) and service functions (create_order, list_orders) that keep orders in memory.
  • mcp_server/ — MCP server built with FastMCP: exposes two tools that call into app.
  • mcp.json — Example MCP config for Cursor (or copy into .cursor/mcp.json or ~/.cursor/mcp.json).

How MCP fits in

  1. MCP server = process that exposes tools (and optionally resources, prompts). Here it’s mcp_server/server.py, which runs over stdio and talks JSON-RPC.
  2. MCP client = app that discovers and calls those tools. Cursor is an MCP client; when you add this server in Cursor’s MCP settings, Cursor spawns the server and sends tool calls to it.
  3. Tools = named functions with typed arguments. This server exposes:
    • create_order_tool(product_id, quantity) — creates an order and returns it.
    • list_orders_tool() — returns all orders.

So “how MCP works” here: Cursor sends a tool call (e.g. create order with product_id 1, quantity 255) → MCP server receives it → server calls create_order → returns the new order as the tool result → Cursor shows it to you.

Setup

cd /path/to/MCP
python -m venv venv
source venv/bin/activate   # or `venv\Scripts\activate` on Windows
pip install -r requirements.txt

Run the MCP server locally (stdio)

From the project root:

python mcp_server/server.py

The server runs over stdio and waits for JSON-RPC messages. It will exit quickly if nothing is connected; that’s expected. To use it, run it via an MCP client (e.g. Cursor).

Use with Cursor

  1. Config — Cursor reads MCP config from:

    • Project: .cursor/mcp.json
    • User: ~/.cursor/mcp.json
  2. Example config (adjust paths if needed):

    {
      "mcpServers": {
        "orders-server": {
          "command": "/path/to/MCP/venv/bin/python",
          "args": ["mcp_server/server.py"],
          "cwd": "/path/to/MCP"
        }
      }
    }
    

    cwd must be the project root so the app package can be imported.

  3. Restart Cursor (or reload MCP) so it picks up the config and starts the server.

  4. In Cursor you can then call the create order and list orders tools (e.g. from the MCP / Composer tools UI).

Project layout

MCP/
├── app/
│   ├── schema.py      # Order, CreateOrderRequest (Pydantic)
│   ├── service.py     # create_order(), list_orders() — in-memory store
│   └── main.py        # optional FastAPI app (not required for MCP)
├── mcp_server/
│   └── server.py      # FastMCP server, create_order_tool, list_orders_tool
├── mcp.json           # example MCP config for Cursor
├── requirements.txt
└── README.md

Tech used

  • Python 3
  • MCP — Model Context Protocol SDK
  • FastMCP — from the MCP package, for defining tools and running the stdio server
  • Pydantic — request/response models

This repo is for learning: minimal persistence (in-memory only), no database, no auth — just enough to see how an MCP server exposes tools and how a client calls them.

Tools (2)

create_order_toolCreates a new order with a specified product ID and quantity.
list_orders_toolReturns a list of all currently stored orders.

Configuration

claude_desktop_config.json
{"mcpServers": {"orders-server": {"command": "/path/to/MCP/venv/bin/python", "args": ["mcp_server/server.py"], "cwd": "/path/to/MCP"}}}

Try it

Create a new order for product ID 101 with a quantity of 5.
List all the orders currently in the system.
Can you add an order for product 50 with a quantity of 10 and then show me the full list of orders?

Frequently Asked Questions

What are the key features of MCP Orders Server?

Exposes an in-memory orders API via MCP tools. Built using the FastMCP framework. Supports creating orders with product ID and quantity. Supports listing all stored orders. Demonstrates integration with MCP clients like Cursor.

What can I use MCP Orders Server for?

Learning how to implement an MCP server from scratch. Testing MCP client connectivity and tool discovery. Prototyping order management workflows in an AI-assisted development environment.

How do I install MCP Orders Server?

Install MCP Orders Server by running: python mcp_server/server.py

What MCP clients work with MCP Orders Server?

MCP Orders Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep MCP Orders Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare