Skip to main content
Glama

agentcast-mcp

npm tests mcp

AIアシスタントに構造化出力を強制する機能を提供するMCPサーバーです。雑多なLLMテキストからJSONを抽出し、形状仕様(shape spec)に基づいてゲート制御を行い、モデルが誤った形状を返した際に再試行用のフィードバックメッセージを生成します。

@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"
}

sourcewholefenced_jsonfenced_plainbalanced_substring、またはnoneのいずれかです。

validate_response

パースされたJSON値をagentcastの形状仕様(shape spec)に対して検証します。仕様はフィールド名を型(stringnumberbooleanarrayobject)にマッピングします。末尾に?を付けると任意項目になります。

{
  "value": { "name": "ada" },
  "shape": { "name": "string", "age": "number" }
}

{
  "valid": false,
  "error": "missing required field 'age'"
}

build_retry_prompt

試行履歴に基づき、モデルが誤った形状を返した際にagentcastが会話に追加する検証エラーのフィードバックメッセージを生成します。手動で同じ再試行ループを実行したいNode.js以外の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。

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    -
    quality
    C
    maintenance
    Deterministic 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
  • A
    license
    A
    quality
    D
    maintenance
    Fact-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.
    4
    44
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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