Azure MCP Server
Click on "Deploy 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., "@Azure MCP ServerWhat's the sales summary for customer 1?"
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.
Azure MCP Server
A complete sample showing how a Microsoft Foundry agent can call customer-data tools through a remote MCP server hosted in Azure Functions.
The same four MCP tools work with either backend:
USE_API=false: MCP tools query the included SQLite sample database directly.USE_API=true: MCP tools call a sample or production DB API over HTTP.
This makes the sample API replaceable later without changing the agent or MCP tool definitions.
Included components
MCP Streamable HTTP endpoint at
/mcpFour registered read-only tools:
get_customer,search_customers,list_orders, andget_sales_summarySample DB API under
/apiSQLite schema and deterministic sample data
Separate SQLite and HTTP API backend adapters
X-API-Keyprotection for MCP and DB API trafficAzure Functions Python v2 entry point
Parameterized Azure Function and Microsoft Foundry provisioning scripts
Foundry prompt-agent creation code with an authenticated MCP connection and tool allowlist
Automated database, API, registry, authentication, and MCP protocol tests
Standalone smoke-test script, so Postman and Node.js are not required
See docs/ARCHITECTURE.md for the component flow and docs/AZURE_DEPLOYMENT.md for deployment and agent connection steps.
Related MCP server: MCP API Tool Demo
Automated Azure plumbing
After signing into Azure, the included pipeline can create or reuse all required resources, deploy the MCP Function App, create the Foundry project and model deployment, register the MCP API-key connection, create the agent, and run the final agent test.
python -m pip install -r requirements-azure.txt
Copy-Item azure\config.psd1.example azure\config.psd1
# Edit azure\config.psd1 with globally unique resource names.
$env:MCP_API_KEY="<strong-random-MCP-secret>"
$env:DB_API_KEY="<strong-random-DB-API-secret>"
.\scripts\run_azure_pipeline.ps1 -ValidateOnly
.\scripts\run_azure_pipeline.ps1The actual run creates billable Azure resources. Review the configuration and validation output first. Secrets are never stored in the configuration file or repository.
Quick start on Windows
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements-dev.txt
python -m pytest -vStart the server in direct SQLite mode:
$env:MCP_API_KEY="temporary-test-key"
$env:USE_API="false"
python run.pyIn a second PowerShell window, verify MCP discovery and a real tool call:
python scripts\smoke_test.py --url http://127.0.0.1:8000/mcp --api-key temporary-test-keyExpected tool names:
get_customer, search_customers, list_orders, get_sales_summaryFull sample-API mode
This mode exercises the future production architecture locally:
$env:USE_API="true"
$env:DB_API_BASE_URL="http://127.0.0.1:8000"
$env:DB_API_KEY="temporary-db-api-key"
$env:MCP_API_KEY="temporary-test-key"
python run.pyThe request path is:
MCP client -> /mcp -> APIBackend -> /api -> SQLite -> MCP responseSample API contract
Method | Endpoint | Purpose |
|
| Service health |
|
| Get one customer |
|
| Search customers |
|
| List/filter orders |
|
| Customer sales summary |
To use a real DB API later, implement these response shapes, set USE_API=true, and change DB_API_BASE_URL and DB_API_KEY. No MCP or agent changes are required.
Sample records
Customer 1: Aarav Sharma, India, Gold
Customer 2: Emma Wilson, UK, Silver
Customer 3: Kenji Sato, Japan, Gold
Five orders across the three customers
The SQLite database is created and seeded automatically. It is sample data only and is not intended as persistent Azure storage.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
UN FAOSTAT global food & agriculture statistics over a local SQLite mirror, via MCP.
Tools to explore SumUp accounts, payments, customers, and payouts.
USAspending MCP — Federal spending data from USAspending.gov API
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceExposes sqlite3 database functionality as MCP tools, enabling SQL query execution, schema management, and CRUD operations.25 PyPI1MIT
- FlicenseNot gradedqualityDmaintenanceDemo MCP server that exposes order and customer data as read-only tools for AI assistants, simulating a business API or internal data source.-
- FlicenseNot gradedqualityCmaintenanceEnables safe, read-only analysis of an online store's SQLite database, providing schema introspection, restricted SELECT queries, and specialized analytics tools through MCP.-
- FlicenseNot gradedqualityBmaintenanceProvides MCP tools that let an agent retrieve customer account, product usage, interaction, and support summaries, and create follow-up tasks after user approval.-