agentcast-mcp
agentcast-mcp
一个 MCP 服务器,使 AI 助手能够强制执行结构化输出:从混乱的 LLM 文本中提取 JSON,根据形状规范进行门控,并在模型返回错误形状时生成重试反馈消息。
构建于 @mukundakatta/agentcast 之上。适用于 Claude Desktop、Cursor、Cline、Windsurf、Zed 以及任何其他 MCP 客户端。
公开的工具
extract_json
从混乱的 LLM 输出中提取 JSON 值。尝试整个文本,然后是带围栏的 ```json ``` 块,最后是最大的平衡 {...} / [...] 子字符串。返回解析后的值以及成功的策略。
{
"text": "Sure, here you go:\n```json\n{\"answer\": 42}\n```\nLet me know!"
}→
{
"value": { "answer": 42 },
"found": true,
"source": "fenced_json"
}source 是 whole、fenced_json、fenced_plain、balanced_substring 或 none 之一。
validate_response
根据 agentcast 形状规范验证解析后的 JSON 值。规范将字段名称映射到类型:string、number、boolean、array、object。后缀加 ? 表示可选。
{
"value": { "name": "ada" },
"shape": { "name": "string", "age": "number" }
}→
{
"valid": false,
"error": "missing required field 'age'"
}build_retry_prompt
给定尝试历史记录,生成当模型返回错误形状时 agentcast 附加到对话中的验证错误反馈消息。为希望手动驱动相同重试循环的非 Node MCP 客户端编纂了“验证错误作为反馈”模式。
{
"attempts": [
{ "text": "{\"name\":\"ada\"}", "error": "missing required field 'age'" }
],
"expected_shape": { "name": "string", "age": "number" }
}→
{
"feedback": "Your previous response did not match the required shape. Error: missing required field 'age'\n\nTry again. Respond with ONLY valid JSON that fixes the error above.\n\nExpected shape: {\"name\":\"string\",\"age\":\"number\"}"
}Related MCP server: JSONShelf
安装
Claude Desktop
添加到 claude_desktop_config.json:
{
"mcpServers": {
"agentcast": {
"command": "npx",
"args": ["-y", "@mukundakatta/agentcast-mcp"]
}
}
}Cursor / Cline / Windsurf / Zed
相同的形状,在您客户端对应的 mcp.json 中。大多数客户端通过 npx -y @mukundakatta/agentcast-mcp 自动发现。
本地安装
npm install -g @mukundakatta/agentcast-mcp
mcp-agentcast # listens on stdio为什么这很重要
当 LLM 应该返回结构化数据时,它有时会用散文、围栏或幻觉字段包裹 JSON。标准的 JSON.parse 会抛出错误。手动编写的正则表达式会错过嵌套结构。此 MCP 服务器为驱动代理的任何模型提供了真正的控制权,用于 (1) 从响应中提取 JSON,(2) 检查它是否符合预期的形状,以及 (3) 构建精确的重试提示,引导模型在下一轮中修复它。
许可证
MIT。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceExtracts structured key-value pairs from arbitrary, noisy, or unstructured text using LLMs and provides output in multiple formats (JSON, YAML, TOML) with type safety.1GPL 3.0
- Flicense-quality-maintenanceDeterministic JSON repair, validation, example-generation, and schema-coercion for AI agents — zero LLM calls, sub-10ms, $0.0005 per call.
- Alicense-qualityCmaintenanceDeterministic JSON validation and repair for AI agents. Validates, repairs, schema-checks, and diffs JSON so long-running agents don't corrupt their session state with malformed writes.MIT

perf-mcpofficial
AlicenseAqualityDmaintenanceFact-checks and fixes AI outputs by catching hallucinations, repairing broken JSON, and correcting errors before they reach users, with tools for verification, validation, and correction.444MIT
Related MCP Connectors
Deterministic JSON repair, validate, example-gen, schema-coerce for agents. Zero LLM, sub-10ms.
Repair malformed JSON from LLM/agent output; optional JSON Schema coercion. Free + x402 paid.
Deterministic validation for AI-generated artifacts: JSON Schema, OpenAPI response, SQL syntax.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MukundaKatta/agentcast-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server