SM

setuai/mcp-foundational

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

0 stars 6 forks 품질 71 트렌드 14

A tiny, self-contained project that teaches how MCP works, end to end, with .

개요

A tiny, self-contained project that teaches how MCP works, end to end, with . Meera runs the motor-claims desk at a general insurer. All day, agents and customers ask her team the same thing: "What's the status of my claim? Is it approved? How much will I get?" She wants an AI assistant that answers instantly. But the AI has whether claim CLM-4471 is approved — that lives only in the claims system. So she gives the AI a tool to look it up. That tool is the MCP server we build here. A claim's status is a fact the AI — it exists only in our records. So the AI has no choice but to call our tool. That is the real reason MCP exists: to connect a model to knowledge it could never have on its own. Keeping them separate is deliberate: the data (the ) is one file, the MCP wrapping (the ) is another. Follow these steps in order. Each one confirms the layer beneath it before adding the next — so if something breaks, you know exactly where. Run the plain lookup on its own first.

README

원문 README의 일부입니다. 원문 보기.

Claims Assistant — an MCP server

A tiny, self-contained project that teaches how MCP works, end to end, with no database, no API keys, and no internet.

The story

Meera runs the motor-claims desk at a general insurer. All day, agents and customers ask her team the same thing: “What’s the status of my claim? Is it approved? How much will I get?” She wants an AI assistant that answers instantly. But the AI has no idea whether claim CLM-4471 is approved — that lives only in the claims system. So she gives the AI a tool to look it up. That tool is the MCP server we build here.

Why this example works

A claim’s status is a fact the AI cannot guess — it exists only in our records. So the AI has no choice but to call our tool. That is the real reason MCP exists: to connect a model to knowledge it could never have on its own.

The two files (so far)

File What it is The lesson
claims_data.py A plain Python “claims system” + a lookup function. No MCP. An MCP tool is, at heart, just a function.
server.py The MCP server that exposes that function as a tool. MCP is the bridge that lets an AI call your function.

Keeping them separate is deliberate: the data (the concept) is one file, the MCP wrapping (the application) is another.


Project 1 : Claims Status MCP Server

Follow these steps in order. Each one confirms the layer beneath it before adding the next — so if something breaks, you know exactly where.

Step 1 — Install the MCP SDK

Python 3.10 or newer is required.

pip install "mcp[cli]"

Step 2 — Check the data works (no MCP yet)

Run the plain lookup on its own first. This proves the claims data is correct before we involve any AI.

python3 claims_data.py

You should see records printed for CLM-4471 (Approved), CLM-5522 (Under Review), CLM-6033 (Rejected), and CLM-9999 (not found). If this fails, it is a plain Python problem — fix it before touching MCP.

Step 3 — Test the server with the MCP Inspector

The Inspector is a small web tool that connects to your server exactly like a real AI app would — but shows you everything happening underneath. It IS a client (the same role VS Code or Claude Desktop plays), just without an AI model. Using it, you play the part of the AI: you pick the tool and type the input by hand.

Launch it

Run this from inside the project folder (where server.py lives):

npx @modelcontextprotocol/inspector python3 claims_server.py

⚠️ Do not use mcp dev server.py unless you have uv installed. On a plain pip setup, mcp dev tries to launch through uv and fails

GitHub에서 전체 README 보기

설치

npx @modelcontextprotocol/inspector python3 claims_server.py
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →