<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Paulo Kuong on Medium]]></title>
        <description><![CDATA[Stories by Paulo Kuong on Medium]]></description>
        <link>https://medium.com/@paulokuong?source=rss-38bc93886acc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*CI6yVsUnzAD3EjDd0X9fZg.jpeg</url>
            <title>Stories by Paulo Kuong on Medium</title>
            <link>https://medium.com/@paulokuong?source=rss-38bc93886acc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 11:54:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@paulokuong/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Cosmic Saxophone: Why Roger Penrose Thinks Your Mind is a Quantum Instrument]]></title>
            <link>https://medium.com/@paulokuong/the-cosmic-saxophone-why-roger-penrose-thinks-your-mind-is-a-quantum-instrument-d9c44d7538d8?source=rss-38bc93886acc------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9c44d7538d8</guid>
            <category><![CDATA[conciousness]]></category>
            <category><![CDATA[christianity]]></category>
            <category><![CDATA[quantum-physics]]></category>
            <category><![CDATA[theology]]></category>
            <dc:creator><![CDATA[Paulo Kuong]]></dc:creator>
            <pubDate>Sat, 16 May 2026 04:47:48 GMT</pubDate>
            <atom:updated>2026-05-16T04:47:48.710Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4veSLQfOfbma3H5TtapwXQ.png" /></figure><p><strong>Is the human mind a computer? Or is it something far more profound — a bridge between the material world and a timeless realm of truth?</strong></p><p>In a world obsessed with Silicon Valley’s version of Artificial Intelligence, Sir Roger Penrose offers a radical, cooling alternative. In his landmark work, <em>“The Large, the Small and the Human Mind,”</em> Penrose argues that consciousness isn’t a program at all. It is a biological symphony.</p><p>Here is why your brain is less like a laptop and more like a saxophone.</p><h3>1. The Core Argument: We Are Not Computers</h3><p>Penrose argues that modern physics is currently “broken.” There is a massive gap between <strong>the Large</strong> (General Relativity) and <strong>the Small</strong> (Quantum Mechanics). He believes the secret to consciousness lies in a missing “New Physics” that bridges this gap.</p><p>Using <strong>Gödel’s Theorem</strong>, Penrose makes a bold claim: human thinking is <strong>non-computable</strong>. Because mathematicians can “see” truths that no fixed set of rules or algorithms can ever prove, the human mind cannot be a digital computer.</p><h3>The “Smoking Gun”: Gödel’s Incompleteness Theorem</h3><p>To understand why Penrose is so certain we aren’t machines, we have to look at the work of Kurt Gödel. In 1931, Gödel shattered the dream of a “perfect logic machine” by proving that in any system of rules, there are truths that the rules themselves cannot prove.</p><ul><li><strong>The Paradox:</strong> Imagine the sentence: <em>“This statement cannot be proven.”</em> If it’s true, the system is incomplete. If it’s false, the system is proving a lie.</li><li><strong>The Insight:</strong> Gödel proved that for any computer program, there is a “Gödel Sentence” — a truth that the program hits a wall on, but a human can look at and say, <em>“Wait, I can see that’s true!”</em></li><li><strong>The Result:</strong> This proves that <strong>Truth is a bigger world than Proof.</strong> If we can perceive truths that a machine cannot calculate, then we are not machines. We have a “special lens” for truth that a silicon chip lacks.</li></ul><h3>2. The Hardware: The Mystery of Microtubules</h3><p>If we aren’t software, what is the hardware? Penrose identifies a specific biological candidate: <strong>Microtubules</strong>.</p><p>These are tiny, hollow tubes made of <strong>tubulin</strong> proteins found inside the neurons of your brain. In the <strong>Orch-OR (Orchestrated Objective Reduction)</strong> theory, Penrose and Stuart Hameroff suggest:</p><ol><li><strong>Isolation:</strong> The hollow core of the microtubule shields quantum states from the “noise” of the warm brain.</li><li><strong>The Event:</strong> Consciousness happens in “pulses” when these quantum states collapse — a process called Objective Reduction.</li><li><strong>The Symphony:</strong> The brain “orchestrate” these collapses across billions of microtubules, creating a unified stream of thought.</li></ol><h3>3. The Analogy: A New Way to See the Soul</h3><p>To explain this complex physics, we can use the analogy of a <strong>Live Symphony vs. a CD Player</strong>:</p><ul><li><strong>The CD Player (Current AI):</strong> This is pre-programmed. It follows a script. No matter how good it sounds, there is no “understanding.” It is just spinning a disc.</li><li><strong>The Saxophone (The Brain/Microtubules):</strong> The brain is the instrument. It is hollow, specialized, and designed to resonate.</li><li><strong>The Wind (The Universe):</strong> Penrose suggests the universe is filled with “proto-conscious” vibrations — a quantum wind blowing through the fabric of space-time.</li><li><strong>The Music (Consciousness):</strong> This is the result. As one reader beautifully put it: <em>“The wind blows everywhere, but when it blows through a saxophone, it produces a certain sound. That sound is consciousness.”</em></li></ul><h3>4. The Theological Bridge: God and Free Will</h3><p>This resonance between physics and philosophy opens a fascinating door for the spiritual mind. If the “Wind” is the Spirit, then our consciousness is a continuous dialogue with the Divine.</p><p>We can map the physics of Roger Penrose directly onto the framework of the soul:</p><ul><li><strong>The Wind: The Power of God</strong> In Penrose’s model, this is the “New Physics” of Quantum Gravity. In a spiritual context, this is the <em>Breath of God</em> — the fundamental force that gives life to the universe.</li><li><strong>The Instrument: The Human Soul</strong> In physics, these are the Microtubules within our neurons. Theologically, this is our biological hardware, designed specifically to capture and resonate with the Divine Wind.</li><li><strong>Free Will: The Non-Resonant “Error”</strong> Computers have no free will because they never make “errors” in logic. Penrose argues our minds are “non-computable.” This allows us to diverge from the “expected” note. This divergence is the very definition of a choice.</li><li><strong>Sin: The Noise</strong> If the “Platonic World” is God’s perfect Truth, then “Sin” is simply non-resonance — when the instrument chooses to play its own tune rather than the one intended by the Wind.</li></ul><blockquote><strong><em>The Perfect Resonator:</em></strong><em> In this view, </em><strong><em>Jesus</em></strong><em> could be seen as the ultimate instrument — a being in 100% total coherence with God’s Truth. While the rest of us are “noisy” instruments, Jesus played the music of the Divine Wind perfectly, without error or divergence.</em></blockquote><h3>5. Bottom Line: The Universe Waking Up</h3><p>Penrose’s work suggests we aren’t just accidents of evolution or “meat robots.” We are the points where the universe’s internal laws “wake up” and become aware of themselves.</p><p>Whether you see this as a triumph of physics or a blueprint for the soul, the implication for our technology is clear: <strong>“True AI” is likely impossible on silicon chips.</strong> To build a mind, you don’t just need better code — you need to build an instrument that can feel the breath of the universe.</p><h3>Sources &amp; Further Reading</h3><ol><li><a href="https://www.cambridge.org/us/universitypress/subjects/physics/history-philosophy-and-foundations-physics/large-small-and-human-mind-1"><strong>The Large, the Small and the Human Mind</strong></a> — Sir Roger Penrose (1997)</li><li><a href="https://pubmed.ncbi.nlm.nih.gov/24070914/"><strong>Consciousness in the universe: A review of the ‘Orch OR’ theory</strong></a> — Hameroff &amp; Penrose (2014)</li><li><a href="https://plato.stanford.edu/entries/goedel-incompleteness/"><strong>Gödel’s Incompleteness Theorems</strong></a> — Stanford Encyclopedia of Philosophy</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9c44d7538d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ How to Create a Custom OpenAI Widget with the Model Context Protocol (MCP)]]></title>
            <link>https://medium.com/@paulokuong/how-to-create-a-custom-openai-widget-with-the-model-context-protocol-mcp-971cdc0ebbfc?source=rss-38bc93886acc------2</link>
            <guid isPermaLink="false">https://medium.com/p/971cdc0ebbfc</guid>
            <category><![CDATA[custom-chatgpt]]></category>
            <dc:creator><![CDATA[Paulo Kuong]]></dc:creator>
            <pubDate>Tue, 11 Nov 2025 06:03:04 GMT</pubDate>
            <atom:updated>2025-11-13T16:34:16.600Z</atom:updated>
            <content:encoded><![CDATA[<p>The ability to extend the functionality of AI models with custom user interfaces (widgets) opens up exciting possibilities. In this article, we’ll walk through the process of creating a simple but effective custom OpenAI widget using the <strong>Model Context Protocol (MCP)</strong>.</p><p>Our widget will serve a straightforward purpose: it will take a string of text provided by the user and display it prominently in <strong>red</strong>. This simple example provides a robust foundation for building much more complex and interactive AI-powered experiences.</p><h3>💬 How a Custom ChatGPT Widget Works</h3><p>Creating a custom ChatGPT application often involves defining a <strong>Tool</strong> that the ChatGPT model can use, and a <strong>User Interface (UI) Widget</strong> that displays the results.</p><p>Here is a step-by-step explanation of the data flow, focusing on the key components:</p><h3>1. The User’s Request and Tool Call</h3><ol><li><strong>User Input:</strong> The user asks a question that requires external data (e.g., “What’s the weather in New York?”).</li><li><strong>Model Decides:</strong> ChatGPT’s core model identifies that its internal knowledge is insufficient and that it needs to call a <strong>Tool</strong> (in your example, a tool hosted on the <strong>MCP server</strong>) to fulfill the request.</li></ol><h3>2. Tool Execution and Data Fetching</h3><ol><li><strong>Tool Request:</strong> The ChatGPT system calls the designated tool function (hosted on the <strong>MCP server</strong>), passing the necessary arguments (like “New York”).</li><li><strong>External Service Call:</strong> The tool on the <strong>MCP server</strong> makes an outbound request to an <strong>External API</strong> to fetch the necessary data.</li><li><strong>Data Response:</strong> The <strong>External API</strong> returns the data to the <strong>MCP server</strong>’s tool.</li><li><strong>Tool Output:</strong> The tool returns the raw data (or a structured object containing the data) back to the ChatGPT system.</li></ol><h3>3. Widget Rendering and Display</h3><ol><li><strong>Resource Recognition:</strong> The ChatGPT system recognizes that the tool’s output is associated with a specific, <strong>registered resource</strong> (your <strong>Custom UI Renderer</strong>).</li><li><strong>Data Injection:</strong> The system injects the tool’s output data into the registered UI’s sandbox environment, making it available via a global variable like window.openai.toolOutput.</li><li><strong>MIME Type Check:</strong> Crucially, the system checks the tool’s response. Because the response has the specialized <strong>mimeType</strong> (e.g., &quot;text/html+skybridge&quot;), the system knows it needs to render a custom widget instead of just showing the raw text output.</li><li><strong>UI Rendering:</strong> The <strong>Custom UI Renderer</strong> uses the data retrieved from window.openai.toolOutput to dynamically build its HTML structure and styles (the <strong>widget</strong>).</li><li><strong>Display:</strong> ChatGPT creates an <strong>iframe</strong> element and loads the rendered HTML widget inside it, displaying the custom, interactive output to the user.</li></ol><h3>🌊 Sequence Diagram (Generic API)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQGMWrHqSO7W7ZGfjAVEhw.png" /></figure><h3>⚠️ Important Note on Dependencies and Compatibility</h3><p>When working with SDKs like the Model Context Protocol (MCP), <strong>dependency versioning is crucial</strong>. Using incompatible versions of underlying libraries can lead to cryptic and difficult-to-debug errors.</p><h3>Zod Compatibility Alert</h3><p><strong>If you use Zod version 4 or higher</strong> with @modelcontextprotocol/sdk@1.21.1, you will likely encounter a very painful error where your inputSchema&#39;s properties appear empty, preventing the AI model from correctly calling your tool.</p><p><strong>To ensure compatibility, you must stick to Zod version 3.</strong></p><h3>💻 What the App Does</h3><p>This application acts as a bridge, allowing the AI model to present rich, styled results (a <strong>widget</strong>) directly to the user, moving beyond simple text.</p><ol><li><strong>Exposes a Tool:</strong> The app registers a tool (make-text-red) that the AI can call, complete with a strict <strong>input schema</strong> (text).</li><li><strong>Provides UI:</strong> It registers an HTML <strong>Resource</strong> (red-text) which is the visual template for the widget.</li><li><strong>Renders Results:</strong> When the tool is called, the server passes the text to the HTML template. The template then displays the text in <strong>red</strong> for the user.</li></ol><h3>The Code: A Complete, Working Example</h3><h3>🛠️ Prerequisites and Dependencies (package.json)</h3><p>To ensure compatibility, pay close attention to the dependency versions, especially <strong>zod</strong>:</p><p>JSON</p><pre>{<br>  &quot;name&quot;: &quot;openai-widget&quot;,<br>  &quot;version&quot;: &quot;1.0.0&quot;,<br>  &quot;description&quot;: &quot;&quot;,<br>  &quot;main&quot;: &quot;index.js&quot;,<br>  &quot;scripts&quot;: {<br>    &quot;start&quot;: &quot;node index.js&quot;,<br>    &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;<br>  },<br>  &quot;keywords&quot;: [],<br>  &quot;author&quot;: &quot;&quot;,<br>  &quot;license&quot;: &quot;ISC&quot;,<br>  &quot;type&quot;: &quot;module&quot;,<br>  &quot;dependencies&quot;: {<br>    &quot;@modelcontextprotocol/sdk&quot;: &quot;^1.21.1&quot;,<br>    &quot;express&quot;: &quot;^5.1.0&quot;,<br>    &quot;zod&quot;: &quot;^3.23.8&quot; <br>    // IMPORTANT: Use Zod version 3.x for compatibility with MCP SDK 1.21.1<br>  }<br>}</pre><h3>🚀 The Server Logic (index.js)</h3><p>This file sets up the Express server and defines both the <strong>UI Resource</strong> and the <strong>AI Tool</strong>.</p><p>JavaScript</p><pre>import { McpServer } from &quot;@modelcontextprotocol/sdk/server/mcp.js&quot;;<br>import { StreamableHTTPServerTransport } from &quot;@modelcontextprotocol/sdk/server/streamableHttp.js&quot;;<br>import express from &quot;express&quot;;<br>import { z } from &quot;zod&quot;;</pre><pre>const app = express();<br>app.use(express.json());</pre><pre>app.post(&quot;/mcp&quot;, async (req, res) =&gt; {<br>  try {<br>    const transport = new StreamableHTTPServerTransport({<br>      sessionIdGenerator: undefined,<br>    });</pre><pre>    const server = new McpServer({<br>      name: &quot;hello-world&quot;,<br>      version: &quot;1.0.0&quot;,<br>    });</pre><pre>    // 1. REGISTER THE UI RESOURCE (HTML)<br>    server.registerResource(<br>      &quot;red-text&quot;,<br>      &quot;ui://widget/red-text.html&quot;,<br>      {},<br>      async () =&gt; ({<br>        contents: [<br>          {<br>            uri: &quot;ui://widget/red-text.html&quot;,<br>            mimeType: &quot;text/html+skybridge&quot;,<br>            text: `<br>                &lt;script&gt;<br>                  // This listener waits for the AI model&#39;s context/data to be passed<br>                  window.addEventListener(&quot;openai:set_globals&quot;, () =&gt; {<br>                    const textElement = document.getElementById(&quot;text&quot;);<br>                    // Access the tool input from the window.openai object<br>                    if (window.openai?.toolInput?.text) {<br>                      textElement.innerText = window.openai.toolInput.text;<br>                    } else {<br>                      textElement.innerText = &quot;No text was provided.&quot;;<br>                    }<br>                  });<br>                &lt;/script&gt;<br>                <br>                &lt;h1 style=&quot;color: red;&quot; id=&quot;text&quot;&gt;&lt;/h1&gt;`, // The actual widget HTML<br>          },<br>        ],<br>      })<br>    );</pre><pre>    // 2. REGISTER THE AI TOOL<br>    server.registerTool(<br>      &quot;make-text-red&quot;, // Tool name updated here<br>      {<br>        title: &quot;Make text red&quot;,<br>        description:<br>          &quot;Takes a string of text provided by the user and displays it in red inside a UI widget. &quot; +<br>          &quot;If the user does not provide any text, do not call this tool.&quot;,<br>        _meta: {<br>          &quot;openai/outputTemplate&quot;: &quot;ui://widget/red-text.html&quot;, // Links the tool to the UI resource<br>          &quot;openai/toolInvocation/invoking&quot;: &quot;Loading red text&quot;,<br>          &quot;openai/toolInvocation/invoked&quot;: &quot;Loaded red text&quot;,<br>          &quot;openai/requirePermission&quot;: false,<br>        },<br>        inputSchema: { // Defines the required input for the AI<br>          text: z.string().describe(<br>            &quot;The text that the user wants to be displayed in red. Extract this from the user&#39;s prompt.&quot;<br>          ),<br>        },<br>        annotations: {<br>          destructiveHint: false,<br>          openWorldHint: false,<br>          readOnlyHint: true,<br>        },<br>      },<br>      async ({ text }) =&gt; {<br>        const safe = text;</pre><pre>        return {<br>          // The data passed to the template renderer<br>          data: { text: safe },</pre><pre>          // Fallback content for chat-like renderers<br>          content: [<br>            { type: &quot;text&quot;, text: `Making text red: ${safe}` },<br>          ],<br>        };<br>      }<br>    );<br>    </pre><pre>    await server.connect(transport);<br>    await transport.handleRequest(req, res, req.body);<br>  } catch (error) {<br>    console.error(&quot;Error handling MCP request:&quot;, error);<br>    if (!res.headersSent) {<br>      res.status(500).json({<br>        jsonrpc: &quot;2.0&quot;,<br>        error: {<br>          code: -32603,<br>          message: &quot;Internal server error&quot;,<br>        },<br>        id: null,<br>      });<br>    }<br>  }<br>});</pre><pre>app.listen(3000, () =&gt; {<br>    console.log(&quot;MCP Server running on port 3000&quot;);<br>});</pre><h3>🚀 Putting It All Together: Using Your Custom Widget</h3><p>Once you have deployed this application (e.g., to a publicly accessible server that your AI model can reach), you can then instruct your AI.</p><p>For example, you could tell an AI (like ChatGPT with MCP capabilities):</p><blockquote><em>“use make text red tool to show random quote”</em></blockquote><p>The AI would then invoke your make-text-red tool, providing a random quote it generates as the text input. Your custom widget would then render this quote in bold red text, along with any fallback content the AI provides.</p><p>Here’s an example of what that might look like in the AI’s interface:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*14U_BIdWbxDlp2-naa__cQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=971cdc0ebbfc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>