Agentic MCP Microservices
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Agentic MCP MicroservicesGet customer profile for CUST-1001, list orders, and cancel order ORD-9002."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Enterprise BAU Services with MCP and Gemini
An executable proof of concept showing how an AI agent can work with existing Business-as-Usual (BAU) REST microservices through the Model Context Protocol (MCP).
The demonstration uses Google Gemini to discover MCP tools, retrieve customer and order information, and perform a controlled order-cancellation action. The BAU services remain independent REST APIs; MCP provides the integration boundary between those APIs and the agent.
Demonstration
The included scenario asks the agent to:
Retrieve the profile for
CUST-1001.List the customer's orders.
Identify the order in
Processingstatus.Cancel
ORD-9002with a supplied reason.Summarize the completed work.
The expected tool sequence is:
Gemini agent
-> MCP tool discovery over stdio
-> MCP server
-> Customer and Order REST APIs
-> Tool results returned to Gemini
-> Final user-facing summaryRelated MCP server: MCP API Tool Demo
Architecture
+------------------+ stdio +------------------+ HTTP +----------------------+
| Gemini agent | <----------------> | MCP server | <--------------> | Customer service |
| agent_runner.py | | server.py | | localhost:8001 |
+------------------+ +--------+---------+ +----------------------+
|
| HTTP
v
+----------------------+
| Order service |
| localhost:8002 |
+----------------------+MCP tools
Tool | Purpose |
| Retrieves customer profile, tier, status, and credit limit. |
| Lists orders associated with a customer. |
| Cancels an order when its status allows cancellation. |
Project structure
.
├── agent/
│ └── agent_runner.py # Gemini agent and MCP client
├── mcp_server/
│ └── server.py # MCP tools and REST integration
├── services/
│ ├── customer_service.py # Mock customer REST API
│ └── order_service.py # Mock order REST API
├── tests/
│ └── test_services.py # Service behavior tests
├── .env.example # Environment variable template
├── requirements.txt # Python dependencies
└── mcp_microservices_poc_blueprint.md
# Detailed design and implementation referencePrerequisites
Python 3.11 or newer
A Gemini API key from Google AI Studio
Windows PowerShell, macOS/Linux shell, or an equivalent terminal
Network access to the Gemini API when running the agent
This project does not require an Anthropic or OpenAI API key.
Quick start on Windows
Open PowerShell in the project directory:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
Copy-Item .env.example .envOpen .env and replace your_gemini_api_key_here with your key:
GOOGLE_API_KEY=your_gemini_api_key_here
GEMINI_MODEL=gemini-3.6-flashNever commit .env or place an API key in source code. The selected model must be available to your Gemini account.
Run the demonstration
Use three terminals. Activate .venv in each terminal.
Terminal 1: customer service
python services/customer_service.pyRuns at http://localhost:8001.
Terminal 2: order service
python services/order_service.pyRuns at http://localhost:8002.
Terminal 3: Gemini agent
python agent/agent_runner.pyThe agent starts the MCP server as a child process, discovers its tools, and executes the sample workflow.
Verify the local services
Run these commands while the two services are active:
Invoke-RestMethod http://localhost:8001/health
Invoke-RestMethod http://localhost:8002/health
Invoke-RestMethod http://localhost:8001/api/v1/customers/CUST-1001
Invoke-RestMethod http://localhost:8002/api/v1/orders/customer/CUST-1001Run the tests
With the virtual environment active:
python -m pytest -qThe tests cover case-insensitive customer lookup, missing customers, cancellation of a processing order, and protection against cancelling a shipped order.
Configuration
Variable | Description | Default |
| Gemini authentication key. | Required |
| Gemini model used by the agent. |
|
| Customer service base URL. |
|
| Order service base URL. |
|
Scope and limitations
This is a local, intentionally small POC intended to make the integration pattern easy to inspect and run.
Customer and order records are stored in memory and reset when services restart.
The services do not implement authentication or authorization.
The cancellation operation should be protected by approval and business policy controls in a real system.
MCP uses stdio for local process integration. A deployed architecture should use an authenticated network transport.
Downstream errors are returned as tool text for visibility; production systems should use structured errors, retries, tracing, and metrics.
The sample agent makes a real Gemini API request and requires a valid key.
Troubleshooting
GOOGLE_API_KEY is not set
Confirm that .env exists in the project directory and contains a valid key. Run the agent from the project directory.
404 NOT_FOUND for a Gemini model
Set GEMINI_MODEL in .env to a model enabled for your account. The default in this POC is gemini-3.6-flash.
MCP startup or tool discovery fails
Confirm that dependencies were installed into the active virtual environment:
python -m pip install -r requirements.txtThe project pins MCP to the 1.x API range because the server implementation uses FastMCP.
Connection errors from MCP tools
Confirm both REST services are running on ports 8001 and 8002. If a port is already in use, update the service port and the matching URL in .env.
Further reading
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI agents to interact with the commercetools Composable Commerce platform. It provides tools for managing products, categories, orders, carts, and customer data through secure read and write operations.13MIT
- FlicenseNot gradedqualityBmaintenanceDemo MCP server that exposes order and customer data as read-only tools for AI assistants, simulating a business API or internal data source.
- AlicenseNot gradedqualityCmaintenanceMCP server that bridges AI agents with external tools, APIs, databases, and services, enabling standardized tool execution and resource access.MIT
- FlicenseNot gradedqualityBmaintenanceMCP server that enables AI platforms to search products, customers, and warehouses, and prepare and submit sales orders to a fixed ERP endpoint with per-session bearer authentication.
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sganapa/agentic-mcp-microservices'
If you have feedback or need assistance with the MCP directory API, please join our Discord server