MCP.so
ログイン

Getting Started with Remote MCP Servers using Azure Functions (Java)

@Azure-Samples

Getting Started with Remote MCP Servers using Azure Functions (Java) について

This is a quickstart template to easily build and deploy a custom remote MCP server to the cloud using Azure Functions with Java.

基本情報

カテゴリ

クラウドとインフラ

ライセンス

MIT license

ランタイム

java

トランスポート

stdio

公開者

Azure-Samples

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "remote-mcp-functions-java": {
      "command": "docker",
      "args": [
        "run",
        "-p",
        "10000:10000",
        "-p",
        "10001:10001",
        "-p",
        "10002:10002",
        "\\"
      ]
    }
  }
}

ツール

ツールは検出されませんでした

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is Getting Started with Remote MCP Servers using Azure Functions (Java)?

This quick-start shows how to build and deploy a remote MCP server using Azure Functions (Java). It includes sample tools (HelloWorld, SaveSnippets, GetSnippets) that persist data to Azure Blob Storage, and demonstrates secure deployment with system keys, optional OAuth, and VNet isolation. It is aimed at developers who want to host an MCP server in the cloud for use with AI copilots like GitHub Copilot.

How to use Getting Started with Remote MCP Servers using Azure Functions (Java)?

Install prerequisites (JDK 17+, Azure Functions Core Tools, Azure Developer CLI, Docker for Azurite). Run mvn clean package then mvn azure-functions:run to start the local SSE endpoint at http://127.0.0.1:7071/runtime/webhooks/mcp/sse. Deploy to Azure with azd up. Connect clients by setting the SSE URL with the system key mcp_extension as a header (x-functions-key).

Key features of Getting Started with Remote MCP Servers using Azure Functions (Java)

  • MCP server running on Azure Functions (Java)
  • Tools: HelloWorld, SaveSnippets, GetSnippets
  • Server-Sent Events (SSE) transport
  • Secure with system keys + HTTPS
  • Optional OAuth via EasyAuth or API Management
  • Optional VNet isolation
  • Deploy locally or to Azure with azd up

Use cases of Getting Started with Remote MCP Servers using Azure Functions (Java)

  • Hosting a remote MCP server for GitHub Copilot agent mode
  • Persisting user snippets in Azure Blob Storage across sessions
  • Securing MCP endpoints behind system keys and optional OAuth
  • Isolating MCP workloads inside a virtual network

FAQ from Getting Started with Remote MCP Servers using Azure Functions (Java)

What are the prerequisites to run this MCP server?

JDK 17+, Azure Functions Core Tools v4 (≥4.0.7030), Azure Developer CLI, and Docker (for Azurite blob emulator when running locally).

How do I secure the remote MCP server?

The server is secured by design with system keys and HTTPS. For additional OAuth support, use EasyAuth or API Management. VNet isolation can be enabled by setting VNET_ENABLED=true before provisioning.

How do clients connect to the remote server?

Clients use the SSE URL https://<FUNC_APP_NAME>.azurewebsites.net/runtime/webhooks/mcp/sse and pass the mcp_extension system key as the x-functions-key header. The same URL with a ?code= query parameter works for tools like MCP Inspector.

How do I redeploy or clean up the Azure resources?

Redeploy with azd up (safe to run repeatedly). Clean up all resources with azd down.

Where does the server store data?

The SaveSnippets and GetSnippets tools persist data in Azure Blob Storage (emulated locally via Azurite, using a real storage account in Azure).

コメント

「クラウドとインフラ」の他のコンテンツ