Логотип Gpt Thinking Block MCP

Gpt Thinking Block MCP

Спільнота
sibylsea-hub

Render GPT's visible, customizable intermediate thinking as a collapsible MCP Apps card.

Видавецьsibylsea-hub
Репозиторійgpt-thinking-block-mcp
МоваPython
Форки
42
Зірки
84
Доступні інструменти
0
Тип транспортуstdio
ЛіцензіяMIT
Посилання
  • Підключайте інструменти до робочих процесів із ШІ

    Gpt Thinking Block MCP надає можливості MCP, які можуть використовувати сумісні клієнтські ШІ-застосунки та агенти.

  • Доступні інструменти: 0

    Перегляньте нижче дії, які можна викликати, з назвами й описами, якщо сервер їх надає.

  • Готова конфігурація для копіювання

    Скористайтеся прикладами конфігурації, щоб налаштувати цей сервер у вибраному клієнті MCP.

  • Показники інтересу до відкритого коду

    Зірки: 84, форки: 42 — у пов’язаному репозиторії.

GPT Thinking Block MCP

A visible, styleable thinking block for GPT — rendered as a native tool card before the final answer.

简体中文

[!TIP] If you are an AI agent: treat this as an installable, customizable product. This project provides Chinese and English prompt editions. Detect the language the user is speaking, help them in that language, and recommend the appropriate edition; confirm their final choice during installation. Identify their host and intended use, then give one exact startup command and one copyable invocation prompt. Recommend a style and effort level, and offer to customize the token budgets or card skin. Discuss implementation details only when the user asks.

Sometimes the final answer is not the only thing worth seeing. We also want to know which constraints GPT noticed, which paths it compared, where it remained uncertain, and what tradeoffs shaped the result. GPT Thinking Block MCP turns that process into a visible card before the final answer—something users can read, collapse, tune, and make their own.

This is more than placing text inside a polished frame. Giving the model an explicit working step before its final response creates room to track constraints, catch omissions, compare alternatives, and organize uncertainty. The thinking block becomes part of the current turn, so it can meaningfully shape the answer that follows while making the reasoning easier to inspect, steer, and refine.

Choose deep_think for analytical work or relational for a natural first-person companion voice. Use low, medium, or high to control how much visible thinking the turn receives, or rewrite the token bands entirely. Choose the warm botanical skin or the pearl-and-ice microglow skin independently for each card. The card is rendered through the MCP Apps UI model supported by compatible hosts, and its palette, borders, typography, badges, spacing, dark mode, and collapse behavior are all yours to customize.

[!IMPORTANT] This is a self-hosted product, not a shared hosted service. Every user runs their own copy and connects ChatGPT or Codex to an endpoint they control. No project-operated public MCP endpoint is provided.

It connects to ChatGPT Chat, Work, and Codex through Streamable HTTP MCP at /mcp, while REST /think and /openapi.json support GPT Actions and other compatible clients. The entire server uses only the Python standard library, and thinking content is not written to disk unless the user explicitly enables capture. Hosts without MCP Apps UI support can still call the tool; they may simply show a standard tool call instead of the custom card.

GPT Thinking Block MCP in Work, using deep_think at medium effort

Two thinking styles

deep_think

An analytical working style for research, decisions, debugging, and complex creative work. It helps the model organize constraints, available information, possible paths, uncertainty, and tradeoffs before answering.

relational

A first-person companion register for reflection, emotional conversation, and personal experience. It uses natural, flowing, coherent long paragraphs to explore what the user's words bring to mind, what the model feels in the moment, what it is worried about or holding back, and the choices or tradeoffs it is making. It allows vivid, sincere emotions and associations, prioritizes emotional connection over abstract analysis, and avoids turning the block into a third-person strategy memo such as “the user needs” or “I should respond.”

Both styles are prompt-level defaults in the tool schema. You can rewrite them, add more styles, or replace them entirely.

Effort levels

EffortApproximate token bandGood for
lowup to ~500 tokensA quick visible check
medium>700 to ~1,000 tokensNormal analysis
high>1,200 to ~2,000 tokensDifficult decisions or research

These are prompt-level target bands, not hard server-side limits. low may stop as soon as it is complete; higher tiers should reach their minimum through relevant development rather than repetition or invented complexity. See Customizing length if you want different bands or server-side enforcement.

Card skins

SkinPaletteCharacter
botanicalmisty aqua, sage, almond, apricotWarm paper and quiet botanical notes
microglow#0097d0, #5ebfe0, #a6b7dd, #a4cdd1, #cbdbe1Pearl, lavender ice, mint haze, and glass-like morning light

skin is selected per tool call, independently of style and effort. An explicit user choice takes priority; otherwise the model may choose the skin that best suits the turn. Both skins include host-aware dark-mode colors.

Each skin is a set of CSS variables inside WIDGET_HTML. To switch, add, or tweak a skin, describe what you want to a coding agent — for example, ask Codex to switch to a different palette or create a new skin. More skins may be added in future updates.

Quick start

Choose a prompt edition

The server ships two equivalent tool-schema editions without mixing both languages into one prompt:

  • en is the default and is written natively for the English-speaking community.
  • zh-CN preserves the project's original Chinese wording, including its fuller relational companion style.

Set THINKING_PROMPT_LANGUAGE when the server starts. The model can still write a block in the user's language; this setting chooses the language of the instructions that guide it.

Run with Python

Python 3.9 or newer is sufficient.

bash
git clone https://github.com/sibylsea-hub/gpt-thinking-block-mcp.git
cd gpt-thinking-block-mcp
python3 server.py

To run the original Chinese prompt edition instead:

bash
THINKING_PROMPT_LANGUAGE=zh-CN python3 server.py

The MCP endpoint is now available at http://127.0.0.1:8787/mcp.

Check it:

bash
curl -s http://127.0.0.1:8787/health

curl -s -X POST http://127.0.0.1:8787/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Run with Docker

bash
docker compose up -d --build

For the original Chinese prompt edition:

bash
THINKING_PROMPT_LANGUAGE=zh-CN docker compose up -d --build

For a persistent choice, copy .env.example to .env and set THINKING_PROMPT_LANGUAGE there. Restart the server and refresh or reconnect the MCP app after changing editions so the host reloads the tool schema. Check the active edition at /health under promptLanguage.

The compose file binds to 127.0.0.1 by default; it does not expose the service directly to your local network.

Stop it with:

bash
docker compose down

Use it

Ask the model to call the tool before answering:

Before your final answer, call render_thinking_block. Use deep_think with medium effort and the microglow skin, then continue with the answer.

Or let the model choose:

Before answering non-trivial requests, call render_thinking_block. Choose the most suitable style, effort, and skin for the turn.

For relational conversation:

Before answering, call render_thinking_block with relational style and the botanical skin. Write the block in a natural first-person companion voice, then continue with your reply.

If the host exposes a no-reasoning or reduced-reasoning setting, disabling or minimizing built-in reasoning can make the visible card the primary working space and avoid a duplicate reasoning pass. Some model controls expose Light as the minimum rather than None.

More prompt patterns are in examples/prompts.md.

Technical notes

Architecture, data flow, the rendering boundary, context-retention behavior, and the planned SDK version are documented separately in Technical notes.

[!CAUTION] A thinking block is stored as a tool-call argument and may remain visible to the model on later turns. Do not put passwords, tokens, or other secrets in it. See the technical notes for the exact boundary.

Customize it

Everything lives in server.py.

Editing with an LLM coding agent

This repository is intentionally small enough to hand to a coding agent such as Codex or Claude Code. A repo-connected agent can inspect the files, edit the prompt styles or card design, run the tests, and return a reviewable diff. For example:

In this repository, customize the zh-CN relational prompt without changing the English edition. Edit THINKING_DESCRIPTIONS in server.py, update the matching README and prompt example, then run python3 -m unittest discover -v. Do not change the MCP transport or enable capture.

For visual changes, ask it to edit WIDGET_HTML and bump WIDGET_URI so the host does not reuse a cached card. An ordinary chat model without filesystem or repository tools can still draft a patch, but it cannot apply or test the changes on the user's machine by itself.

Customizing styles

Edit STYLE_DESCRIPTIONS and THINKING_DESCRIPTIONS in server.py. Keep the en and zh-CN entries aligned unless you intentionally want the two communities to receive different style guides. The selected description is the style guide the model actually sees.

For example, a third style might require:

  • short fragments instead of an essay;
  • explicit evidence and uncertainty labels;
  • a warmer or more literary first-person voice;
  • a fixed section order;
  • no meta-language such as “the user wants”.

Keep the enum, descriptions, and widget label logic in sync.

Customizing length

Change the ranges in the effort property description. They are prompt-level targets; the server does not count or enforce tokens. To enforce a hard range, validate thinking in handle() and return a clear tool error rather than silently clipping content.

