
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 分