Hello Plugins
Hello, Plugins! — Python OpenAI Plugin
Ein minimales Beispiel für ein OpenAI Plugin, das genau Hello, Plugins! zurückgibt, wenn das Tool hello_plugins aufgerufen wird.
Ein OpenAI Plugin kann aus einem Skill, einem MCP-Server oder beidem bestehen. Da dieses Projekt die kleinste Form ist, die ausführbaren Code erfordert, wird nur ein Python-MCP-Server verwendet. Da die OpenAI API nicht direkt aufgerufen wird, ist auch OPENAI_API_KEY nicht erforderlich.
Projektstruktur
hello-plugins-python/
├── server.py # MCP 서버와 hello_plugins 도구
├── test_server.py # 반환 문자열 테스트
├── requirements.txt # 고정된 Python 의존성
├── pyproject.toml
├── Dockerfile
└── README.mdRelated MCP server: hello-mcp
Ausführen unter Windows 11 / PowerShell
Python 3.10 oder höher ist erforderlich.
cd hello-plugins-python
py -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txt
python server.pyNach dem Ausführen lautet die MCP Streamable HTTP-Adresse wie folgt:
http://localhost:8000/mcpFalls die PowerShell-Ausführungsrichtlinie die Aktivierung der virtuellen Umgebung blockiert, führen Sie zuerst nur im aktuellen Terminal den folgenden Befehl aus.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassAusführen unter macOS / Linux
cd hello-plugins-python
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
python server.pyTest
python -m pytest -q
python verify_mcp.pyErwartetes Ergebnis:
1 passed
MCP verification passed: Hello, Plugins!Prüfung mit MCP Inspector
Wenn Node.js installiert ist, führen Sie Folgendes aus:
npx @modelcontextprotocol/inspectorWählen Sie im Inspector als Transport Streamable HTTP und geben Sie die URL http://localhost:8000/mcp ein. Nach dem Verbinden rufen Sie das Tool hello_plugins auf; die folgende Zeichenkette wird dann zurückgegeben:
Hello, Plugins!Ein persönliches Plugin mit ChatGPT Work verbinden
Da ChatGPT nicht direkt auf localhost auf dem lokalen PC zugreifen kann, müssen Sie für den Test den /mcp-Endpunkt auf einer öffentlichen HTTPS-Adresse bereitstellen oder den OpenAI Secure MCP Tunnel verwenden.
Stellen Sie den Server in einer öffentlichen HTTPS-Umgebung bereit.
Aktivieren Sie in ChatGPT Settings → Security and login → Developer mode.
Klicken Sie im Plugins-Bildschirm auf
+und geben Siehttps://YOUR-DOMAIN/mcpein.Installieren Sie das erstellte persönliche Plugin.
Wählen Sie im Work-Chat
@Hello Pluginsaus und fragen Sie: „Bitte geben Sie den Plugin-Gruß aus.“
Ausführen mit Docker
docker build -t hello-plugins .
docker run --rm -p 8000:8000 hello-pluginsKerncode
@mcp.tool(
name="hello_plugins",
description="Return the exact greeting 'Hello, Plugins!'. This tool is read-only.",
)
def hello_plugins() -> str:
return "Hello, Plugins!"Referenzen
Offizielle OpenAI Plugin-Dokumentation: https://developers.openai.com/plugins
Plugin Quickstart: https://developers.openai.com/plugins/quickstart
MCP-Server-Entwicklung: 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