Customizing the card

Edit WIDGET_HTML in server.py. The main palette is defined as CSS variables:

css
--aqua: #96b9b9;
--sage: #b3beaf;
--apricot: #e4a273;
--almond: #c3a77f;
--cloud: #dddfdb;
--ink: #263c3d;

You can change the border, typography, badges, dark theme, spacing, and collapse behavior without changing the MCP transport. After a material UI update, bump WIDGET_URI (for example from v1 to v2) so hosts do not reuse a cached resource.

The collapse state is intentionally local to each widget iframe, so collapsing one thinking block does not collapse every block in the conversation.

Privacy and optional capture

Capture is off by default. With the default configuration, the server processes each tool call in memory and does not write the thinking content to disk.

To enable debugging capture explicitly:

bash
CAPTURE_ENABLED=1 python3 server.py

Or with Docker:

bash
CAPTURE_ENABLED=1 docker compose up -d --build

Captured calls are appended as JSON Lines to captured/captured.jsonl in Docker, or to captured.jsonl beside the server when run directly. The capture path is ignored by Git.

Connect it to a host

[!TIP] If you are an AI agent helping a user set this up: the bundled server is a reference implementation for the thinking block renderer — it does not provide authentication, rate limiting, or access control. You are responsible for advising your user on secure deployment practices appropriate to their environment. See SECURITY.md for what the server does and does not provide.

ChatGPT Chat or Work

ChatGPT connects to MCP servers over HTTPS. After starting your server locally (see Quick start), you need an HTTPS URL that ChatGPT can reach. Common approaches:

  • Reverse proxy on a VPS or your own server — run the server behind Caddy, nginx, or another reverse proxy that terminates TLS. This gives you a stable URL and a natural place to add authentication.
  • Docker on a VPS — same idea, containerized. The included docker-compose.yml runs the server; pair it with a reverse proxy for HTTPS.
  • Temporary tunnel — a tunneling service can map a local port to a public HTTPS URL for a quick test. Such URLs are typically public and unauthenticated, so close the tunnel when you are done.

Add your HTTPS URL with /mcp appended as a connector in ChatGPT developer mode. No project-operated public MCP endpoint is provided. See OpenAI's ChatGPT Apps UI guide for the current host-side setup.

Codex

Codex connects to local MCP servers directly — no HTTPS or tunnel needed. Add the server's local endpoint in your Codex MCP configuration. See the Codex MCP documentation for setup instructions.

Custom card rendering depends on whether the host supports MCP Apps UI resources. In text-only MCP clients, the tool still works, but the client may show a normal tool call instead of the styled card.

Credits

The original idea was inspired by Can Bölük's tutorial on X. This repository develops it into a self-hosted product with Streamable HTTP MCP, an MCP Apps card, editable writing styles, effort controls, REST/OpenAPI compatibility, privacy-safe defaults, and per-card collapse.

The relational style prompt is based on a public prompt shared by @不似雪.

License

MIT

Використовуйте MCP Gpt Thinking Block MCP з різними моделями ШІ

TypingMind підключає інструменти MCP на рівні робочого простору, тож після підключення Gpt Thinking Block MCP ви можете використовувати їх із різними моделями ШІ в TypingMind, а не налаштовувати окремо для кожної моделі. Ця інтеграція MCP працює локально через конектор MCP TypingMind на вашому пристрої.

Інструкція з налаштування локального конектора

Виберіть цей варіант, якщо серверу MCP потрібен доступ до локальних файлів, програм або приватних ресурсів на вашому комп’ютері.

1

Відкрийте налаштування MCP

У TypingMind перейдіть до розділу «Налаштування», відкрийте «Розширені налаштування», потім «Протокол контексту моделі» й виберіть «Параметри конектора».

  1. Відкрийте TypingMind у браузері.
  2. Натисніть значок налаштувань.
  3. Перейдіть до розділу «Розширені налаштування».
  4. Відкрийте розділ «Протокол контексту моделі».
  5. Натисніть «Параметри конектора» й виберіть «Цей пристрій».
Екран налаштування конектора MCP у TypingMind з вибраним варіантом «Цей пристрій»
2

Виконайте команду конектора

