About FastMCP Functions
FastMCP Functions is an MCP server in the Cloud category: template para crear MCP basados en FastMCP sobre Azure Functions.
Install
git clone https://github.com/SebastianGodoy-CG/FastMCP-FunctionsThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about FastMCP Functions
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
FastMCP-Functions
Un servidor MCP (Model Context Protocol) implementado como Azure Functions para proporcionar herramientas personalizadas a sistemas de IA.
📋 Descripción
Este proyecto implementa un servidor MCP utilizando Azure Functions que permite a los sistemas de IA acceder a herramientas personalizadas a través de triggers genéricos. El servidor está configurado para manejar llamadas MCP mediante webhooks y runtime.
🛠️ Tecnologías
- Azure Functions - Plataforma serverless de Microsoft Azure
- Python 3.12 - Lenguaje de programación principal
- MCP (Model Context Protocol) - Protocolo para la comunicación con sistemas de IA
- JSON - Formato de intercambio de datos
📁 Estructura del Proyecto
FastMCP-Functions/
├── function_app.py # Función principal con triggers MCP
├── host.json # Configuración del host de Azure Functions
├── local.settings.json # Configuración local para desarrollo
├── requirements.txt # Dependencias de Python
└── README.md # Este archivo
🚀 Configuración y Deployment
Prerrequisitos
- Python 3.12 o superior
- Azure Functions Core Tools
- Una cuenta de Azure
- Visual Studio Code (recomendado)
Instalación Local
-
Clonar el repositorio:
git clone https://github.com/SebastianGodoy-CG/FastMCP-Functions.git cd FastMCP-Functions -
Crear un entorno virtual:
python -m venv .venv .venv\Scripts\activate # En Windows -
Instalar dependencias:
pip install -r requirements.txt -
Configurar variables de entorno:
- Edita
local.settings.jsonsegún tus necesidades - Para producción, configura las variables en Azure Portal
- Edita
Ejecutar Localmente
func host start
O usando la tarea de VS Code: func: host start
Deployment a Azure
-
Crear una Function App en Azure:
az functionapp create --resource-group <resource-group> --consumption-plan-location <location> --runtime python --runtime-version 3.12 --functions-version 4 --name <app-name> --storage-account <storage-account> -
Deployar el código:
func azure functionapp publish <app-name>
🔧 Configuración
host.json
El archivo host.json contiene la configuración del servidor MCP:
{
"version": "2.0",
"extensions": {
"mcp": {
"instructions": "Servidor MCP para ...",
"serverName": "name_mcp",
"serverVersion": "2.0.0",
"messageOptions": {
"useAbsoluteUriForEndpoint": false
}
}
}
}
local.settings.json
Configuración local para desarrollo:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "python"
}
}
📝 Uso
Estructura de Tools
El proyecto incluye una clase ToolProperty para definir las propiedades de las herramientas MCP:
class ToolProperty:
def __init__(self, property_name: str, property_type: str, description: str):
self.propertyName = property_name
self.propertyType = property_type
self.description = description
Ejemplo de Tool
tool_properties_name = [
ToolProperty("checkIn", "string", "Fecha de entrada en formato 'YYYY-MM-DD'."),
ToolProperty("checkOut", "string", "Fecha de salida en formato 'YYYY-MM-DD'."),
]
@app.generic_trigger(
arg_name="context",
type="mcpToolTrigger",
toolName="name_aca",
description="Descripcion completa del tool",
toolProperties=tool_properties_name_json,
)
def name_function(context) -> str:
return json.dumps({"message": "MCP template funcionando"})
Personalización
Para agregar nuevas herramientas:
- Define las propiedades usando
ToolProperty - Convierte las propiedades a JSON
- Crea una nueva función con el decorador
@app.generic_trigger - Implementa la lógica de tu herramienta
🔍 Testing
Para probar las funciones localmente:
- Inicia el servidor local:
func host start - La función estará disponible en:
http://localhost:7071/runtime/webhook/mpc?code=<system> - Realiza peticiones HTTP para probar el comportamiento
📚 Recursos Adicionales
- Documentación de Azure Functions
- Model Context Protocol (MCP)
- Azure Functions Python Developer Guide
🤝 Contribución
- Fork el proyecto
- Crea una rama para tu feature (
git checkout -b feature/AmazingFeature) - Commit tus cambios (
git commit -m 'Add some AmazingFeature') - Push a la rama (
git push origin feature/AmazingFeature) - Abre un Pull Request
📄 Licencia
Este proyecto está bajo la Licencia MIT. Ver el archivo LICENSE para más detalles.
👨💻 Autor
Sebastian Godoy - @SebastianGodoy-CG
⭐ ¡No olvides dar una estrella al proyecto si te fue útil!
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.