MCP.so
登录

MCP Server - FastAPI on Azure App Service

@learntocloud

关于 MCP Server - FastAPI on Azure App Service

暂无概览

基本信息

分类

开发工具

许可证

MIT license

运行时

python

传输方式

stdio

发布者

learntocloud

配置

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

{
  "mcpServers": {
    "mcp-server-learntocloud": {
      "command": "python",
      "args": [
        "manage_api_keys.py",
        "list"
      ]
    }
  }
}

工具

未检测到工具

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

概览

What is MCP Server - FastAPI on Azure App Service?

A Python implementation of the MCP (Model Context Protocol) server using FastAPI, deployed to Azure App Service. It provides multiplication, temperature conversion, and weather tools, requiring API key authentication.

How to use MCP Server - FastAPI on Azure App Service?

Register for an API key via the public /register endpoint, then include the key in the Authorization: Bearer sk_... header when calling tools at /mcp-server/mcp/. For local development, set the MCP_AUTH_TOKEN environment variable to bypass Azure Storage authentication.

Key features of MCP Server - FastAPI on Azure App Service

  • Multiplication, Celsius/Fahrenheit conversion, and US weather alerts/forecast tools
  • Public API key registration with rate limiting (5 keys per email per 24 hours)
  • Admin script (manage_api_keys.py) to list, activate, deactivate, and create keys
  • Deployment to Azure App Service via Azure Developer CLI (azd up)
  • Local development with fallback MCP_AUTH_TOKEN authentication
  • Rate limiting: 1000 API requests per hour per key

Use cases of MCP Server - FastAPI on Azure App Service

  • Integrating MCP-compatible AI agents with arithmetic and weather functions
  • CTF (Capture The Flag) solutions requiring quick setup of an MCP server
  • Automating infrastructure scripts (Terraform) that call MCP tools
  • Server administrators monitoring key usage and managing registrations
  • Local development and testing with MCP Inspector

FAQ from MCP Server - FastAPI on Azure App Service

How do I get an API key?

Send a POST request to the /register endpoint with your email, project name, and optional GitHub repo. The response includes an API key; save it securely.

What are the rate limits?

Registration: 5 API keys per email per 24 hours. API usage: 1000 requests per hour per key. Exceeding these returns a "Rate limit exceeded" error.

Why am I getting "Invalid authentication token"?

The API key may be incorrect, deactivated, or expired (if expiration is enabled). Verify the key and check the Authorization header format: Bearer sk_....

How can I manage API keys as an administrator?

Use the manage_api_keys.py script to list, view, activate, deactivate, create, or delete keys. It also provides registration statistics.

What authentication modes are supported?

Production: Azure Managed Identity with API keys stored in Azure Table Storage. Development (fallback): MCP_AUTH_TOKEN environment variable, accepting any key starting with sk_.

评论

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