DEV Community

xbill for Google Developer Experts

Posted on • Originally published at xbill999.Medium on

Local MCP Development with Python, Gemini CLI, and Azure Cloud Shell

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 Azure Cloud Shell.

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

Azure Cloud Shell

Azure Cloud Shell is a browser-based, authenticated terminal for managing Azure resources, accessible directly through the Azure portal, shell.azure.com, or the mobile app. It provides a preconfigured environment with Bash or PowerShell, eliminating local installation of tools. It runs on a temporary, secure, Linux-based host.

The full background information on the Cloud Shell is here:

https://azure.microsoft.com/en-us/get-started/azure-portal/cloud-shell

More information is available here:

Get started with Azure Cloud Shell

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.

Activating Azure CloudShell

The Azure CloudShell comes preinstalled on all Azure Accounts.

To access the shell — click the Terminal Icon in the upper right hand corner of the console:

Then activate the full shell:

Note- the disk space in the environment is limited to 5GB- but this is sufficient for Gemini CLI, Google Cloud Tools, and some customization.

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 Cloud Shell

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

william@Azure:~$ node --version
v25.8.1
william@Azure:~$ npm --version
11.11.0
william@Azure:~$
Enter fullscreen mode Exit fullscreen mode

Gemini CLI Installation

You can then download the Gemini CLI :

npm install -g @google/gemini-cli
Enter fullscreen mode Exit fullscreen mode

You will see the log messages:

william@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 48s

173 packages are looking for funding
  run `npm fund` for details
william@Azure:~$
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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/ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Enter fullscreen mode Exit fullscreen mode

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

~ $ export GOOGLE_CLOUD_PROJECT=comglitn
~ $
Enter fullscreen mode Exit fullscreen mode

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

Using Gemini CLI on Azure Cloud Shell

Once installed- Gemini CLI has direct access to the Cloud Shell environment:

Logged in with Google: xbill@glitnir.com /auth
Plan: Gemini Code Assist Standard

✦ Your Azure project information is as follows:

- Subscription Name: Azure subscription 1
   - Subscription ID: 3db3ce66-50b6-4d11-91ef-5950cf4039ed
   - Tenant ID: 40482c55-d00d-4c6d-8903-643d76a74b9c
   - Environment: AzureCloud
   - User: live.com#xbill@glitnir.com

Active Resource Groups:
   - cloud-shell-storage-eastus (eastus)
   - NetworkWatcherRG (eastus)
   - vm (eastus)

