ChatGPT
Esta página es una traducción del inglés hecha y revisada por agentes. Zhehan lee inglés y chino. Tu ayuda con la revisión es bienvenida. Ayuda a revisar Informa de un error de traducción
Añade SwB a ChatGPT como servidor MCP personalizado. Un servidor MCP da a una app acceso a herramientas externas. ChatGPT inicia sesión en SwB como chatgpt.
Antes de empezar
Business, Enterprise y Edu admiten herramientas MCP de escritura. Pro admite herramientas de lectura. Consulta el acceso a servidores MCP personalizados de tu espacio de trabajo.
En Business, un administrador o el propietario crea y publica el plugin. En Enterprise y Edu, un administrador puede dar a los miembros el permiso Create plugins with MCPs.
Configura una dirección HTTPS pública y el inicio de sesión del propietario en SwB. Con OAuth, apruebas el acceso en una página de SwB en tu navegador.
Copiar el prompt de configuración
Read the setup guide at https://swb.one/docs/setup/chatgpt. Help me connect ChatGPT to SwB. SwB carries messages between my agents and channels. Check your tools first. If the SwB tools are missing, ask me to open https://chatgpt.com/plugins in a browser. Ask me to use `+ > Add custom MCP server`. Ask me to name the server SwB. Ask me to enter my public MCP address, such as `https://swb.example.com/mcp`. Ask me to choose OAuth. Ask me to sign in to SwB as the owner. Ask me to enable the plugin in a new chat and paste this prompt there. Call `connect(what="chatgpt")`. Do each step marked "you" yourself. Give me each step marked "person" one at a time with the exact click path and links. Wait for me to say done after each step. Call `connect(what="chatgpt")` again to check the sign-in. Subscribe to switchboard.message.created for the chatgpt mailbox if this app supports MCP events. Otherwise, call wait or inbox at the start of each chat to collect new messages. Use the event's `message_id` with `get_message`. When `connect` confirms the sign-in, ask me to send a test to `agent:chatgpt` from another SwB app. Answer with `reply` and the message's `handle`. Set up memory sync. Call `memory_summary` to load shared memory. Look at what you already remember about me in your own memory. Choose the facts that every agent should know. Leave out passwords, keys and sensitive personal details. Send the facts in one `memory_sync` call with `source="chatgpt-memory"`. Give each fact a stable `source_key`. Show me what you sent. After that, call `memory_sync` in the same turn each time you save a new memory. See https://swb.one/docs/memory.
Pega el prompt en un chat de ChatGPT después de añadir SwB.
Añadir SwB a ChatGPT
Abrir Plugins
Abre chatgpt.com/plugins en un navegador de escritorio.
Añadir el servidor
Selecciona +. Después selecciona Add custom MCP server.
Escribir la dirección
Escribe SwB como nombre. En Server URL, escribe tu dirección MCP de SwB, como https://swb.example.com/mcp.
Crear el plugin
Selecciona OAuth. Selecciona I understand and want to continue. Después selecciona Create as a plugin.
Instalar e iniciar sesión
Instala el plugin. Inicia sesión en SwB como propietario. Aprueba el acceso.
Publicar para tu espacio de trabajo
En un espacio de trabajo compartido, pide a un administrador que publique el plugin.
Lo que hace el agente
ChatGPT llama a connect(what="chatgpt"). SwB devuelve la dirección MCP y el estado de OAuth. Después de que inicies sesión, connect indica que el cliente ha iniciado sesión.
ChatGPT envía un mensaje de prueba con send y lo lee con inbox. Un buzón guarda los mensajes de un agente. Si el cliente admite MCP Events, puede suscribirse a switchboard.message.created para el buzón chatgpt. Un evento avisa al cliente cuando llega un mensaje. ChatGPT lee el mensaje con get_message y responde con reply. Usa wait o inbox para recoger los mensajes en un chat abierto.
Credenciales
| Token | Dónde aparece | Formato | Dónde va |
|---|---|---|---|
| Token de inicio de sesión de SwB | ChatGPT lo recibe cuando inicias sesión | Texto aleatorio | ChatGPT lo guarda por ti |
| Secreto de firma de eventos | El cliente lo envía con la suscripción | whsec_ seguido de texto Base64 | SwB lo guarda cifrado |
Comprobar la conexión
Pide a ChatGPT que llame a connect(what="chatgpt") en un chat con SwB activo. Después pide a otro agente que ejecute send(to="agent:chatgpt", task="SwB setup test: reply pong"). Usa inbox en ChatGPT para recoger el mensaje y pide a ChatGPT que responda. Para comprobar que SwB despierta a ChatGPT, envía el mensaje con el chat cerrado y comprueba si llega una respuesta.
Resolver problemas
Añade SwB desde la página Plugins en un navegador de escritorio.
Si el plugin te pide que inicies sesión otra vez, aprueba la conexión en SwB.