MCP.so
登录

FastAPI Hello World Application

@xxradar

关于 FastAPI Hello World Application

A test repository created using the GitHub MCP server

基本信息

分类

开发工具

运行时

python

传输方式

stdio

发布者

xxradar

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mcp-test-repo": {
      "command": "python",
      "args": [
        "-m",
        "venv",
        "venv"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is FastAPI Hello World Application?

It is a simple Hello World API built with FastAPI and MCP SSE support. It provides basic greeting endpoints and an endpoint for AI‑powered chat completions using OpenAI GPT‑4o.

How to use FastAPI Hello World Application?

Clone the repository, install dependencies, and set the OPENAI_API_KEY environment variable if using the OpenAI endpoint. Run locally with uvicorn main:app --reload or python main.py, or use Docker with docker build -t fastapi-hello-world . then docker run -p 8000:8000 -e OPENAI_API_KEY=your_key fastapi-hello-world. The MCP server can be connected via the MCP Inspector.

Key features of FastAPI Hello World Application

  • Root endpoint returning a Hello World message
  • Dynamic greeting endpoint with a name parameter
  • OpenAI GPT‑4o chat completion endpoint
  • Automatic Swagger UI and ReDoc documentation
  • Supports local and Docker deployment
  • MCP SSE support for integration

Use cases of FastAPI Hello World Application

  • Quick demonstration of a FastAPI‑based MCP server
  • Testing MCP SSE protocol with a simple API
  • Experimenting with OpenAI GPT‑4o via HTTP endpoint
  • Learning FastAPI with MCP integration

FAQ from FastAPI Hello World Application

What dependencies are required?

Python 3.7+, pip, and an OpenAI API key (only for the /openai endpoint). Docker is optional.

How do I run the application?

Locally with uvicorn main:app --reload or python main.py. Docker: build the image and run the container with port 8000 mapped and the OPENAI_API_KEY environment variable.

Where does the data live?

The application does not persist any data; it only returns responses generated by its own endpoints or the OpenAI API.

What transports and authentication are used?

The MCP server uses SSE as its transport. The OpenAI endpoint requires the OPENAI_API_KEY to be set as an environment variable; no other authentication is needed.

What are the known limits?

The /openai endpoint will fail if the OPENAI_API_KEY environment variable is not set. No other limitations are documented.

评论

开发工具 分类下的更多 MCP 服务器