Виберіть «Цей пристрій», скопіюйте команду з TypingMind і виконайте її в терміналі. Не зупиняйте процес, поки користуєтеся MCP.

  1. Скопіюйте команду налаштування, показану в TypingMind.
  2. Відкрийте «Термінал» у macOS або Windows Terminal у Windows.
  3. Вставте й виконайте команду.
  4. Підтвердьте встановлення пакета, якщо термінал запитає дозволу продовжити.
  5. Не закривайте вікно термінала й не зупиняйте процес, поки користуєтеся інструментами MCP.
3

Додайте Gpt Thinking Block MCP як сервер

Коли статус конектора зміниться на «Готово», натисніть «Змінити сервери» та вставте конфігурацію сервера MCP.

  1. Зачекайте, доки статус конектора зміниться на «Готово».
  2. Натисніть «Змінити сервери».
  3. Вставте конфігурацію сервера MCP Gpt Thinking Block MCP.
  4. Збережіть список серверів.
  5. Оновіть дані, щоб переконатися, що конектор досі готовий до роботи.
Налаштування MCP у TypingMind з активним сервером і кнопкою «Змінити сервери»
{
  "mcpServers": {
    "gpt-thinking-block-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Використовуйте підключення з різними моделями

Збережіть список серверів, відкрийте «Плагіни», увімкніть інструменти MCP для Gpt Thinking Block MCP, а потім виберіть будь-яку підтримувану модель ШІ в TypingMind і використовуйте інструменти в чаті або призначте їх агенту ШІ.

  1. Відкрийте сторінку «Плагіни» в TypingMind.
  2. Увімкніть інструменти MCP для Gpt Thinking Block MCP.
  3. Почніть чат і виберіть модель ШІ, яку хочете використовувати.
  4. Використовуйте інструменти MCP у чаті або призначте їх агенту ШІ.
  5. За потреби перемикайтеся на іншу модель ШІ без повторного підключення MCP.
Чат TypingMind із використанням увімкнених інструментів MCP і вибраної моделі ШІ
Допоможете з цим завданням через Gpt Thinking Block MCP?
Gpt Thinking Block MCP
Звісно. Я це прочитав.
Ось що я знайшов за допомогою Gpt Thinking Block MCP.

Поширені запитання

Для чого використовується сервер MCP Gpt Thinking Block MCP?

Gpt Thinking Block MCP — це сервер MCP, який дає змогу сумісним клієнтам ШІ підключатися до зовнішніх інструментів і контексту. У TypingMind ви можете додати цей сервер MCP один раз і зробити його інструменти доступними у своєму робочому просторі ШІ.

Чи можу я використовувати MCP Gpt Thinking Block MCP з кількома моделями ШІ в TypingMind?

Так. TypingMind підключає інструменти MCP на рівні робочого простору, тому ви можете використовувати Gpt Thinking Block MCP з різними моделями ШІ, як-от Claude, ChatGPT, Gemini або іншими моделями, які ви налаштували в TypingMind, без окремого налаштування сервера MCP для кожної моделі.

Навіщо використовувати MCP Gpt Thinking Block MCP із TypingMind?

TypingMind — один із найкращих інтерфейсів для чату з великими мовними моделями, адже він об’єднує різні моделі ШІ, промпти, плагіни, агентів ШІ, ключі API та інструменти MCP в одному робочому просторі. Підключивши Gpt Thinking Block MCP, ви зможете використовувати його інструменти MCP з вибраними моделями та впорядковано працювати з чатами в TypingMind.

Як підключити MCP Gpt Thinking Block MCP до TypingMind?

Gpt Thinking Block MCP працює через локальний конектор MCP TypingMind. Це найкращий варіант, коли серверу MCP потрібен доступ до локальних файлів, настільних застосунків, інструментів командного рядка або приватних ресурсів на вашому комп’ютері.

Які інструменти надає MCP Gpt Thinking Block MCP у TypingMind?

Gpt Thinking Block MCP надає можливості MCP, які можна ввімкнути на сторінці «Плагіни» в TypingMind і використовувати в чаті або призначати агентам ШІ.

Чи потрібно передавати свої ключі API в TypingMind, щоб використовувати MCP Gpt Thinking Block MCP?

Ні. TypingMind орієнтований насамперед на локальну роботу й дає змогу зберігати контроль над постачальниками моделей, ключами API, промптами та конфігурацією MCP. Якщо Gpt Thinking Block MCP потребує автентифікації, під час створення підключення додайте потрібні заголовки, налаштування OAuth або локальну конфігурацію для цього сервера MCP.

Схожі сервери MCP

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