Deploying a Rust MCP Server to Azure Functions — Stable…
    Neura MarketNeura Market/Stable Diffusion
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityStable DiffusionStable Diffusion
    DeepSeekDeepSeekCoPilotCoPilotMidjourneyMidjourney
    View All Directories
    OverviewPromptsBlogVideosGuidesCoursesCommunityModelsLoRAsComfyUI WorkflowsTrending
    Stable DiffusionBlogDeploying a Rust MCP Server to Azure Functions
    Back to Blog
    Deploying a Rust MCP Server to Azure Functions
    agents

    Deploying a Rust MCP Server to Azure Functions

    xbill May 15, 2026
    0 views

    The rmcp crate and standard Rust libraries are used to build a basic MCP Server in Rust. This MCP...


    title: Deploying a Rust MCP Server to Azure Functions published: true series: Azure-Rust date: 2026-05-15 13:01:46 UTC tags: aiagent,mcpserver,rust,azure canonical_url: https://xbill999.medium.com/deploying-a-rust-mcp-server-to-azure-functions-4e85ab1443ee

    The rmcp crate and standard Rust libraries are used to build a basic MCP Server in Rust. This MCP Server is then built and deployed to Azure Functions and validated locally with Gemini CLI.

    More MCP Demos?

    Yup. A2A- is next!

    Why not just use Python?

    Python has traditionally been the main coding language for ML and AI tools. One of the strengths of the MCP protocol is that the actual implementation details are independent of the development language. The reality is that not every project is coded in Python- and MCP allows you to use the latest AI appt roaches with other coding languages.

    What is this Tutorial Trying to Do?

    Building on previous tutorials, the goal is to extend a Rust MCP server with basic support for deployment to Azure.

    What is Rust?

    Rust is a high performance, memory safe, compiled language:

    Rust

    Rust provides memory safe operations beyond C/C++ and also can provide exceptional performance gains as it is compiled directly to native binaries.

    So Why Am I reading this?

    So what is different about this lab compared to all the others out there?

    This is one of the first deep dives into deploying a Rust based MCP server hosted on Azure. The Azure ACI service was targeted for compatibility with Docker Images.

    Rust Setup

    Instructions to install Rust are available here:

    Getting started

    For a Linux like environment the command looks like this:

    curl — proto ‘=https’ — tlsv1.2 -sSf https://sh.rustup.rs | sh
    

    Rust also depends on a working C compiler and OpenSSL setup. For a Debian 12 system — install the basic tools for development:

    sudo apt install build-essential
    sudo apt install libssl-dev
    sudo apt install pkg-config
    sudo apt-get install libudev-dev
    sudo apt install make
    sudo apt install git
    

    Gemini CLI

    If not pre-installed you can download the Gemini CLI to interact with the source files and provide real-time assistance:

    npm install -g @google/gemini-cli
    

    Testing the Gemini CLI Environment

    Once you have all the tools and the correct Node.js version in place- you can test the startup of Gemini CLI. You will need to authenticate with a Key or your Google Account:

    ▝▜▄ Gemini CLI v0.33.1
        ▝▜▄
       ▗▟▀ Logged in with Google /auth
      ▝▀ Gemini Code Assist Standard /upgrade no sandbox (see /docs) /model Auto (Gemini 3) | 239.8 MB
    

    Azure Functions

    Azure Functions is a serverless, event-driven compute service that allows developers to run code on-demand without managing infrastructure. It supports multiple languages (C#, Python, JavaScript, Java, PowerShell) and scales automatically, charging only when code executes. Key use cases include building APIs, processing data, and running scheduled tasks. [1, 2, 3, 4, 5]

    Key Aspects of Azure Functions

    • Serverless Architecture: You focus on code, while Azure handles infrastructure, patching, and scaling.
    • Event-Driven Triggers: Functions are triggered by events such as HTTP requests, timers, or data changes in Azure Storage/Cosmos DB.
    • Bindings: Connect to other services (e.g., queues, databases) with minimal code.
    • Durable Functions: Enable stateful, long-running workflows with features like chaining, fan-out, and checkpoints.

    More details are available here:

    https://azure.microsoft.com/en-us/products/functions

    Why would I want Gemini CLI with Azure? Isn’t that a Google Thing?

    Yes- Gemini CLI leverages the Google Cloud console and Gemini models but it is also open source and platform agnostic. Many applications are already cross-cloud so this enables familiar tools to be run natively on Microsoft Azure.

    Azure Functions Configuration

    To configure your Azure Service with the base system tools- this article provides a reference:

    MCP Development with Gemini CLI, Python, and Azure Functions

    Azure CLI

    The Azure Command-Line Interface (CLI) is a cross-platform tool used to connect to Azure and execute administrative commands on your cloud resources. [1, 2]

    It allows you to manage services like virtual machines, storage accounts, and networks through a terminal using either interactive prompts or automated scripts.

    More information is here:

    What is the Azure CLI?

    Setup the Basic Environment

    At this point you should have a working Rust environment and a working Gemini CLI installation. All of the relevant code examples and documentation is available in GitHub.

    The next step is to clone the GitHub repository to your local environment:

    cd ~
    git clone https://github.com/xbill9/gemini-cli-azure
    

    Then run init.sh from the cloned directory.

    The script will attempt to determine your shell environment and set the correct variables:

    source init.sh
    

    If your session times out or you need to re-authenticate- you can run the set_env.sh script to reset your environment variables:

    source set_env.sh
    

    Variables like PROJECT_ID need to be setup for use in the various build scripts- so the set_env script can be used to reset the environment if you time-out.

    Refresh the Azure credentials:

    xbill@penguin:~/gemini-cli-azure/mcp-functions-rust-azure$ az login
    

    Finally install the packages and dependencies:

    cd ~/gemini-cli-azure/mcp-functions-rust-azure
    

    Build The Rust MCP Server

    Some background information on building and configuring a Rust MCP server is here:

    Building a Secure HTTP Transport MCP Server with Rust, and Gemini CLI

    The mcp-aci-rust-azure subdirectory has the complete Rust MCP server in one subdirectory.

    Minimal System Information Tool Build

    The first step is to build the basic tool directly with Rust. This allows the tool to be debugged and tested locally before adding the MCP layer.

    First build the tool locally:

    xbill@penguin:~/gemini-cli-azure/mcp-functions-rust-azure$ make
    Building the Rust project...
        Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.46s
    xbill@penguin:~/gemini-cli-azure/mcp-functions-rust-azure$ 
    

    then lint check the code:

    xbill@penguin:~/gemini-cli-azure/mcp-functions-rust-azure$ make lint
    Linting code...
        Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.47s
    xbill@penguin:~/gemini-cli-azure/mcp-functions-rust-azure$
    

    and run local tests:

    xbill@penguin:~/gemini-cli-azure/mcp-functions-rust-azure$ make test
    Running tests...
        Finished `test` profile [unoptimized + debuginfo] target(s) in 0.15s
         Running unittests src/main.rs (target/debug/deps/mcp_functions_rust_azure-358fc0d2659d6bb6)
    
    running 1 test
    test tests::test_greeting ... ok
    
    test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
    

    The last step is to build the production version:

    xbill@penguin:~/gemini-cli-azure/mcp-functions-rust-azure$ make release
    Building Release...
        Finished `release` profile [optimized] target(s) in 0.55s
    

    The MCP server can be started locally:

    make start
    

    The MCP tool can then be tested locally:

    🟢 local-rust - Ready (1 tool)
      Tools:
      - mcp_local-rust_greeting
    
    > mcp_local-rust_greeting hello local
    
    Executing Greeting Tool: Executing the greeting tool on the local Rust MCP server.
    
    ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
    │ ✓ greeting (local-rust MCP Server) {"message":"hello local"} │
    │ │
    │ Hello World MCP! hello local │
    ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
      Greeting Completed: Greeting successful. Standing by for next instruction.
    
    ✦ Hello World MCP! hello local
    

    Deploy To Azure Functions

    A basic Dockerfile is used to build an image for deployment:

    xbill@penguin:~/gemini-cli-azure/mcp-functions-rust-azure$ make deploy
    Building the Docker image...
    [+] Building 2.2s (14/14) FINISHED docker:default
     => [internal] load build definition from Dockerfile 0.0s
     => => transferring dockerfile: 763B 0.0s 0.0s
    

    Get the deployment status:

    xbill@penguin:~/gemini-cli-azure/mcp-functions-rust-azure$ make status
    mcp-functions-rust-azure is not running locally.
    Checking Function App status for mcp-func-penguin...
    Name State HostNames
    ---------------- ------- ----------------------------------
    mcp-func-penguin Running mcp-func-penguin.azurewebsites.net
    xbill@penguin:~/gemini-cli-azure/mcp-functions-rust-azure$
    

    Get the Endpoint:

    xbill@penguin:~/gemini-cli-azure/mcp-functions-rust-azure$ make endpoint
    https://mcp-func-penguin.azurewebsites.net/api/mcp
    

    Check Gemini MCP settings:

    {
      "mcpServers": {
        "mcp-functions-rust-azure": {
          "httpUrl": "https://mcp-func-penguin.azurewebsites.net/api/mcp"
        },
        "local-rust": {
          "httpUrl": "http://127.0.0.1:8080/mcp"
        }
      }
    }
    

    The service will be visible on the Azure console:

    Final Test

    Start up Gemini CLI and check the MCP server status:

                                                                                                                                                      
     > mcp_mcp-functions-rust-azure_greeting Hello Azure Functions!
    
    ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
    │ ✓ greeting (mcp-functions-rust-azure MCP Server) {"message":"Hello Azure Functions!"} │
    │ │
    │ Hello World MCP! Hello Azure Functions! │
    ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
    
    ✦ Hello World MCP! Hello Azure Functions!
    

    Summary

    A complete HTTP transport MCP server was built using Rust. This application was tested locally with Gemini CLI. Then, the entire solution was deployed to Azure Functions. The remote MCP server was validated with Gemini CLI locally.

    Tags

    agentsmcpserverrustazure

    Comments

    More Blog

    View all
    Context bankruptcy: The case for strategic forgetting for AI Agentsai

    Context bankruptcy: The case for strategic forgetting for AI Agents

    Most of us have seen a coding agent fail to complete a task we know it can do. We just don't...

    J
    James O'Reilly
    Parallel Compliance Engine: Drive-to-Sheets Multi-Agent Orchestrationgooglecloud

    Parallel Compliance Engine: Drive-to-Sheets Multi-Agent Orchestration

    When building Generative AI applications, developers often encounter a massive bottleneck: sequential...

    A
    Aryan Irani
    Is It Ethical to Post and Ask About Circuits on Dev.to?discuss

    Is It Ethical to Post and Ask About Circuits on Dev.to?

    I’ve been thinking about sharing some electronic circuit posts on Dev.to — small circuits, DIY...

    C
    codebunny20
    The One-Click Exporter: AI Studio Antigravity, Probed to Its Limitsagents

    The One-Click Exporter: AI Studio Antigravity, Probed to Its Limits

    What nobody tells you about exporting your multi-agent prototype to a local workspace. Every...

    L
    leslysandra
    Guarding the till while autonomous data agents do the diggingagenticarchitect

    Guarding the till while autonomous data agents do the digging

    Autonomous agents are genuinely good at answering messy business questions. Give one an LLM and a set...

    S
    Sireesha Pulipati
    Return on Attention: Why AI Code Reviews Are Wearing Us Outai

    Return on Attention: Why AI Code Reviews Are Wearing Us Out

    PR volume went up, ticket quality didn't, and the gap got filled with LLMs on both sides of the review: bots reviewing, bots replying, bots occasionally arguing with bots about priorities that only existed in a teammate's head. Our CEO named the actual problem, and it's bigger than code review.

    C
    christine

    Stay up to date

    Get the latest Stable Diffusion prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Stable Diffusion and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this Stable Diffusion resource

    • Build MCP Server with Google Calendar & Custom Functionsn8n · $19.99 · Related topic
    • Automate RSS Feed Creation with Datetime Functions and Webhooksn8n · $10.35 · Related topic
    • Connect Retell Voice Agents to n8n Custom Functionsn8n · $14.99 · Related topic
    • Supabase Functions JS Client for n8n Automationsn8n · $12.99 · Related topic
    Browse all workflows