Enables configuration management through environment variables, allowing customization of the MCP server's behavior
Provides the API backend for the MCP server, allowing HTTP-based interactions with the system's microservices
Supports Jupyter notebook execution within the MCP environment, allowing notebook-based workflows for AI applications
Protocolo de Contexto Modelo (MCP)
Descripción general
MCP es un marco modular para gestionar, ejecutar y supervisar contextos de modelos de IA, incluyendo indicaciones LLM, cuadernos Jupyter y scripts de Python. Ofrece un backend FastAPI y un frontend de panel Streamlit.
Características
- Registrar y administrar diferentes tipos de MCP (indicaciones LLM, cuadernos, scripts)
- Ejecute MCP y vea los resultados en una interfaz web
- Supervisar la salud y las estadísticas del servidor
- Extensible para nuevos tipos de MCP
Configuración
Prerrequisitos
- Python 3.9+
- (Recomendado) Crear y activar un entorno virtual
Instalar dependencias
Variables de entorno
- Establezca
MCP_API_KEY
para la autenticación de API (opcional, se proporcionan valores predeterminados) - Para LLM, configure
ANTHROPIC_API_KEY
si usa Claude
Iniciar el backend
Iniciar el frontend
Uso
- Acceda al panel de control en http://localhost:8501
- Cree, administre y pruebe MCP desde la interfaz de usuario
- Monitorea la salud y las estadísticas desde la barra lateral
Agregar nuevos MCP
- Implementar una nueva clase MCP en
mcp/core/
- Regístrelo en el backend
- Añadir soporte de UI en
mcp/ui/app.py
Ejecución de pruebas
Estructura del proyecto
mcp/api/
- Backend de FastAPImcp/ui/
- Interfaz de Streamlitmcp/core/
- Tipos y lógica de MCP principalestests/
- Conjunto de pruebas
Licencia
Instituto Tecnológico de Massachusetts (MIT)
Documentación de la API
Una vez que el servidor esté en funcionamiento, podrá acceder a:
- Documentación de la API: http://localhost:8000/docs
- Métricas de Prometheus: http://localhost:8000/metrics
- Comprobación de estado: http://localhost:8000/health
- Estadísticas: http://localhost:8000/stats
Seguridad
- Se requiere autenticación de clave API para todos los puntos finales
- La limitación de velocidad está habilitada de forma predeterminada
- CORS está configurado para permitir solo orígenes específicos
- Toda configuración sensible se gestiona a través de variables de entorno.
Escucha
El servidor incluye:
- Métricas de Prometheus para recuentos de solicitudes, latencias y ejecuciones del servidor
- Registro JSON estructurado
- Punto final de verificación de estado
- Punto final de estadísticas del servidor
Contribuyendo
- Bifurcar el repositorio
- Crear una rama de características
- Confirme sus cambios
- Empujar hacia la rama
- Crear una solicitud de extracción
Dependencias adicionales para la integración de Notebook y LLM
Este proyecto ahora requiere los siguientes paquetes de Python adicionales:
- pandas
- Numpy
- matplotlib
- fábrica de papel
- formato nb
- Jupyter
- antrópico
Instalar todas las dependencias con:
Uso del Notebook MCP para llamar a un LLM (Claude)
El cuaderno de ejemplo ( mcp/notebooks/example.ipynb
) demuestra:
- Análisis y representación gráfica de datos
- Llamada al Claude LLM a través del paquete
anthropic
de Python
Para utilizar la celda LLM, asegúrese de haber configurado ANTHROPIC_API_KEY
en su entorno o archivo .env
.
La celda del cuaderno para LLM se ve así:
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Un sistema modular para crear y orquestar aplicaciones de IA a través de microservicios, con interacciones LLM, ejecución de cuaderno Jupyter y capacidades de flujo de trabajo visual.
Related MCP Servers
- -securityFlicense-qualityEnables AI agent and task management using the CrewAI framework, allowing users to create and run agents and tasks in an automated workflow environment.Last updated -03JavaScript
- -securityAlicense-qualityA lightweight, modular API service that provides useful tools like weather, date/time, calculator, search, email, and task management through a RESTful interface, designed for integration with AI agents and automated workflows.Last updated -PythonMIT License
- -securityAlicense-qualityAn MCP server that enables AI agents to interact with Modal, allowing them to deploy apps and run functions in a serverless cloud environment.Last updated -PythonMIT License
- -securityFlicense-qualityA lightweight Python-based server designed to run, manage and create CrewAI workflows using the Model Context Protocol for communicating with LLMs and tools like Claude Desktop or Cursor IDE.Last updated -1Python