Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 20, 2025

The MCP Inspector was returning a 503 status code when connecting to the /sse endpoint after Azure deployment, preventing successful connections to the FastMCP server.

Root Cause

Azure App Service expects the requirements.txt file to be located in the project directory specified in azure.yaml. Since the configuration sets project: src, Azure looks for dependencies in src/requirements.txt, but the file only existed in the root directory. This caused dependency installation to fail during deployment, resulting in application startup failures and 503 errors.

The Azure logs showed:

ERROR - Container web-jfbakminbu2t4_0_907469a0 for site web-jfbakminbu2t4 has exited, failing site start
ERROR - Container web-jfbakminbu2t4_0_907469a0 didn't respond to HTTP pings on port: 8000. Failing site start.

Solution

Added src/requirements.txt (identical to the root requirements.txt) to ensure Azure App Service can properly install Python dependencies during deployment. This allows the FastMCP server to start successfully and the /sse endpoint to be accessible without returning 503 errors.

Testing

  • ✅ Verified the FastMCP application imports successfully locally
  • ✅ Confirmed the server starts correctly with src/requirements.txt present
  • ✅ Ensured minimal change (single file copy, no dependency modifications)

After this fix, the MCP Inspector should successfully connect to https://yourapp.azurewebsites.net/sse without encountering 503 errors.

Fixes #25.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…per dependency installation

Co-authored-by: MiguelElGallo <[email protected]>
@Copilot Copilot AI changed the title [WIP] MCP Inspector returns Non-200 status code (503) when connecting to /sse endpoint Fix MCP Inspector 503 error by adding src/requirements.txt for Azure deployment Aug 20, 2025
@Copilot Copilot AI requested a review from MiguelElGallo August 20, 2025 10:34
Copilot finished work on behalf of MiguelElGallo August 20, 2025 10:34
@MiguelElGallo MiguelElGallo marked this pull request as ready for review August 20, 2025 13:22
@Copilot Copilot AI review requested due to automatic review settings August 20, 2025 13:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a 503 error in the MCP Inspector by adding a src/requirements.txt file to ensure proper dependency installation during Azure deployment. The issue occurred because Azure App Service expected the requirements file in the src directory (as specified in azure.yaml with project: src), but it only existed in the root directory, causing deployment failures.

  • Added src/requirements.txt identical to the root requirements file
  • Ensures Azure App Service can properly install Python dependencies during deployment
  • Resolves 503 errors when connecting to the /sse endpoint after Azure deployment

@MiguelElGallo MiguelElGallo self-requested a review August 20, 2025 13:23
Copy link
Owner

@MiguelElGallo MiguelElGallo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good

@MiguelElGallo MiguelElGallo merged commit 7a580fc into main Aug 20, 2025
5 checks passed
@MiguelElGallo MiguelElGallo deleted the copilot/fix-25 branch August 20, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP Inspector returns Non-200 status code (503) when connecting to /sse endpoint

2 participants