MCP Demo
A simple demo MCP server using mcp[cli].
This project exposes a small MCP app with one tool and one resource:
add(a: int, b: int) -> int: returns the sum of two integers in a string response.get_greeting(name: str) -> str: returns a greeting for the provided name.
Requirements
- Python 3.14+
mcp[cli]>=1.28.1
Install
Create and activate a virtual environment, then install dependencies:
python -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
python -m pip install .
Run
Start the MCP server from the project root:
python main.py
Project structure
main.py– MCP app definition and endpoint implementations.pyproject.toml– package metadata and dependencies.README.md– project documentation.image/icon/user.png– icon asset used by the MCP app.
Notes
- The server is configured with
FastMCPand a demo icon. - The MCP app name is
mcp_demo. - Update
website_urlinmain.pyif you want a real website link.