
Agentcast
io.github.MukundaKatta由 GitHub 帳號 MukundaKatta 發布v0.1.0更新於 Oct 24, 2026
Structured-output enforcer: extract and validate JSON from messy LLM text.
概覽
本機 MCP 伺服器,協助助理從雜亂的模型輸出中擷取 JSON、依形狀規格驗證,並產生重試回饋。
- 可以做什麼
- 從雜亂的模型文字中擷取 JSON 值,依序嘗試整段文字、圍欄程式碼區塊、最大的成對物件或陣列,並回報成功的策略。
- 依形狀規格驗證已解析的值,規格把欄位名稱對應到 string、number、boolean、array 或 object,選填欄位以尾碼標示。
- 依嘗試紀錄與預期形狀產生重試回饋訊息,讓用戶端自行驅動「以驗證錯誤作為回饋」的迴圈。
- 適用情境
- 當助理或代理流程預期模型回傳結構化 JSON,而模型有時把 JSON 包在說明文字或程式碼圍欄中、或回傳錯誤欄位時適用;希望由工具處理擷取、形狀檢查與重試提示,而非臨時拼湊解析邏輯。
- 執行需求
- 以本機 stdio 程序執行,通常透過 npx 從 npm 套件啟動或全域安裝;需要 Node.js 以及 Claude Desktop、Cursor、Cline、Windsurf、Zed 等 MCP 用戶端。未宣告驗證、環境變數或標頭。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Agentcast,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
agentcast-mcp
An MCP server that gives AI assistants the ability to enforce structured output: extract JSON from messy LLM text, gate it against a shape spec, and produce the retry feedback message when the model returns the wrong shape.
Built on top of
@mukundakatta/agentcast. Works
with Claude Desktop, Cursor, Cline, Windsurf, Zed, and any other MCP client.
Tools exposed
extract_json
Pull a JSON value out of messy LLM output. Tries the whole text, then a
fenced ```json ``` block, then the largest balanced {...} / [...]
substring. Returns the parsed value plus which strategy succeeded.
→
source is one of whole, fenced_json, fenced_plain,
balanced_substring, or none.
validate_response
Validate a parsed JSON value against an agentcast shape spec. Spec maps field
name to type: string, number, boolean, array, object. Suffix with
? for optional.
→
build_retry_prompt
Given an attempt history, produce the validation-error feedback message agentcast appends to the conversation when the model returned the wrong shape. Codifies the "validation error as feedback" pattern for non-Node MCP clients that want to drive the same retry loop manually.
→
Install
Claude Desktop
Add to claude_desktop_config.json:
Cursor / Cline / Windsurf / Zed
Same shape, in the appropriate mcp.json for your client. Most clients
auto-discover via npx -y @mukundakatta/agentcast-mcp.
Local install
Why this matters
When an LLM is supposed to return structured data, it sometimes wraps the
JSON in prose, fences, or hallucinated fields. Standard JSON.parse throws.
Hand-rolled regex misses nested structure. This MCP server gives any model
driving an agent a real handle on (1) pulling JSON out of the response,
(2) checking it matches the expected shape, and (3) building the exact retry
prompt that nudges the model to fix it on the next turn.
License
MIT.
來源:README.md,提交 f9f4eb8
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分