mariagorskikh
MCP Servermariagorskikhpublic

bakery

展示如何将模型上下文协议(MCP)集成到FastAPI应用中,用于检查面包店商品的可用性。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
-
License

About This Server

展示如何将模型上下文协议(MCP)集成到FastAPI应用中,用于检查面包店商品的可用性。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

Bakery API with MCP Support

This API demonstrates integrating Model Context Protocol (MCP) with a FastAPI application for a bakery availability checker.

Features

  • Checks if bakery items are available
  • Uses MCP Fetch server for API calls
  • Uses MCP Filesystem server for local file access
  • Provides fallback responses when MCP servers are unavailable

Deployment Options

Option 1: Direct Deployment (Render)

  1. Deploy to Render using the render.yaml configuration
  2. Ensure the build.sh script installs all required dependencies
  3. The API will run using the updated bakery_api_with_mcp.py file with proper MCP initialization

Option 2: Docker Deployment

  1. Build and run with Docker:

    docker build -t bakery-api .
    docker run -p 8000:8000 bakery-api
    
  2. Or use Docker Compose:

    docker-compose up
    

Troubleshooting MCP Server Issues

If you encounter MCP initialization errors:

  1. Check that MCP module paths in fastagent.config.yaml are correct
  2. Ensure you have the latest MCP package versions
  3. Try running in a local environment first to validate configuration
  4. Use the Docker approach for more consistent environment isolation

API Usage

  • GET /: Check API status
  • GET /check?item=bread: Check item availability (GET method)
  • POST /check: Check item availability with JSON request body:
    {
      "query": "Can I order a cake for Saturday?"
    }
    

Endpoints

  • GET / - Returns basic API info
  • POST /check - Checks if an item is available on a specific day

How to Use

Send a POST request to /check with a query string like:

"Can I order a croissant on Monday?"

The API will check:

  1. If the bakery is open on that day
  2. If the item is on the menu

Deployment

This API is deployed on Render.

Quick Start

1

Clone the repository

git clone https://github.com/mariagorskikh/bakery
2

Install dependencies

cd bakery
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownermariagorskikh
Repobakery
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation