loading…
Search for a command to run...
loading…
Educational example of an MCP server built with FastMCP, demonstrating how to expose tools, resources, and prompts for AI clients.
Educational example of an MCP server built with FastMCP, demonstrating how to expose tools, resources, and prompts for AI clients.
This repository provides an educational example of a Model Context Protocol (MCP) server implemented in Python using the FastMCP library. It demonstrates how to expose tools, resources, and prompts to AI clients, enabling seamless integration with applications like IDEs, chatbots, and agent frameworks.
Model Context Protocol (MCP) is an open protocol that standardizes how AI applications connect to external tools and data sources. MCP servers expose:
Learn more: modelcontextprotocol.io
FastMCP is a Python library for building MCP servers quickly and easily. It provides:
MCP uses a client-server architecture:
Servers declare their capabilities during initialization. Tools are listed and can be invoked by the client or model. FastMCP makes it easy to implement these features in Python.
pip install fastmcp
python mcp_server.py
See mcp_server.py for example code.
Note: This example is for educational purposes. Always review server code and tool definitions before connecting to any AI application.
Run in your terminal:
claude mcp add fastmcp-example-server -- npx