MCP Development with Python, Gemini CLI, and the Azure…
    Neura MarketNeura Market/DeepSeek
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityTrending
    DeepSeekBlogMCP Development with Python, Gemini CLI, and the Azure Linux VM
    Back to Blog
    MCP Development with Python, Gemini CLI, and the Azure Linux VM
    azure

    MCP Development with Python, Gemini CLI, and the Azure Linux VM

    xbill March 21, 2026
    0 views

    Leveraging Gemini CLI and the underlying Gemini LLM to build Model Context Protocol (MCP) AI...


    title: MCP Development with Python, Gemini CLI, and the Azure Linux VM published: true series: Azure date: 2026-03-19 13:37:56 UTC tags: azure,geminicli,azurelinux,mcpserver canonical_url: https://xbill999.medium.com/mcp-development-with-python-gemini-cli-and-the-azure-linux-vm-9966f187aa4c

    Leveraging Gemini CLI and the underlying Gemini LLM to build Model Context Protocol (MCP) AI applications with Python with a local development environment hosted on an Azure Linux VM.

    What is Gemini CLI?

    The Gemini CLI is an open-source, terminal-based AI agent from Google that allows developers to interact directly with Gemini models, such as Gemini 2.5 Pro, for coding, content creation, and workflow automation. It supports file operations, shell commands, and connects to external tools via the Model Context Protocol (MCP).

    The full details on Gemini CLI are available here:

    Build, debug & deploy with AI

    Configuring an Azure Linux VM

    Step by step instructions on configuring an Azure Linux VM are here:

    Customizing an Azure VM for Cross Cloud Development

    Why would I want Gemini CLI on 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.

    Node Version Management

    Gemini CLI needs a consistent, up to date version of Node. The nvm command can be used to get a standard Node environment:

    GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

    Verifying Node.js in Azure VM

    The version of Node.js is verified that it is recent enough to support Gemini CLI:

    azureuser@azure-new:~$ nvm --version
    0.40.3
    azureuser@azure-new:~$ node --version
    v25.8.1
    azureuser@azure-new:~$ npm --version
    11.11.0
    

    Gemini CLI Installation

    You can then download the Gemini CLI :

    npm install -g @google/gemini-cli
    

    You will see the log messages:

    azureuser@azure-new:~/gemini-cli-azure$ npm install -g @google/gemini-cli
    npm warn deprecated prebuild-install@7.1.3: No longer maintained. Please contact the author of the relevant native addon; alternatives are available.
    npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
    npm warn deprecated glob@10.5.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
    
    added 618 packages in 1m
    
    173 packages are looking for funding
      run `npm fund` for details
    

    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
    

    Authentication

    Several authentication options are available. To use an existing Code Assist licence — authenticate with a Google Account:

    > /auth                                                                                                                                                        
    ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
    ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
    │ │
    │ ? Get started │
    │ │
    │ How would you like to authenticate for this project? │
    │ │
    │ ● 1. Login with Google │
    │ 2. Use Gemini API Key │
    │ 3. Vertex AI │
    │ │
    │ (Use Enter to select) │
    │ │
    │ Terms of Services and Privacy Notice for Gemini CLI │
    │ │
    │ https://geminicli.com/docs/resources/tos-privacy/ │
    │ │
    ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
    

    Then set the GOOGLE_CLOUD_PROJECT to a valid project setup on the Google Cloud console:

    ~ $ export GOOGLE_CLOUD_PROJECT=comglitn
    ~ $
    

    Other options include Google Cloud API Key that can be generated directly from the Google Cloud Console.

    Installing Google Cloud Tools

    To simplify working with Google Cloud — install the Google Cloud Tools:

    https://docs.cloud.google.com/sdk/docs/install-sdk
    

    Once the installation is completed — you can verify the setup:

    william@Azure:~$ gcloud auth list
      Credentialed Accounts
    ACTIVE ACCOUNT
    * xbill@glitnir.com
    

    Installing Azure Customized GEMINI.md

    A sample GitHub repo contains tools for working with Gemini CLI on Azure. This repo is available here:

    git clone https://gitHub.com/xbill9/gemini-cli-azure
    

    A sample GEMINI.md customized for the Azure environment is provided in the repo:

    You are a cross platform developer working with 
    Microsoft Azure and Google Cloud
    
    You can use the Azure CLI :
    https://learn.microsoft.com/en-us/cli/azure/install-azure-cli
    https://learn.microsoft.com/en-us/cli/azure/
    https://learn.microsoft.com/en-us/cli/azure/reference
    
    https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?view=azure-cli-latest&pivots=apt
    
    ## Azure CLI Tools
    
    You can use the Azure CLI to manage resources across Azure Storage, Virtual Machines, and other services.
    
    - **List Resource Groups** : `az group list -o table`
    - **List Storage Accounts** : `az storage account list -o table`
    - **List Virtual Machines** : `az vm list -d -o table`
    
    ### Azure Update Script
    
    - `azure-update`: This script is specifically for Azure Linux environments. It updates all packages and ensures necessary libraries are instal
    led.
    
    ## Automation Scripts
    
    This repository contains scripts for updating various Linux environments and tools:
    
    - `linux-update`: Detects OS (Debian/Ubuntu/Azure Linux) and runs the corresponding update scripts.
    - `azure-update`: Updates Azure Linux packages and installs necessary dependencies.
    - `debian-update`: Updates Debian/Ubuntu packages and installs `git`.
    - `gemini-update`: Updates the `@google/gemini-cli` via npm and checks versions of Node.js and Gemini.
    - `nvm-update`: Installs NVM (Node Version Manager) and Node.js version 25.
    

    Python MCP Documentation

    The official GitHub Repo provides samples and documentation for getting started:

    GitHub - modelcontextprotocol/python-sdk: The official Python SDK for Model Context Protocol servers and clients

    The most common MCP Python deployment path uses the FASTMCP library:

    Welcome to FastMCP - FastMCP

    Where do I start?

    The strategy for starting MCP development is a incremental step by step approach.

    First, the basic development environment is setup with the required system variables, and a working Gemini CLI configuration.

    Then, a minimal Hello World Style Python MCP Server was built with stdio transport. This server was validated with Gemini CLI in the local environment.

    This current setup validates the connection from Gemini CLI to the local process via MCP. The MCP client (Gemini CLI) and the Python MCP server both run in the same local environment.

    Next- the basic MCP server is extended with Gemini CLI to add several new tools in standard Python code.

    Setup the Basic Environment

    At this point you should have a working Python interpreter and a working Gemini CLI installation. The next step is to clone the GitHub samples repository with support scripts:

    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:

    cd gemini-cli-azure
    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:

    cd gemini-cli-azure
    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.

    Hello World with HTTP Transport

    One of the key features that the standard MCP libraries provide is abstracting various transport methods.

    The high level MCP tool implementation is the same no matter what low level transport channel/method that the MCP Client uses to connect to a MCP Server.

    The simplest transport that the SDK supports is the stdio (stdio/stdout) transport — which connects a locally running process. Both the MCP client and MCP Server must be running in the same environment.

    The HTTP transport allows the MCP Client and Server to be in the same environment or distributed over the Internet.

    The connection over HTTP will look similar to this:

        mcp.run(
            transport="http",
            host="0.0.0.0",
            port=port,
        )
    

    Running the Python Code

    First- switch the directory with the Python MCP sample code:

    cd ~/gemini-cli-aws/mcp-https-python-azure
    make release
    

    You can validate the final result by checking the messages:

    
                                   ╭──────────────────────────────────────────────────────────────────────────────╮                               
                                   │ │                               
                                   │ │                               
                                   │ ▄▀▀ ▄▀█ █▀▀ ▀█▀ █▀▄▀█ █▀▀ █▀█ │                               
                                   │ █▀ █▀█ ▄▄█ █ █ ▀ █ █▄▄ █▀▀ │                               
                                   │ │                               
                                   │ │                               
                                   │ FastMCP 3.1.1 │                               
                                   │ https://gofastmcp.com │                               
                                   │ │                               
                                   │ 🖥 Server: hello-world-server, 3.1.1 │                               
                                   │ 🚀 Deploy free: https://fastmcp.cloud │                               
                                   │ │                               
                                   ╰──────────────────────────────────────────────────────────────────────────────╯                               
    
    [03/16/26 17:37:02] INFO Starting MCP server 'hello-world-server' with transport 'http' on http://0.0.0.0:8080/mcp transport.py:273
    INFO: Started server process [3700]
    INFO: Waiting for application startup.
    {"message": "StreamableHTTP session manager started"}
    INFO: Application startup complete.
    INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
    

    Gemini CLI settings.json

    The default Gemini CLI settings.json has an entry for the Python source:

     {
        "mcpServers": {
        "azure-https-python": {
          "httpUrl": "http://127.0.0.1:8080/mcp"
        }
      }
    }
    

    Validation with Gemini CLI

    Leaver the MCP server window running. Start a new shell. Gemini CLI is restarted and the MCP connection over HTTP to the Python Code is validated, The full Gemini CLI Session will start:

    azureuser@azure-new:~/gemini-cli-azure/mcp-https-python-azure$ gemini
    
    azureuser@azure-new:~/gemini-cli-azure/mcp-https-python-azure$ gemini
    
    ▝▜▄ Gemini CLI v0.33.1
        ▝▜▄
       ▗▟▀ Logged in with Google /auth
      ▝▀ Gemini Code Assist Standard /upgrade
    
    > /mcp list
    Configured MCP servers:
    
    🟢 azure-https-python - Ready (1 tool)
      Tools:
      - mcp_azure-https-python_greet
    
    ? for shortcuts 
    ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
     shift+tab to accept edits 3 GEMINI.md files | 1 MCP server
    ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
     >
    

    And you can then connect to the MCP Server over stdio:

    > greet Azure VM!
    
    ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
    │ Action Required 1 of 2 │
    │ │
    │ ? greet (azure-https-python MCP Server) {"param":"HTTPS transport!"} │
    │ │
    │ MCP Server: azure-https-python │
    │ Tool: greet │
    │ │
    │ MCP Tool Details: │
    │ (press Ctrl+O to expand MCP tool details) │
    │ Allow execution of MCP tool "greet" from server "azure-https-python"? │
    │ │
    │ 1. Allow once │
    │ 2. Allow tool for this session │
    │ 3. Allow all server tools for this session │
    │ ● 4. Allow tool for all future sessions │
    │ 5. No, suggest changes (esc) │
    │ │
    ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
    
    ✦ I will greet the HTTPS transport and the Azure VM HTTPS transport using the MCP tool.
    
    ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
    │ ✓ greet (azure-https-python MCP Server) {"param":"HTTPS transport!"} │
    │ │
    │ HTTPS transport! │
    │ │
    │ ✓ greet (azure-https-python MCP Server) {"param":"Azure VM HTTPS transport!"} │
    │ │
    │ Azure VM HTTPS transport! │
    ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
    ✦ I've sent the greetings for the HTTPS transport and the Azure VM HTTPS transport.
    

    Summary

    The strategy for using Python for MCP development with Gemini CLI was validated with a incremental step by step approach.

    A minimal HTTP transport MCP Server was started from Python source code and validated with Gemini CLI running as a MCP client in the same local environment.

    This approach can be extended to more complex deployments using other MCP transports and Cloud based options.

    Tags

    azuregeminiazurelinuxmcpserver

    Comments

    More Blog

    View all
    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught megemma

    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught me

    I ported the whole Gemma-4 family — E2B, E4B, 12B, 31B, and the 26B-A4B MoE — to run on...

    X
    xbill
    Hey DEV, I'm Tobore. Let's actually connect.community

    Hey DEV, I'm Tobore. Let's actually connect.

    Hey DEV, I'm Tobore. Let's actually connect. I've been on here for a while now, mostly writing and...

    L
    Laurina Ayarah
    I burned through thousands of AI tokens. Then a friend did it for freeai

    I burned through thousands of AI tokens. Then a friend did it for free

    (yep, kinda clickbait, just for the funsies 😊) At the beginning of the year, I relaunched my...

    P
    Paulo Henrique
    Claude might be saturating your machineai

    Claude might be saturating your machine

    My laptop was sitting idle with the fan at full tilt. Nothing was running that I knew of. The culprit...

    S
    Sidhant Panda
    Automated GitHub Code Reviews Using Google Geminigithubactions

    Automated GitHub Code Reviews Using Google Gemini

    I Built a Thing! TL;DR — Google Gemini-based Pull Request reviews and Issue Triaging for...

    D
    Darren "Dazbo" Lester
    What is an "agentic harness," actually?ai

    What is an "agentic harness," actually?

    I've been hearing the word "harness" thrown around a lot lately. I assumed it just meant "the IDE" or...

    T
    Tilde A. Thurium

    Stay up to date

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

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for DeepSeek 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.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions for your business.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this DeepSeek resource

    • Context-Aware Google Calendar Event Management with MCP Protocoln8n · $14.99 · Related topic
    • Build AI Agents with Think-Plan-Act Architecture Using Llama-4 Reasoningn8n · $24.99 · Related topic
    • Build Comprehensive Entity Profiles with GPT-4, Wikipedia & Vector DB for Contentn8n · $24.99 · Related topic
    • Process Multiple Media Files in Telegram with Gemini AI & PostgreSQL Databasen8n · $24.99 · Related topic
    Browse all workflows