forgespec-mcp
ForgeSpec MCP
マルチエージェントAI開発のための調整バックボーン。 ForgeSpec MCPは、Model Context Protocolサーバーであり、仕様駆動開発(SDD)を通じて、AIを活用したソフトウェアエンジニアリングに構造化された監査可能なワークフローをもたらします。
なぜForgeSpecなのか?
複数のAIエージェント(Claude、Codex、Geminiなど)を使用してソフトウェアを構築すると、単一エージェントのワークフローには存在しない調整上の課題が生じます:
問題 | ForgeSpecなし | ForgeSpecあり |
競合する編集 | 2つのエージェントが同時に同じファイルを変更し、マージ競合や作業の損失が発生する | TTL付きのファイル予約システムにより、競合が発生する前に防止 |
共有コンテキストの欠如 | 各エージェントが孤立して作業し、あるエージェントの決定が他から見えない | 契約検証により、全フェーズにわたる共有監査証跡を作成 |
非構造化作業 | エージェントが仕様なしで直接コードに取り掛かり、一貫性のない結果を生む | 9段階のパイプラインが「提案→仕様→設計→実装」の流れを強制 |
進捗の喪失 | エージェントがタスクの途中で失敗した場合、中断したところから再開する方法がない | SQLiteベースのタスクボードが状態を保持し、どのエージェントでも中断箇所から引き継ぎ可能 |
品質ゲートの欠如 | 元の要件に対する検証なしでコードがリリースされる | 信頼度しきい値により、品質基準を満たすまでフェーズ移行をブロック |
主な利点
インフラ不要 -- SQLiteデータベースを内蔵しており、外部サービスは不要
普遍的な互換性 -- Claude Code、Codex CLI、Gemini CLI、OpenClawなど、あらゆるMCPクライアントで動作
即時セットアップ -- 1つのコマンドで開始:
npx -y forgespec-mcp実戦で鍛えられたパイプライン -- 信頼度しきい値を持つ9つのフェーズが、時期尚早なフェーズ移行を防止
監査証跡 -- すべての契約、タスクの移行、ファイル予約がタイムスタンプ付きで記録される
クロスプラットフォーム -- Node 18、20、22を搭載したUbuntu、Windows、macOSでテスト済み
Cortex対応 -- Cortexとのネイティブ統合により、セッション間での永続的なメモリとナレッジグラフを実現
Related MCP server: Specky
推奨:Cortexとの併用
ForgeSpecはワークフロー(契約、タスク、ファイルロック)を管理します。Cortexはメモリ(観測、ナレッジグラフ、セッションの継続性)を管理します。これらを組み合わせることで、完全なマルチエージェント調整スタックが形成されます:
┌─────────────────────────────────────────────────────┐
│ MCP Clients │
│ Claude Code · Codex CLI · Gemini CLI · ... │
└──────────┬──────────────────────────┬───────────────┘
│ │
┌─────▼─────┐ ┌──────▼──────┐
│ ForgeSpec │ │ Cortex │
│ MCP │◄──────────►│ MCP │
│ │ artifact │ │
│ Contracts │ type: │ Observations│
│ Task Board │ "cortex" │ Knowledge │
│ File Locks │ │ Graph │
└────────────┘ └─────────────┘ForgeSpecはSDD契約を検証・永続化し、タスクの依存関係を管理し、ファイルの競合を防ぎます
Cortexはアーティファクトを観測として保存し、ナレッジグラフを通じてそれらを接続し、セッションの復元を可能にします
type: "cortex"で保存されたアーティファクトは、mem_saveを通じてCortexに永続化され、mem_relateでリンクされます
フル体験のために両方をインストールしてください:
claude mcp add forgespec --transport stdio -- npx -y forgespec-mcp
claude mcp add cortex --transport stdio -- npx -y @anthropic/cortex-mcpForgeSpecはCortexなしでもスタンドアロンで動作します。アーティファクトは
type: "openspec"(ファイルシステム)またはtype: "inline"(レスポンスで返される)を使用することもできます。
クイックスタート
npxを使用する場合(インストール不要)
npx -y forgespec-mcpグローバルインストール
npm install -g forgespec-mcpインストールの確認
forgespec-mcp --helpクライアント設定
Claude Code
claude mcp add forgespec --transport stdio -- npx -y forgespec-mcpCodex CLI (~/.codex/config.toml)
[mcp_servers.forgespec]
command = "npx"
args = ["-y", "forgespec-mcp"]Gemini CLI (settings.json)
{
"mcpServers": {
"forgespec": {
"command": "npx",
"args": ["-y", "forgespec-mcp"]
}
}
}OpenClaw (openclaw.json)
mcp: {
servers: {
forgespec: { command: "npx", args: ["-y", "forgespec-mcp"] }
}
}SDDパイプライン
ForgeSpecは仕様駆動開発ライフサイクルを強制します。これは、AIエージェントが直接コードに取り掛かるのではなく、体系的に作業することを保証する9段階のパイプラインです。
各フェーズには、次のフェーズに移行するために満たさなければならない信頼度しきい値があります:
フェーズ | しきい値 | 目的 |
| 0.5 | プロジェクトのコンテキストと規約をブートストラップする |
| 0.5 | コードベースを調査し、問題を診断する |
| 0.7 | スコープとリスクを含む変更案を起草する |
| 0.8 | Given/When/Thenを用いた詳細な仕様を記述する |
| 0.7 | アーキテクチャ、データフロー、ファイル変更を定義する |
| 0.8 | 依存関係順に実装タスクを分解する |
| 0.6 | 実装を実行する(部分的な完了も許可) |
| 0.9 | 仕様に対して実装を検証する |
| 0.9 | 仕様をマージし、振り返りを生成する |
ツールリファレンス
ForgeSpecは、3つのカテゴリに分類された15個のMCPツールを公開しています。
SDD契約ツール (5)
型定義され、検証された契約で開発ライフサイクルを管理します。
ツール | 説明 |
| 信頼度チェックを行い、フェーズスキーマに対して契約を検証する |
| 契約を検証し、データベースに永続化する |
| IDで単一の契約を取得する |
| プロジェクト/フェーズフィルタを指定して契約を一覧表示する |
| プロジェクトのフェーズ移行履歴を取得する |
タスクボードツール (8)
依存関係追跡と自動ブロック解除を備えたSQLiteベースのタスク管理。
ツール | 説明 |
| オプションのインラインタスクを含むボードを作成する(アトミックで、N回の個別の呼び出しを回避) |
| 優先度、仕様参照、基準、依存関係を指定してタスクを追加する |
| ステータスごとにグループ化されたタスクを含むボードステータスを取得する |
| タスクを要求する(割り当て前に依存関係を検証) |
| ステータスを更新し、タイムスタンプ付きのメモを追加する(完了時に依存先を自動的にブロック解除) |
| 作業可能なタスクを一覧表示する(すべての依存関係が解決済み) |
| IDでタスクの詳細を取得する |
| すべてのボードを一覧表示する(コンテキスト喪失後の発見用) |
ファイル予約ツール (2)
マルチエージェントの編集競合を防ぐためのアドバイザリーファイルロック。
ツール | 説明 |
| TTLを指定してファイル/グロブを予約する。予約せずに競合を確認するには |
| 予約を解放する(特定のパターンまたはすべて) |
使用例
例1: SDD契約の検証と保存
「propose」フェーズを完了したAIエージェントが、作業を検証済み契約として保存します:
// Tool: sdd_validate
{
"contract": "{\"phase\":\"propose\",\"change_name\":\"add-auth-service\",\"project\":\"my-app\",\"status\":\"success\",\"confidence\":0.85,\"executive_summary\":\"Add JWT-based authentication service with login, logout, and token refresh endpoints. Affects 4 files in src/auth/.\",\"artifacts_saved\":[{\"topic_key\":\"sdd/add-auth-service/proposal\",\"type\":\"cortex\"}],\"next_recommended\":[\"spec\",\"design\"],\"risks\":[{\"description\":\"Token storage strategy needs security review\",\"level\":\"medium\"}]}"
}
// Response:
{
"valid": true,
"phase": "propose",
"confidence": 0.85,
"threshold": 0.7,
"meets_confidence": true,
"allowed_next_phases": ["spec", "design", "init"],
"warnings": []
}// Tool: sdd_save (after validation)
{
"contract": "{\"phase\":\"propose\",\"change_name\":\"add-auth-service\",\"project\":\"my-app\",\"status\":\"success\",\"confidence\":0.85,\"executive_summary\":\"Add JWT-based authentication service...\",\"next_recommended\":[\"spec\",\"design\"],\"risks\":[]}"
}
// Response:
{
"saved": true,
"id": "sdd_a1b2c3d4-...",
"phase": "propose",
"project": "my-app"
}例2: タスクボードの作成とタスク管理
ボードをセットアップし、依存関係を持つタスクを追加し、エージェントに作業を要求させます:
// Step 1: Create a board
// Tool: tb_create_board
{ "project": "my-app", "name": "add-auth-service" }
// -> { "created": true, "board_id": "board_x7k9m2...", "project": "my-app" }
// Step 2: Add tasks with dependencies
// Tool: tb_add_task
{
"board_id": "board_x7k9m2...",
"title": "Create JWT utility module",
"description": "Implement sign, verify, and refresh token functions",
"priority": "p0",
"spec_ref": "sdd/add-auth-service/spec",
"acceptance_criteria": "All token operations pass unit tests",
"dependencies": []
}
// -> { "created": true, "task_id": "task_abc123...", "priority": "p0" }
// Tool: tb_add_task
{
"board_id": "board_x7k9m2...",
"title": "Build auth middleware",
"priority": "p1",
"acceptance_criteria": "Middleware validates tokens on protected routes",
"dependencies": ["task_abc123..."] // depends on JWT module
}
// -> { "created": true, "task_id": "task_def456..." }
// Step 3: Agent claims a task
// Tool: tb_claim
{ "task_id": "task_abc123...", "agent": "implement-agent-1" }
// -> { "claimed": true, "task_id": "task_abc123...", "status": "in_progress" }
// Step 4: Mark task done (auto-unblocks dependents)
// Tool: tb_update
{ "task_id": "task_abc123...", "status": "done", "notes": "JWT module complete with RS256 support" }
// -> { "updated": true, "unblocked_tasks": ["task_def456..."] }
// task_def456 automatically moves from "backlog" to "ready"例3: エージェント間のファイル競合の防止
並行して作業する2つのエージェントが、ファイル予約を使用して競合を回避します:
// Agent 1 checks then reserves auth files (two-phase pattern)
// Tool: file_reserve (check_only)
{
"patterns": ["src/auth/**", "src/middleware/auth.ts"],
"agent": "implement-agent-1",
"check_only": true
}
// -> { "reserved": false, "has_conflicts": false, "conflicts": [] }
// No conflicts — proceed to reserve
// Tool: file_reserve
{
"patterns": ["src/auth/**", "src/middleware/auth.ts"],
"agent": "implement-agent-1",
"ttl_minutes": 30
}
// -> { "reserved": true, "has_conflicts": false, "expires_at": "2025-01-15T10:30:00.000Z" }
// Agent 2 checks before editing
// Tool: file_reserve (check_only)
{
"patterns": ["src/auth/jwt.ts"],
"agent": "implement-agent-2",
"check_only": true
}
// -> { "reserved": false, "has_conflicts": true, "conflicts": [{ "pattern": "src/auth/**", "held_by": "implement-agent-1" }] }
// Agent 2 knows to work on something else
// Agent 1 finishes and releases
// Tool: file_release
{ "agent": "implement-agent-1" }
// -> { "released": true, "count": 2 }例4: プロジェクトのフェーズ履歴の追跡
変更がパイプラインを通じてどのように進んだかを確認します:
// Tool: sdd_history
{ "project": "my-app", "limit": 5 }
// Response:
{
"project": "my-app",
"history": [
{ "id": "sdd_...", "phase": "verify", "change_name": "add-auth-service", "status": "success", "confidence": 0.92, "created_at": "2025-01-15T10:45:00Z" },
{ "id": "sdd_...", "phase": "apply", "change_name": "add-auth-service", "status": "success", "confidence": 0.78, "created_at": "2025-01-15T10:30:00Z" },
{ "id": "sdd_...", "phase": "tasks", "change_name": "add-auth-service", "status": "success", "confidence": 0.88, "created_at": "2025-01-15T09:15:00Z" },
{ "id": "sdd_...", "phase": "spec", "change_name": "add-auth-service", "status": "success", "confidence": 0.85, "created_at": "2025-01-15T09:00:00Z" },
{ "id": "sdd_...", "phase": "propose","change_name": "add-auth-service", "status": "success", "confidence": 0.85, "created_at": "2025-01-15T08:30:00Z" }
]
}環境変数
変数 | デフォルト | 説明 |
|
| データベースストレージ用のディレクトリ |
|
| SQLiteデータベースへのフルパス |
アーキテクチャ
forgespec-mcp
├── src/
│ ├── index.ts # Entry point: stdio transport
│ ├── server.ts # MCP server setup and tool registration
│ ├── types/index.ts # Zod schemas, phase config, type definitions
│ ├── database/index.ts # SQLite init, WAL mode, schema creation
│ ├── tools/
│ │ ├── sdd-contracts.ts # 5 contract lifecycle tools
│ │ ├── task-board.ts # 8 task management tools
│ │ └── file-reservation.ts # 2 file locking tools
│ └── utils/id.ts # Prefixed UUID generation
└── tests/
├── sdd-contracts.test.ts # Schema and phase transition tests
└── tools.test.ts # Integration tests for all CRUD operations技術スタック:
Model Context Protocol SDK -- MCPサーバーフレームワーク
better-sqlite3 -- WALモードを備えた組み込みデータベース
Zod -- ランタイムスキーマ検証
Vitest -- v8カバレッジを備えたテストフレームワーク
開発
# Clone the repository
git clone https://github.com/lleontor705/forgespec-mcp.git
cd forgespec-mcp
# Install dependencies
npm install
# Run in development mode (hot reload)
npm run dev
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Build for production
npm run build
# Open MCP Inspector for debugging
npm run inspect新バージョンのリリース
ForgeSpecは、Conventional Commitsに基づいた自動セマンティックバージョニングのためにstandard-versionを使用しています。
# Commits determine the version bump automatically:
# fix: ... -> patch (1.2.0 -> 1.2.1)
# feat: ... -> minor (1.2.0 -> 1.3.0)
# feat!: ... -> major (1.2.0 -> 2.0.0)
# Create a release (bumps version, updates CHANGELOG, creates git tag)
npm run release
# Or specify the bump type manually
npm run release -- --release-as minor
npm run release -- --release-as major
# First release from current version
npm run release -- --first-release
# Push with tags to trigger CI/CD
git push --follow-tags origin masterCI/CDパイプラインはその後、以下を実行します:
Node 18、20、22を使用してUbuntu/Windows/macOSでテストを実行
本番環境の承認を待機
出所(provenance)を付けてnpmに公開
自動生成されたノートを含むGitHubリリースを作成
貢献
リポジトリをフォークする
フィーチャーブランチを作成する:
git checkout -b feature/my-featureメッセージにはConventional Commitsを使用する:
feat: add new tool for Xfix: resolve race condition in file reservationdocs: update usage examples
テストを実行する:
npm testプッシュしてプルリクエストを開く
ライセンス
MIT -- lleontor705によって構築
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
- AlicenseNot gradedqualityCmaintenanceEnables spec-driven development workflows with AI assistants, providing tools for managing specification lifecycles, task dependencies, code navigation, testing, and automated reviews through a unified CLI and MCP interface.4MIT
- AlicenseAqualityAmaintenanceAn MCP server for Spec-Driven Development that transforms natural language ideas and meeting transcripts into structured, production-grade specifications using EARS notation. It automates a 7-phase pipeline to generate project artifacts like requirements, architecture designs, and task lists directly to disk.5811017MIT
- AlicenseNot gradedqualityAmaintenanceCentralized MCP server for spec-driven AI agent workflows, enabling isolated feature management, task tracking, and implementation with handoff and archiving capabilities across multiple projects and developers.571MIT
- AlicenseNot gradedqualityDmaintenanceTransforms AI agents into spec-driven product engineers by managing the software project lifecycle through requirements, design, implementation, and archiving phases with state-aware MCP tools.40MIT
Related MCP Connectors
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
A MCP server built for developers enabling Git based project management with project and personal…
Workflow diagnostics, capability routing, and x402 settlement for MCP-compatible agents.
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/lleontor705/forgespec-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server