{"repo":"sanbuphy/nanoMCP","free":true,"listed":false,"github":"https://github.com/sanbuphy/nanoMCP","clone":"git clone https://github.com/sanbuphy/nanoMCP.git","description":"If you can read ~200 lines of Python, you understand MCP.","language":"Python","stars":74,"topics":["agent","agentic","llm","mcp","toolcalling"],"license":null,"category":"mcp-servers","readme_excerpt":"nanoMCP 中文 English \"The question is not what you look at, but what you see.\" — Henry David Thoreau Minimal MCP (Model Context Protocol) demos in Python: - a tiny MCP server that exposes a few toy tools ( add , multiply , weather ) - MCP clients for stdio , SSE , and Streamable HTTP - an OpenAI function-calling loop that calls MCP tools - Tavily MCP integration examples (local stdio via npx , and remote Streamable HTTP via SSE) This repository is intentionally small and easy to read: each transport is a self-contained end-to-end example. If you forget what an “agent loop” is or how OpenAI function calling works, read: https://github.com/sanbuphy/nanoAgent Version v0.1.0 Docs There is also a docs/ folder with MCP reading notes and deeper implementation analyses: - docs/README.en.md - docs/README.md (Chinese) Install Environment variables These examples call an LLM via the OpenAI Python SDK. macOS/Linux: Windows (PowerShell): Tavily examples also require: Some scripts support StepFun-compatible env vars (as a fallback): - STEP API KEY (used when OPENAI API KEY is missing) - DEFAULT BASE URL (defaults to https://api.stepfun.com/v1 ) - DEFAULT MODEL (defaults to step-3.5-flash ) Quick start (local demo MCP server) If you're new to MCP, start with stdio/ first. It is the simplest transport and the easiest to debug: - Read stdio/mcp stdio server.py to see the minimal initialize / tools/list / tools/call implementation. - Then read stdio/mcp stdio client.py to see how the client spaw","default_branch":null,"files":null,"tree":[],"storefront":"/r/sanbuphy","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sanbuphy/nanoMCP/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}