manvkaur/azure-functions-templates-mcp-server
If you are the rightful owner of azure-functions-templates-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Azure Functions Templates MCP Server provides ready-to-use Azure Functions templates across multiple programming languages and trigger types, facilitating easy distribution and deployment.
Azure Functions Templates MCP Server
A Model Context Protocol (MCP) server that provides ready-to-use Azure Functions templates across 4 programming languages with 64+ templates covering all major Azure services and trigger types. Templates include complete project structures, configuration files, and follow modern programming patterns for rapid development and deployment.
Features
Multi-Language Support: C# (.NET Isolated), Java (Maven), Python (v2 Model), TypeScript (Node.js v4)
Complete Templates: Full project structure with dependencies, configuration, and best practices
Modern Patterns: Latest programming models and Azure Functions runtime features
Rich Categories: Web APIs, Storage, Database, Streaming, Messaging, AI/ML, Microservices, Analytics
Tool Integration: Built-in support for VS Code Copilot, MCP Inspector, and AI assistants
Packaged Distribution: Templates embedded with server for easy deployment and offline usage
Prerequisites
- Node.js 18+ (LTS recommended): Required for running the MCP server
- npm: Package manager (included with Node.js)
- MCP Client: Such as VS Code with Copilot, or MCP Inspector
- Git: For cloning the repository (if building from source)
Installation
Option 1: Install from npm (Recommended)
Install the published package globally:
npm install -g manvir-templates-mcp-server
Or install locally in your project:
npm install manvir-templates-mcp-server
Verify installation:
# Test global installation
manvir-templates-mcp-server --help
# Or test with npx
npx manvir-templates-mcp-server --help
Option 2: Build from source
# Clone and build from source
git clone https://github.com/manvkaur/azure-functions-templates-mcp-server.git
cd azure-functions-templates-mcp-server
npm install
npm run build
Quick Start
Run the server
If installed globally:
manvir-templates-mcp-server
If installed locally:
npx manvir-templates-mcp-server
From source build:
node dist/src/server.js
This starts a stdio MCP server waiting for an MCP client connection. The server uses stdio transport and never logs to stdout (reserved for MCP protocol messages). Errors go to stderr.
Test the server
npm run smoke
Runs a simple test that calls the MCP server tools with sample requests.
Use with MCP Inspector
The MCP Inspector is a debugging and testing tool for MCP servers. To test this server with MCP Inspector:
Option 1: Using the npm package (Recommended)
# If installed globally
npx @modelcontextprotocol/inspector manvir-templates-mcp-server
# If installed locally
npx @modelcontextprotocol/inspector npx manvir-templates-mcp-server
Option 2: Using built from source
# Start the inspector with your built server
npx @modelcontextprotocol/inspector node dist/src/server.js
Option 3: Install Inspector globally
# Install MCP Inspector globally
npm install -g @modelcontextprotocol/inspector
# Run with npm package
mcp-inspector manvir-templates-mcp-server
# Or run with source build
mcp-inspector node dist/src/server.js
The inspector will:
- Start your MCP server as a subprocess
- Open a web interface (usually at http://localhost:5173)
- Allow you to interactively test all available tools
Use with VS Code
You can use this MCP server with VS Code through GitHub Copilot or other MCP-compatible extensions. Here are several approaches:
Option 1: Using npm package (Recommended)
-
Install the package globally:
npm install -g manvir-templates-mcp-server -
Configure in VS Code mcp.json settings:
{ "servers": { "azure-functions-template-mcp-server": { "type": "stdio", "command": "manvir-templates-mcp-server" } }, "inputs": [] }
Option 2: Using local npm installation
-
Install the package locally in your project:
npm install manvir-templates-mcp-server -
Configure in VS Code mcp.json settings:
{ "servers": { "azure-functions-template-mcp-server": { "type": "stdio", "command": "npx", "args": ["manvir-templates-mcp-server"] } }, "inputs": [] }
Option 3: Using built from source
-
Build the project from source (see Installation section)
-
Configure in VS Code mcp.json settings:
{ "servers": { "azure-functions-template-mcp-server": { "type": "stdio", "command": "node", "args": ["D:\\path\\to\\azure-functions-templates-mcp-server\\dist\\src\\server.js"] } }, "inputs": [] }Replace
D:\\path\\to\\azure-functions-templates-mcp-serverwith the actual path to your cloned repository.
What it provides
Four comprehensive tools for Azure Functions template management:
get_azure_functions_templates: Retrieve complete Azure Functions templates with all project files, configuration, and documentationget_supported_languages: Get detailed information about all supported programming languages, their runtimes, and capabilitiesget_templates_by_language: Explore all available templates for a specific language with descriptions, categories, and use casesget_template_files: Get the complete file structure and content for a specific template
Supported languages and templates:
- C# (.NET Isolated Worker): 29 templates including HTTP, Blob, Timer, Service Bus, Cosmos DB, Durable Functions, Dapr integration, MySQL/SQL bindings, Kusto analytics, and MCP tool integration
- Java (Maven-based): 14 templates covering core triggers, bindings, and Durable Functions with annotation-based configuration
- Python (v2 Programming Model): 11 templates using modern decorator-based patterns including blob processing, database triggers, streaming, and AI/ML integrations
- TypeScript (Node.js v4): 10 templates with full type safety covering storage, database, streaming, and real-time communication scenarios
Each template includes:
- Complete function code with proper bindings and error handling
- Configuration files (host.json, local.settings.json, etc.)
- Project files (requirements.txt, package.json, .csproj, pom.xml, etc.)
- Language-specific patterns (decorators for Python, annotations for Java, isolated worker for C#)
- Best practices for each runtime and programming model
Template Categories:
- Web APIs: HTTP triggers for REST endpoints and webhooks
- Storage: Blob triggers/bindings, Queue processing
- Database: Cosmos DB, SQL Server, MySQL triggers and bindings
- Streaming: Event Hubs for real-time data processing
- Messaging: Service Bus, Event Grid, RabbitMQ integration
- Scheduling: Timer triggers with CRON expressions
- Durable Functions: Orchestrators, activities, entities for workflows
- Microservices: Dapr integration for distributed architectures
- AI/ML: Model Context Protocol (MCP) tool integration for AI assistants
- Real-time: SignalR for live updates and notifications
- Analytics: Kusto (Azure Data Explorer) for time-series analysis
Perfect for bootstrapping new Azure Functions projects, learning cross-language patterns, and rapid prototyping.
Recent Updates
Template Inventory Updated: Synchronized template lists with actual available templates
Language-Agnostic Descriptions: Removed language-specific implementation details from descriptions
Consistent Categories: Unified template categorization across all languages
Accurate Counts: Updated template counts (C#: 29, Java: 14, Python: 11, TypeScript: 10)
Clean Documentation: Improved descriptions for better tool compatibility (VS Code Copilot, MCP Inspector)
Modern Patterns: Reflects current Azure Functions programming models and best practices
Template Structure
This MCP server provides access to Azure Functions templates across multiple programming languages. Each language follows modern programming models and best practices:
Python Templates (v2 Programming Model)
HttpTrigger/
├── function_app.py # Main function code with @app decorators
├── host.json # Function host configuration
├── local.settings.json # Local development settings
└── requirements.txt # Python dependencies
TypeScript Templates (Node.js v4 Model)
HttpTrigger/
├── src/ # Source code directory
├── package.json # Node.js dependencies and scripts
├── package-lock.json # Locked dependency versions
├── tsconfig.json # TypeScript configuration
├── host.json # Function host configuration
└── local.settings.json # Local development settings
Java Templates (Maven-based)
HttpTrigger/
├── pom.xml # Maven configuration and dependencies
├── host.json # Function host configuration
├── local.settings.json # Local development settings
└── src/ # Java source code with annotations
└── main/
└── java/
C# Templates (.NET Isolated Worker)
HttpTrigger/
├── HttpTriggerCSharp.cs # Main function code (isolated worker)
└── .template.config/ # Template metadata for tooling
├── template.json # Template definition
└── vs-2017.3.host.json # Visual Studio configuration
Project scripts
npm run build: Compile TypeScript todist/npm start: Run compiled server (dist/src/server.js)npm run smoke: Test server with sample template requestnpm run dev: Run with ts-node (for quick iteration)npm run probe: Simple health check for the server
Directory structure
src/server.ts— MCP server implementationtemplates/— Azure Functions templates (packaged with server)dist/— Compiled JavaScript outputtools/smoke.mjs— Simple test client
Usage examples
Discovering Available Languages
Get supported languages:
Tool: get_supported_languages
Returns all supported languages with runtime details, programming models, and template counts.
Exploring Templates by Language
Get templates for a specific language:
Tool: get_templates_by_language
Language: python
Returns all Python templates with descriptions, categories, and use cases.
Getting Complete Templates
Get a complete template with all files:
Tool: get_azure_functions_templates
Language: python
Template: HttpTrigger
Returns all files in the template plus key configuration files.
Get a specific file from a template:
Tool: get_azure_functions_templates
Language: python
Template: HttpTrigger
FilePath: function_app.py
Returns just the function_app.py file content.
Getting Template Files (Alternative Method)
Get complete file structure for a template:
Tool: get_template_files
Language: csharp
Template: HttpTrigger
Returns all files with complete content and syntax highlighting.
Language-Specific Examples
Get a Java Maven configuration:
Tool: get_azure_functions_templates
Language: java
Template: HttpTrigger
FilePath: pom.xml
Get a C# template configuration:
Tool: get_azure_functions_templates
Language: csharp
Template: HttpTrigger
FilePath: .template.config/template.json
Get TypeScript project configuration:
Tool: get_azure_functions_templates
Language: typescript
Template: HttpTrigger
FilePath: package.json
Get Python requirements:
Tool: get_azure_functions_templates
Language: python
Template: HttpTrigger
FilePath: requirements.txt
Troubleshooting
Common Issues
Server Not Starting
- Problem: Command not found or server won't start
- Solution:
- Verify installation:
npm list -g manvir-templates-mcp-server - Reinstall if needed:
npm install -g manvir-templates-mcp-server - Check Node.js version:
node --version(requires 18+)
- Verify installation:
Tools Not Available in MCP Client
- Problem: MCP client doesn't show the Azure Functions tools
- Solution:
- Verify server configuration in your MCP client settings
- Check that paths in client config are absolute
- Ensure
npm run buildsucceeded if building from source - Test with MCP Inspector first:
npx @modelcontextprotocol/inspector manvir-templates-mcp-server
Template Retrieval Errors
- Problem: Error when requesting templates
- Solution:
- Verify language parameter is one of:
csharp,java,python,typescript - Check template name matches exactly (case-sensitive)
- Use
get_templates_by_languageto see valid template names
- Verify language parameter is one of:
Performance Issues
- Problem: Slow response times
- Solution:
- Templates are packaged with the server for fast access
- Use specific
filePathparameter to get individual files instead of entire templates - Consider using
get_template_filesfor complete template content
Debug Mode
Run the smoke test to verify functionality:
npm run smoke
Use MCP Inspector for interactive debugging:
npx @modelcontextprotocol/inspector manvir-templates-mcp-server
Support
- Issues: Report bugs at GitHub Issues
- Discussions: Ask questions in GitHub Discussions
- Documentation: Full documentation available in the repository
Development Notes
- Stdout Reserved: Never add
console.logstatements; stdout is reserved for MCP protocol messages - Error Handling: All errors go to stderr, tool errors use
isError: trueflag - Template Packaging: Templates are embedded in the package for offline usage
- Protocol Compliance: Server implements MCP specification correctly