Project Metadata:
   - Repository: github.com/xbill9/gemini-cli-azure (https://github.com/xbill9/gemini-cli-azure)
   - Google Cloud Project ID: comglitn (from project_id.txt)
Enter fullscreen mode Exit fullscreen mode

and Azure operations can be performed directly from Gemini CLI:

> list azure vms using the az command                                                                                                                          
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
✦ I'll list your Azure Virtual Machines using the az command.

╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓ Shell az vm list -d -o table [current working directory /home/william] (List all Azure Virtual Machines in the current subscription with detailed in… │
│ │
│ Name ResourceGroup PowerState PublicIps Fqdns Location │
│ --------- --------------- -------------- ------------- ------- ---------- │
│ azure-new VM VM deallocated 20.124.121.35 eastus │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✦ You have one Azure Virtual Machine:

- Name: azure-new
   - Resource Group: VM
   - Power State: VM deallocated
   - Public IP: 20.124.121.35
   - Location: eastus
Enter fullscreen mode Exit fullscreen mode

Installing Google Cloud Tools

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

https://docs.cloud.google.com/sdk/docs/install-sdk
Enter fullscreen mode Exit fullscreen mode

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

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

To set the active account, run:
    $ gcloud config set account `ACCOUNT`

william@Azure:~$ gcloud config list
[compute]
region = us-west2
zone = us-west2-a
[core]
account = xbill@glitnir.com
disable_usage_reporting = False
project = comglitn

Your active configuration is: [default]
[environment: Development]
william@Azure:~$
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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

This is a multi linux git repo hosted at:

github.com/xbill9/gemini-cli-azure

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 installed.

## 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.
Enter fullscreen mode Exit fullscreen mode

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 is built with stdio transport. This server is validated with Gemini CLI in the local environment.

This 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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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 STDIO 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 connection over stdio will look similar to this:

if __name__ == " __main__":
    # Explicitly use stdio transport
    mcp.run(transport="stdio")
Enter fullscreen mode Exit fullscreen mode

Running the Python Code

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

cd ~/gemini-cli-azure/mcp-stdio-python-azurecli
Enter fullscreen mode Exit fullscreen mode

Run the release version on the local system:

william@Azure:~/gemini-cli-azure/mcp-stdio-python-azurecli$ make release
Enter fullscreen mode Exit fullscreen mode

You can validate the final result by checking the messages:

Successfully installed annotated-types-0.7.0 anyio-4.12.1 attrs-25.4.0 certifi-2026.2.25 cffi-2.0.0 click-8.3.1 cryptography-46.0.5 h11-0.16.0 httpcore-1.0.9 httpx-0.28.1 httpx-sse-0.4.3 idna-3.11 jsonschema-4.26.0 jsonschema-specifications-2025.9.1 mcp-1.26.0 pycparser-3.0 pydantic-2.12.5 pydantic-core-2.41.5 pydantic-settings-2.13.1 pyjwt-2.12.1 python-dotenv-1.2.2 python-json-logger-4.0.0 python-multipart-0.0.22 referencing-0.37.0 rpds-py-0.30.0 sse-starlette-3.3.2 starlette-0.52.1 typing-extensions-4.15.0 typing-inspection-0.4.2 uvicorn-0.41.0
Enter fullscreen mode Exit fullscreen mode

Gemini CLI settings.json

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

{
  "mcpServers": {
    "azurecli-stdio-python": {
      "command": "python",
      "args": [
        "$HOME/gemini-cli-azure/mcp-stdio-python-azurecli/main.py"
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Validation with Gemini CLI

Finally- Gemini CLI is restarted and the MCP connection over stdio to the Python Code is validated, The full Gemini CLI Session will start:

william@Azure:~/gemini-cli-azure/mcp-stdio-python-azurecli$ gemini

▝▜▄ Gemini CLI v0.33.1
    ▝▜▄
   ▗▟▀ Logged in with Google /auth
  ▝▀ Gemini Code Assist Standard /upgrade

? for shortcuts 
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 shift+tab to accept edits 2 GEMINI.md files | 1 MCP server
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

> /mcp list                                                                                                                                                                                  
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Configured MCP servers:

🟢 azurecli-stdio-python - Ready (1 tool)
  Tools:
  - mcp_azurecli-stdio-python_greet
Enter fullscreen mode Exit fullscreen mode

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

> greet Azure CLI                                                                                                                                                                            
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
✦ I will call the greet tool with "Azure CLI" as the parameter.

╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Action Required │
│ │
│ ? greet (azurecli-stdio-python MCP Server) {"param":"Azure CLI"} │
│ │
│ ... first 3 lines hidden (Ctrl+O to show) ... │
│ MCP Tool Details: │
│ (press Ctrl+O to expand MCP tool details) │
│ Allow execution of MCP tool "greet" from server "azurecli-stdio-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 call the greet tool with "Azure CLI" as the parameter.

╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓ greet (azurecli-stdio-python MCP Server) {"param":"Azure CLI"} │
│ │
│ Azure CLI │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Enter fullscreen mode Exit fullscreen mode

Extending the Python MCP Server with Gemini CLI

Now that the basic MCP functionality has been tested and verified with Gemini CLI- the Python server code can be extended with new MCP tools:

 > with @main.py add 2 new MCP tools - one that returns the current system time and the other returns information on the current                                                             
      system info like OS, memory, azure versions, etc include full azure environment information       

✦ I have successfully added the get_system_time and get_system_info tools to main.py and installed the psutil dependency.

  The new tools are:
   1. get_system_time: Returns the current system time in ISO format.
   2. get_system_info: Returns a JSON string containing the OS platform, memory usage (total, available, and percentage), and the Azure CLI version.
Enter fullscreen mode Exit fullscreen mode

Restart Gemini CLI and check for the new MCP tools:

william@Azure:~/gemini-cli-azure/mcp-stdio-python-azurecli$ gemini

  ▝▜▄ Gemini CLI v0.33.1
    ▝▜▄
   ▗▟▀ Logged in with Google /auth
  ▝▀ Gemini Code Assist Standard /upgrade

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
 > /mcp list                                                                                                                                                                                  
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Configured MCP servers:

🟢 azurecli-stdio-python - Ready (3 tools)
  Tools:
  - mcp_azurecli-stdio-python_get_system_info
  - mcp_azurecli-stdio-python_get_system_time
  - mcp_azurecli-stdio-python_greet

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
 > get_system_time                                                                                                                                                                            
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
✦ I will call the get_system_time tool to retrieve the current system time.

╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓ get_system_time (azurecli-stdio-python MCP Server) {} │
│ │
│ 2026-03-16T16:08:43.772771 │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✦ The current system time is 2026-03-16T16:08:43.772771.

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
 > get_system_info                                                                                                                                                                            
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
✦ I will call the get_system_info tool to retrieve the current system information.

╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓ get_system_info (azurecli-stdio-python MCP Server) {} │
│ │
│ { │
│ "os": "Linux-6.1.124.1-microsoft-standard-x86_64-with-glibc2.38", │
│ "memory": { │
│ "total": "3.52 GB", │
│ "available": "2.44 GB", │
│ "percent": "30.5%" │
│ }, │
│ "azure_cli": "azure-cli 2.82.0 *\n\ncore 2.82.0 *\ntelemetry 1.1.0\n\nExtensions:\nml │
│ 2.41.0\nssh 2.0.6\n\nDependencies:\nmsal 1.34.0b1\nazure-mgmt-resource 23.3.0\n\nPython location │
│ '/usr/bin/python3.12'\nConfig directory '/home/william/.azure'\nExtensions directory '/home/william/.azure/cliextensions'\nExtensions system directory │
│ '/usr/lib/python3.12/site-packages/azure-cli-extensions'\n\nPython (Linux) 3.12.9 (main, Feb 4 2026, 03:35:55) [GCC 13.2.0]\n\nLegal docs and information: │
│ aka.ms/AzureCliLegal\n\n\n" │
│ } │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✦ The system information is as follows:

   * OS: Linux-6.1.124.1-microsoft-standard-x86_64 (glibc 2.38)
   * Memory: 3.52 GB Total, 2.44 GB Available (30.5% used)
   * Azure CLI: 2.82.0
       * Core: 2.82.0
       * Telemetry: 1.1.0
       * Extensions: ml (2.41.0), ssh (2.0.6)
       * Python: 3.12.9 (located at /usr/bin/python3.12)

Enter fullscreen mode Exit fullscreen mode

The information from the MCP tool execution comes back into the current Gemini CLI context. You can use the information returned from the tools along with the underlying Gemini Models:

> can i play Cyberpunk 2077 on this machine

✦ I will search for the latest minimum system requirements for Cyberpunk 2077 to compare them with your system's specifications.

╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓ GoogleSearch Searching the web for: "Cyberpunk 2077 minimum system requirements 2026" │
│ │
│ Search results for "Cyberpunk 2077 minimum system requirements 2026" returned. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✦ Based on the system information gathered and the latest requirements for Cyberpunk 2077 (Update 2.0+), your current machine cannot run the game.

  Here is why:
   * Memory: You have 3.52 GB of available RAM, while the game requires a minimum of 12 GB.
   * OS/Environment: You are running Linux (WSL). While the game can run on Linux via compatibility layers, the virtualization overhead and severe lack of RAM make it impossible to launch.
   * Requirements: Cyberpunk 2077 now requires an SSD and a much more powerful GPU (GTX 1060 6GB minimum) than what is typically accessible in a 3.5GB virtualized environment.

  To play the game, you would need a hardware upgrade to at least 12GB of RAM (16GB recommended) and a dedicated graphics card.

                                                                                                                                                                              ? for shortcuts
Enter fullscreen mode Exit fullscreen mode

But you can still play Doom!

> can I play Classic Doom on this machine?

✦ Yes, you can absolutely play Classic Doom (1993) on this machine. Your system far exceeds its original requirements (a 486 processor and 4MB of RAM).

  Since you are in a headless Linux environment (Azure Linux 3.0), you have two main options:

   1. Terminal-based Play: You can use a source port like doom-ascii or A-Doom to play directly in your terminal using ASCII characters for graphics.
   2. Remote/GUI Play: If you set up X11 forwarding or use a VNC/RDP connection, you can run modern source ports like GZDoom or Chocolate Doom to enjoy the original graphics and sound.

  With 3.52 GB of RAM, your system could theoretically run over 800 instances of Classic Doom simultaneously!
Enter fullscreen mode Exit fullscreen mode

Summary

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

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

Gemini CLI was then used to extend the sample Python code with several MCP tools and use these tools inside the context for the underlying LLM.

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

Top comments (0)