loading…
Search for a command to run...
loading…
A quickstart template for building and deploying secure, remote MCP servers to the cloud using Azure Functions and Node.js/TypeScript. It features integrated bl
A quickstart template for building and deploying secure, remote MCP servers to the cloud using Azure Functions and Node.js/TypeScript. It features integrated blob storage for snippet management and supports advanced security options like OAuth and VNET isolation.
4.0.7030npm install
This MCP server provides three tools for managing project contributions:
list_projects - Enumerate all projects with contribution counts and team member informationget_contributions - Filter and retrieve contributions by project name or team memberadd_contribution - Record a new contribution with project, member, summary, and optional attachmentsInstall dependencies (if not already done)
npm install
Build the project
npm run build
Start the Functions host locally:
func start
The local MCP endpoint will be available at: http://0.0.0.0:7071/runtime/webhooks/mcp
Note: In Azure, the endpoint includes authentication:
/runtime/webhooks/mcp?code=<system_key>
In a new terminal window, install and run MCP Inspector
npx @modelcontextprotocol/inspector node build/index.js
CTRL+Click the displayed URL (typically http://0.0.0.0:5173/#resources) to open MCP Inspector
Set the transport type to http
Set the URL to your local MCP endpoint:
http://0.0.0.0:7071/runtime/webhooks/mcp
Click Connect and then List Tools to see all available tools
Test each tool by clicking it and providing sample parameters:
project_name or author_nameMemberId, ProjectId, Summary, Description; Optional: AttachmentUrlWhen finished, press Ctrl+C in both terminal windows to stop the processes.
List all the projects we have
Show me all contributions from Marcus Thorne
Add a new contribution to the Sorsogon Community Innovation Labs project
Optionally, enable VNet for additional network isolation before deployment:
azd env set VNET_ENABLED true
Run these azd commands to provision Azure resources and deploy your code:
azd provision
Wait a few minutes for access permissions to take effect, then deploy:
azd deploy
This will:
Note API Management and App Service built-in authentication can be used for enhanced security and OAuth provider integration.
After azd deploy completes, you need the MCP system key to authenticate requests.
# Get your function app name from azd
FUNCTION_APP_NAME=$(azd env get-values | grep AZURE_FUNCTION_APP_NAME | cut -d'=' -f2)
RESOURCE_GROUP=$(azd env get-values | grep AZURE_RESOURCE_GROUP | cut -d'=' -f2)
# Retrieve the mcp_extension system key
MCP_KEY=$(az functionapp keys list \
--resource-group $RESOURCE_GROUP \
--name $FUNCTION_APP_NAME \
--query "systemKeys.mcp_extension" -o tsv)
echo "MCP Extension Key: $MCP_KEY"
azd env get-values)mcp_extension key from the System Keys sectionAfter deployment, your MCP server is accessible at:
https://<funcappname>.azurewebsites.net/runtime/webhooks/mcp?code=<your-mcp-extension-system-key>
Example with actual values:
https://mcp-scil-aegccgcze5bsdkez.azurewebsites.net/runtime/webhooks/mcp?code=X9kL2mN5pQ8rT3vW6xY1zA4bC7dE0fG9hI2jK5mL8nO1pR4sT7uV0wX3yZ6aB9cD==
Use the key in the URL:
https://<funcappname>.azurewebsites.net/runtime/webhooks/mcp?code=<your-mcp-extension-system-key>
https://<funcappname>.azurewebsites.net/runtime/webhooks/mcpx-functions-key: <your-mcp-extension-system-key>list_projects, get_contributions, and add_contribution toolsTo help your AI agent understand how to use the MCP tools effectively:
Create a new Agent in your project
In the Configuration panel, set:
A contribution tracking assistant that helps manage project contributions
across the Sorsogon Community Innovation Labs ecosystem. I can help you:
- List all available projects and see who's contributing
- Search for specific contributions by project or team member
- Record new contributions with details like summary, description, and attachments
Use me to track community engagement, project progress, and team member activities.
Enable the MCP tools in your agent's Tools configuration
Test the agent with your starter prompts
Set up in your mcp.json:
{
"inputs": [
{
"type": "promptString",
"id": "functions-mcp-extension-system-key",
"description": "Azure Functions MCP Extension System Key",
"password": true
},
{
"type": "promptString",
"id": "functionapp-name",
"description": "Azure Function App Name"
}
],
"servers": {
"remote-mcp-function": {
"type": "http",
"url": "https://${input:functionapp-name}.azurewebsites.net/runtime/webhooks/mcp",
"headers": {
"x-functions-key": "${input:functions-mcp-extension-system-key}"
}
}
}
}
After making changes to your MCP tools or handlers, rebuild and redeploy:
npm run build
azd deploy
Note: Your function app code is always updated with the latest deployment package. No manual file replacement needed.
When you're done working with your function app and related resources, you can use this command to delete the function app and its related resources from Azure and avoid incurring any further costs:
azd down
The MCP server is organized with Azure Functions' native decorator pattern:
src/
├── index.ts # Entry point - imports all tools
├── functions/
│ ├── data/
│ │ └── contributionData.ts # Shared mock data (projects, contributions, members)
│ └── tools/
│ ├── listProjectsTool.ts # list_projects MCP tool handler
│ ├── addContributionTool.ts # add_contribution MCP tool handler
│ └── getContributionsTool.ts# get_contributions MCP tool handler
azd env set VNET_ENABLED true for network isolationДобавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"remote-mcp-with-azure-functions": {
"command": "npx",
"args": []
}
}
}