Hello Plugins
Hello, Plugins! — Python OpenAI Plugin
Это минимальный пример OpenAI Plugin, который при вызове инструмента hello_plugins возвращает ровно Hello, Plugins!.
OpenAI Plugin может состоять из Skill, MCP-сервера или того и другого. Этот проект представляет собой наименьшую форму, для которой требуется исполняемый код, поэтому здесь используется только один Python MCP-сервер. Поскольку OpenAI API напрямую не вызывается, OPENAI_API_KEY также не требуется.
Структура проекта
hello-plugins-python/
├── server.py # MCP 서버와 hello_plugins 도구
├── test_server.py # 반환 문자열 테스트
├── requirements.txt # 고정된 Python 의존성
├── pyproject.toml
├── Dockerfile
└── README.mdRelated MCP server: hello-mcp
Запуск в Windows 11 / PowerShell
Требуется Python 3.10 или выше.
cd hello-plugins-python
py -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txt
python server.pyПосле запуска адрес MCP Streamable HTTP будет следующим:
http://localhost:8000/mcpЕсли политика выполнения PowerShell блокирует активацию виртуального окружения, сначала выполните следующую команду только в текущем терминале:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassЗапуск в macOS / Linux
cd hello-plugins-python
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
python server.pyТестирование
python -m pytest -q
python verify_mcp.pyОжидаемый результат:
1 passed
MCP verification passed: Hello, Plugins!Проверка с помощью MCP Inspector
Если установлен Node.js, выполните следующее:
npx @modelcontextprotocol/inspectorВ Inspector выберите Transport — Streamable HTTP и введите http://localhost:8000/mcp в поле URL. После подключения вызовите инструмент hello_plugins — будет возвращена следующая строка:
Hello, Plugins!Подключение к ChatGPT Work в качестве персонального Plugin
Поскольку ChatGPT не может напрямую обратиться к localhost локального ПК, для тестирования необходимо развернуть эндпоинт /mcp по публичному HTTPS-адресу или использовать OpenAI Secure MCP Tunnel.
Разверните сервер в публичном HTTPS-окружении.
В ChatGPT включите Settings → Security and login → Developer mode.
На экране Plugins нажмите
+и введитеhttps://YOUR-DOMAIN/mcp.Установите созданный персональный Plugin.
В чате Work выберите
@Hello Pluginsи попросите: «Выведите приветствие плагина».
Запуск в Docker
docker build -t hello-plugins .
docker run --rm -p 8000:8000 hello-pluginsОсновной код
@mcp.tool(
name="hello_plugins",
description="Return the exact greeting 'Hello, Plugins!'. This tool is read-only.",
)
def hello_plugins() -> str:
return "Hello, Plugins!"Ссылки
Официальная документация OpenAI Plugin: https://developers.openai.com/plugins
Plugin Quickstart: https://developers.openai.com/plugins/quickstart
Разработка MCP-сервера: https://developers.openai.com/plugins/build/mcp-server
This server cannot be deployed
Maintenance
Related MCP Connectors
POC MCP server. Tool say_hello returns 'Welcome' (agent -> MCP -> API path).
Minimal streamable HTTP MCP server used for owned-account registry connectivity tests.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA minimal Model Context Protocol server that facilitates network-based client connections using Streamable HTTP transport. It provides a greeting tool and is optimized for consistent deployment across local environments, Docker, and Kubernetes.MIT
- AlicenseNot gradedqualityDmaintenanceA minimal learning-focused MCP server that demonstrates core primitives like tools and resources through simple greeting functions. It provides a foundational example for connecting AI models to external data using both Streamable HTTP and stdio transports.10 npmMIT
- FlicenseNot gradedqualityDmaintenanceA minimal MCP server offering a hello_world tool that returns a greeting and current UTC time via streamable HTTP.-
- AlicenseAqualityAmaintenanceA minimal MCP server that provides health/status checks and multilingual greetings via the server_info and greet tools.2MIT