Example web app mounting a model context protocol (MCP) server on a FastAPI server
Overview
What is fastapi-mcp?
fastapi-mcp is a simple example web application that demonstrates how to mount a Model Context Protocol (MCP) server on a FastAPI server.
How to use fastapi-mcp?
To use fastapi-mcp, you can either run it using Docker or set up a Python environment to run the client and server locally. For Docker, build the image and run it with the specified commands. For local setup, install the required packages and run the client script.
Key features of fastapi-mcp?
- Example implementation of a Model Context Protocol server.
- Integration with FastAPI for building web applications.
- Sample client demonstrating communication logic using the MCP client library.
Use cases of fastapi-mcp?
- Building web applications that require a model context protocol.
- Demonstrating how to integrate FastAPI with other protocols.
- Learning how to set up a server-client architecture using FastAPI and MCP.
FAQ from fastapi-mcp?
- Can I run fastapi-mcp without Docker?
Yes! You can set up a Python environment and run the server and client without Docker.
- What are the known issues?
The MCP server can only be mounted on the root '/'. Please refer to the GitHub issue for more details.