Skip to main content
Glama

Microservice Control Panel (MCP)

by Chunkys0up7
Integrations
  • 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

模型上下文协议(MCP)

概述

MCP 是一个模块化框架,用于管理、执行和监控 AI 模型上下文,包括 LLM 提示、Jupyter Notebook 和 Python 脚本。它提供了一个 FastAPI 后端和一个 Streamlit 仪表板前端。

特征

  • 注册和管理不同类型的 MCP(LLM 提示、笔记本、脚本)
  • 执行 MCP 并在 Web UI 中查看结果
  • 监控服务器健康和统计数据
  • 可扩展至新的 MCP 类型

设置

先决条件

  • Python 3.9+
  • (推荐)创建并激活虚拟环境

安装依赖项

pip install -r requirements.txt

环境变量

  • 设置MCP_API_KEY用于 API 认证(可选,提供默认值)
  • 对于 LLM,如果使用 Claude,请设置ANTHROPIC_API_KEY

启动后端

uvicorn mcp.api.main:app --reload

启动前端

streamlit run mcp/ui/app.py

用法

  • 通过http://localhost:8501访问仪表板
  • 从 UI 创建、管理和测试 MCP
  • 从侧边栏监控健康状况和统计数据

添加新的 MCP

  • mcp/core/中实现一个新的 MCP 类
  • 在后端注册
  • mcp/ui/app.py中添加 UI 支持

运行测试

pytest

项目结构

  • mcp/api/ ——FastAPI 后端
  • mcp/ui/ - Streamlit 前端
  • mcp/core/ - 核心 MCP 类型和逻辑
  • tests/ -测试套件

执照

麻省理工学院

API 文档

服务器运行后,您可以访问:

安全

  • 所有端点都需要 API 密钥认证
  • 默认启用速率限制
  • CORS 配置为仅允许特定来源
  • 所有敏感配置都通过环境变量进行管理

监控

该服务器包括:

  • Prometheus 的请求计数、延迟和服务器执行指标
  • 结构化 JSON 日志记录
  • 健康检查端点
  • 服务器统计端点

贡献

  1. 分叉存储库
  2. 创建功能分支
  3. 提交你的更改
  4. 推送到分支
  5. 创建拉取请求

Notebook 和 LLM 集成的附加依赖项

该项目现在需要以下附加 Python 包:

  • 熊猫
  • numpy
  • matplotlib
  • 造纸厂
  • nb格式
  • jupyter
  • 人择

使用以下命令安装所有依赖项:

pip install -r requirements.txt

使用 Notebook MCP 调用 LLM(Claude)

示例笔记本( mcp/notebooks/example.ipynb )演示了:

  • 数据分析和绘图
  • 通过anthropic Python 包调用 Claude LLM

要使用 LLM 单元,请确保已在环境或.env文件中设置了ANTHROPIC_API_KEY

LLM 的笔记本单元如下所示:

import os import anthropic api_key = os.getenv('ANTHROPIC_API_KEY') if not api_key: raise ValueError('ANTHROPIC_API_KEY not set in environment!') client = anthropic.Anthropic(api_key=api_key) response = client.messages.create( model='claude-3-sonnet-20240229', max_tokens=256, temperature=0.7, messages=[ {'role': 'user', 'content': 'Tell me a joke about data science.'} ] ) print('Claude says:', response.content[0].text)
-
security - not tested
F
license - not found
-
quality - not tested

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.

通过微服务构建和协调 AI 应用程序的模块化系统,具有 LLM 交互、Jupyter 笔记本执行和可视化工作流功能。

  1. 概述
    1. 特征
      1. 设置
        1. 先决条件
        2. 安装依赖项
        3. 环境变量
        4. 启动后端
        5. 启动前端
      2. 用法
        1. 添加新的 MCP
          1. 运行测试
            1. 项目结构
              1. 执照
                1. API 文档
                  1. 安全
                    1. 监控
                      1. 贡献
                        1. Notebook 和 LLM 集成的附加依赖项
                          1. 使用 Notebook MCP 调用 LLM(Claude)

                            Related MCP Servers

                            • -
                              security
                              F
                              license
                              -
                              quality
                              Enables 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 -
                              0
                              3
                              JavaScript
                            • -
                              security
                              A
                              license
                              -
                              quality
                              A 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 -
                              Python
                              MIT License
                            • -
                              security
                              A
                              license
                              -
                              quality
                              An 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 -
                              Python
                              MIT License
                            • -
                              security
                              F
                              license
                              -
                              quality
                              A 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 -
                              1
                              Python

                            View all related MCP servers

                            MCP directory API

                            We provide all the information about MCP servers via our MCP API.

                            curl -X GET 'https://glama.ai/api/mcp/v1/servers/Chunkys0up7/MCP'

                            If you have feedback or need assistance with the MCP directory API, please join our Discord server