Skip to content

This repository is a collection of sample projects and practice files demonstrating how to build Model Context Protocol servers using both the fastmcp and fastapi_mcp libraries.

Notifications You must be signed in to change notification settings

saadmdsabah/MCP-Servers-using-Python

Repository files navigation

FastMCP & FastAPI-MCP Examples

This repository is a collection of sample projects and practice files demonstrating how to build Model Context Protocol (MCP) servers using both the fastmcp (pure) and fastapi_mcp (FastAPI integration) libraries.

It includes examples for:

  • Wrapping a pure function (calculator.py)
  • Wrapping an external API (weather.py)
  • Parsing an RSS feed (GoogleFeedParser.py)
  • Auto-generating tools from a full FastAPI API (calculator-api.py)

🚀 Live Deployed Server: Google News Parser

The code from GoogleFeedParser.py (also organized in the MCP Deployment using FastMCP Cloud folder) is deployed as a live, public MCP server.

Quick Usage

1. Using Cursor.ai

Create an mcp.json file in your project's root:

     {
         "mcpServers": {
             "google-news-parse": {
                 "url": "https://google-news-parser.fastmcp.app/mcp"
             }
         }
     }

About

This repository is a collection of sample projects and practice files demonstrating how to build Model Context Protocol servers using both the fastmcp and fastapi_mcp libraries.

Topics

Resources

Stars

Watchers

Forks

Languages