Prism Context Panel
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Prism-context-panel-chatgpt
用一只动态水瓶展示上下文用量。面板提供四套配色和一个可交互的 Clawd 像素伙伴。可以直接离线打开,也可以通过 MCP 工具返回给支持组件的客户端。
作者
项目作者:LILTJAYGOIN。ChatGPT 参与了移植开发、代码审查和测试。上游 Obsidian Prism 作者为 RMvdesi。
Related MCP server: mcp-apps-claude-demo
快速体验
打开仓库中的 preview.html,点击 Download raw file 保存 HTML,再用浏览器打开。下载整个仓库时,请先解压,再打开其中的 preview.html。页面自带渲染器,示例用量为 12,500 / 50,000 tokens。点击主题按钮切换配色,点击伙伴观察水面变化。
使用方式 | 数据来源与验证范围 |
离线预览 | 内置示例,已在 Windows Edge 验证。 |
ChatGPT 对话组件 | MCP 工具接收显式提供的已用量和容量。缺少指标时显示“用量未知”。已通过本地协议与 iframe 测试,桌面端注册和实机联调待验证。 |
Codex 回放 | 从指定线程的 App Server 事件生成 HTML 快照。实时订阅仍待开发。 |
在本地运行 MCP 服务
以下命令适用于 Windows PowerShell。开发验证使用 Python 3.14。服务端依赖锁定在 requirements.txt。
python -m venv .venv
.\.venv\Scripts\python -m pip install -r requirements.txt
.\.venv\Scripts\python server.py默认端点为本机的 http://127.0.0.1:8765/mcp。本地 stdio 客户端可改用 python server.py --stdio。工具 prism_show_vial 接受两个整数,例如 {"used":12500,"capacity":50000};传入空对象时显示未知。连接远程宿主需要另行配置可访问的服务地址。
用 Codex 事件生成快照
回放只依赖 Python 标准库。以下命令可直接运行,输出文件名须尚未存在。
'{"method":"thread/tokenUsage/updated","params":{"threadId":"demo","tokenUsage":{"last":{"totalTokens":12500},"modelContextWindow":50000}}}' | python replay.py --thread demo --output vial.html也可用 Get-Content events.jsonl | python replay.py --thread THREAD_ID --output vial.html 读取已有事件。分子取目标线程最近一次调用的 last.totalTokens,分母取 modelContextWindow。事件文件可仅包含用量通知。
开发与验证
widget.html 定义界面和宿主桥接。panel.py 组装组件并解析用量。server.py 注册 MCP 工具和 UI 资源。服务在首次请求时缓存空模板,修改界面后需重启本地服务。
.\.venv\Scripts\python -B -m unittest -v test_port test_widget_edge
.\.venv\Scripts\python -B -c "from panel import ROOT,widget,snapshot; (ROOT/'preview.html').write_text(widget(snapshot(12500,50000,'demo')),encoding='utf-8')"浏览器用例在独立的 Edge 临时配置中运行。找不到 Windows Edge 时会跳过该用例。测试覆盖用量边界、模板转义、连续推送、重复推送、组件尺寸与外链请求。
上游、移植范围与许可证
本项目于 2026-12-02 独立适配,源自 RMvdesi 的 Obsidian Prism 固定提交。水瓶核心保留上游原文件,Clawd 造型复用其 16×10 点阵。四套主题、按钮反馈、伙伴动作、宿主桥接和回放工具为本项目实现。界面作用域为组件内部。详细设计见移植分析页。
项目采用 GPL-3.0-only。原作者及第三方贡献者署名见 NOTICE 和 THIRD_PARTY_NOTICES.md。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Build, deploy, and operate hosted web apps on VibeKit (vibekit.bot) from any MCP client.
Build your own tools from chat: design, test and host them on a shareable MCP server URL.
Dashboards as data. Author, validate, render, and share dvt dashboards from any MCP client.
- VULKDeprecatedio.github.devjoaocastro
Generate, edit, and deploy immersive 3D/WebGL web projects from any MCP assistant.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceRender live algorithmic visualizations directly in your AI chats via MCP.-
- AlicenseNot gradedqualityDmaintenanceA minimal, dependency-free MCP server that renders interactive widgets (like bar charts) inline in Claude, ChatGPT, and Grok from a custom connector.1MIT
- AlicenseAqualityDmaintenanceMCP server that lets agents create, display, and export rich UI widgets (cards, dashboards, charts, forms) inline in conversations, with interactive iframe support in MCP Apps hosts and PNG image fallback for other clients.3MIT
- FlicenseNot gradedqualityDmaintenanceEnables rendering interactive UI widgets and data visualizations for Claude.ai through MCP, supporting callback-based forms and client-side charts.-