Integrates with GitHub Copilot to provide AI agent capabilities, allowing users to interact with tools through Copilot Chat in agent mode, such as adding items to a todo list based on user prompts.
Provides the runtime environment for the MCP server, enabling serverless execution of various tools and services in Azure Container Apps.
Utilizes an in-memory SQLite database to store the state of tools and their interactions with the MCP server.
Used as the implementation language for the MCP server, allowing for type-safe development of MCP tools and services.
Getting Started with Remote MCP Servers using Azure Container Apps (Node.js/TypeScript)
This is a quick start guide that provides the basic building blocks to set up a remote Model Context Protocol (MCP) server using Azure Container Apps. The MCP server is built using Node.js and TypeScript, and it can be used to run various tools and services in a serverless environment.
Prerequisites
- Install VS Code
- Install GitHub Copilot and GitHub Copilot Chat extensions
- Install the Azure Developer CLI (azd)
Setup Instructions
You can run these commands from the VSCode Terminal
- Clone this repository
- Log in to your Azure account
- Provision and deploy the project (ensure you are in the folder of the cloned repo when running this command):
- Once the deployment is complete, you can access the MCP server using the URL provided in the output. The URL will look something like this:
- You can configure the MCP server in your local VS Code environment by adding the URL to the
mcp.json
file or manually adding it as described in the previous section:
Note
The URL for the MCP server will be different for each deployment. Make sure to update the URL in the mcp.json
file or in your MCP client configuration accordingly.
- If everything is configured correcly, you should see something like the below when prompting GitHub Copilot in Agent mode:
- If you were simply testing the deployment, you can remove and clean up all deployed resources by running the following command to avoid incurring any costs:
What is MCP?
The Model Context Protocol (MCP) is a protocol that allows different AI models and tools to communicate with each other. It provides a standardized way for models to share information and collaborate on tasks. The MCP server acts as a bridge between different models and tools, allowing them to work together seamlessly.
Below is the architecture diagram for a typical MCP server setup:
Important
(*) This guide implements only the SSE MCP server. The MCP host and clients are not provided. If you are looking for a complete solution, with a custom MCP host, client and both HTTP and SSE MCP servers please check out this other repository.
Other installation options
You have a few other options besides azd up locally for getting started with this template. The quickest way to get started is GitHub Codespaces, since it will setup all the tools for you, but you can also set it up locally.
GitHub Codespaces
You can run this template virtually by using GitHub Codespaces. The button will open a web-based VS Code instance in your browser:
- Open the template (this may take several minutes):
- Open a terminal window
- Continue with the deploying steps
Note
If you run the mcp server inside of GitHub Codespaces, make sure to change the port visibility to Public: Click on "PORTS" tabs → right-click on the opened port (3000 by default) → Port visibility → Public.
VS Code Dev Containers
A related option is VS Code Dev Containers, which will open the project in your local VS Code using the Dev Containers extension:
- Start Docker Desktop (install it if not already installed)
- Open the project:
- Open a terminal window
- Start the server
Local Environment
If you prefer to run the MCP server locally, you can do so by following these steps:
Prerequisites
You need to have the following tools installed on your local machine:
- Clone this repository:
- Open the project folder
- Install dependencies
- Start the server
Note
When the applications starts, the server will create an in-memory SQLite database. This database is used to store the state of the tools and their interactions with the MCP server.
Test your MCP server with desktop MCP Clients
Option 1 - Use the mcp.json file in VS Code
The quickest way to connect to the MCP server is the use the provided mcp.json configuration file to set up the MCP server in your VS Code environment. This configuration file contains the necessary settings for the MCP server, including the URL and transport type.
Once you have this file opened, you can click on the "start" inlined action button that will connect the MCP server and fetch the available tools.
Option 2 - Manually Adding MCP Server to VS Code
- Add MCP Server from command palette and add URL to your running Function app's SSE endpoint:
- Select HTTP (Server-Sent-Events) for the type of MCP server to add.
- Enter the URL to your running function app's SSE endpoint
- Enter the server ID. (This can be any name you want)
- Choose if you want to run this in your User settings (available to all apps for you) or to your Workspace settings (available to this app, only)
- In Copilot chat agent mode enter a prompt to trigger the tool, e.g., select some code and enter this prompt
- When prompted to run the tool, consent by clicking Continue,
- When you're done, press Ctrl+C in the terminal window to stop the func.exe host process, and List MCP Servers from command palette and stop the local server.
Option 3 - MCP Inspector
- In a new terminal window, install and run MCP Inspector
- CTRL click to load the MCP Inspector web app from the URL displayed by the app (e.g. http://0.0.0.0:5173/#resources)
- Set the transport type to SSE
- Set the URL to your running Function app's SSE endpoint and Connect:
- List Tools. Click on a tool and Run Tool.
Next Steps
- Learn more about related MCP efforts from Microsoft
This server cannot be installed
A Node.js-based remote Model Context Protocol (MCP) server that runs on Azure Container Apps, allowing different AI models and tools to communicate with each other in a serverless environment.
Related MCP Servers
- AsecurityAlicenseAqualityA powerful Model Context Protocol (MCP) server for Docker operations, enabling seamless container and compose stack management through Claude AI.Last updated -4160PythonMIT License
- -securityAlicense-qualityA Model Context Protocol (MCP) server that lets you seamlessly use OpenAI's models right from Claude.Last updated -12428JavaScriptMIT License
- -securityAlicense-qualityA minimal server/client application implementation utilizing the Model Context Protocol (MCP) and Azure OpenAI.Last updated -15PythonMIT License
- -securityAlicense-qualityNode.js server implementing Model Context Protocol (MCP) for filesystem operations, allowing AI systems to read, write, edit files and manage directories within specified allowed paths.Last updated -43,064JavaScriptMIT License