MCPサーバー - Archyl Docs

Claude、Cursor、VS CodeなどのAIアシスタントをアーキテクチャに接続 — C4モデル、ADR、コントラクト、コンフォーマンス、ドリフト、DORAなどを網羅した181のツール

MCPサーバー

Archylは、AIアシスタントがアーキテクチャドキュメントと対話できるModel Context Protocol(MCP)サーバーを提供しています。これにより、AIを活用した強力なアーキテクチャの探索とドキュメント作成が可能になります。

MCPとは?

Model Context Protocol(MCP)は、AIアシスタントが外部ツールやデータソースに安全にアクセスできるオープンプロトコルです。ArchylのMCPサーバーを使用すると、AIアシスタントは以下のことができます:

  • プロジェクトとその完全なC4モデルの閲覧とクエリ
  • アーキテクチャ要素、リレーションシップ、ダイアグラムの作成と変更
  • ADR、ドキュメント、APIコントラクト、イベントチャネルの読み書き
  • コードを書く前のコンフォーマンスルール、ドリフトスコア、DORAメトリクス、オーナーシップの確認
  • リリース、変更リクエスト、コメント、履歴の追跡

対応クライアント

ArchylのMCPサーバーは以下で動作します:

  • Antigravity - GoogleのAI搭載IDE
  • Claude Code - AnthropicのCLIツール
  • Claude Desktop - Claudeのデスクトップアプリケーション
  • Cursor - AIファーストのコードエディタ
  • OpenAI Codex - OpenAIのAIコーディングアシスタント
  • VS Code - GitHub Copilot Chat連携
  • Warp - AI統合のモダンターミナル
  • Windsurf - CodeiumのAI搭載IDE

認証

APIキー(推奨)

ほとんどのクライアントはAPIキーで認証します。使用するツールに応じて:

  • ヘッダー対応ツール(Claude Code、Cursor、Warp、Windsurf、Antigravity): X-API-Key ヘッダーを使用
  • ヘッダー非対応ツール(Claude Desktop、VS Code、OpenAI Codex): URLに ?apiKey=YOUR_API_KEY クエリパラメータを使用

プロフィール → APIキー ページからAPIキーを生成してください。

キーのスコープによってアシスタントができることが決まります。読み取り専用のキーはすべての list_* および get_* ツールを呼び出せますが、create_*update_*delete_*import_dsl には書き込みスコープを持つキーが必要です。読み取り専用のキーをエージェントに渡すのが、アーキテクチャを変更させることなく探索させる最もシンプルな方法です。

OAuth 2.1

このサーバーは、キーを貼り付けるのではなくブラウザでのサインインを通じて接続するクライアント向けに、動的クライアント登録に対応したOAuth 2.1も実装しています(mcp:readmcp:write のスコープは、上記のAPIキーのスコープに対応しています)。そうしたクライアントを同じエンドポイントに向けると、以下を通じてフローが自動的に検出されます:

https://api.archyl.com/.well-known/oauth-authorization-server
https://api.archyl.com/.well-known/oauth-protected-resource

セットアップ

Antigravity

  1. Antigravityを開き、Agentパネルの「...」メニューをクリック
  2. 「MCP Servers」 > 「Manage MCP Servers」 > 「View raw config」を選択
  3. ~/.gemini/antigravity/mcp_config.json に追加:
{
  "mcpServers": {
    "archyl": {
      "serverUrl": "https://api.archyl.com/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
  1. Antigravityを再起動して変更を適用

注意: AntigravityはHTTPベースのMCPサーバーに url ではなく serverUrl を使用します。

Claude Code

プロジェクトルートに .mcp.json ファイルを作成:

{
  "mcpServers": {
    "archyl": {
      "type": "http",
      "url": "https://api.archyl.com/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Claude Codeを実行すると、MCPサーバーが自動検出されます。

Claude Desktop

  1. Claude Desktopの設定を開く
  2. Developer → MCP Servers に移動
  3. 「Add Server」をクリックして追加:
{
  "mcpServers": {
    "archyl": {
      "url": "https://api.archyl.com/mcp?apiKey=YOUR_API_KEY"
    }
  }
}
  1. Claude Desktopを再起動

注意: Claude Desktopのリモートコネクタはカスタムヘッダーをサポートしていないため、APIキーはURLクエリパラメータとして渡す必要があります。

Cursor

プロジェクトに .cursor/mcp.json ファイルを作成:

{
  "mcpServers": {
    "archyl": {
      "url": "https://api.archyl.com/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Cursorを再起動してMCPサーバーを読み込みます。

OpenAI Codex

~/.codex/config.toml を開くか作成して追加:

[mcp_servers.archyl]
url = "https://api.archyl.com/mcp?apiKey=YOUR_API_KEY"

Codex CLIまたはIDEを再起動して変更を適用します。

VS Code

  1. VS Codeの設定を開く(Cmd/Ctrl + ,)
  2. 「MCP」を検索して「Edit in settings.json」をクリック
  3. 以下を追加:
{
  "mcp": {
    "servers": {
      "archyl": {
        "url": "https://api.archyl.com/mcp?apiKey=YOUR_API_KEY"
      }
    }
  }
}

Warp

  1. Warpを開き、Settings > MCP Servers に移動
  2. 「Add Server」をクリックして設定を貼り付け:
{
  "archyl": {
    "url": "https://api.archyl.com/mcp",
    "headers": {
      "X-API-Key": "YOUR_API_KEY"
    }
  }
}
  1. Warpを再起動して変更を適用

Windsurf

~/.codeium/windsurf/mcp_config.json のMCP設定ファイルを開く:

{
  "mcpServers": {
    "archyl": {
      "serverUrl": "https://api.archyl.com/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Windsurfを再起動して変更を適用します。

ツールリファレンス

サーバーは181のツールを公開しています。予測しやすい命名規則に従っているため、アシスタントは通常、適切なツールを推測できます:

プレフィックス 機能 必要なスコープ
list_* 特定の種類の項目を(通常はプロジェクト内で)一覧表示 読み取り
get_* 1つの項目をリンクを含めて完全に取得 読み取り
create_* 新しい項目を作成 書き込み
update_* 既存の項目を変更 書き込み
delete_* 項目(およびその従属項目)を削除 書き込み
link_* / unlink_* アーティファクトをC4要素に紐付け/紐付け解除 書き込み

プロジェクトスコープのツールの多くは projectId を受け取り、要素スコープのツールは elementIdelementType(C4レベル: 1 = システム、2 = コンテナ、3 = コンポーネント、4 = コード)を受け取ります。まずアシスタントに list_projects を呼び出すよう依頼してください。必要なIDはそこから取得されます。

クライアントはこの一覧を tools/list 経由で自動的に検出するため、常にサーバーと同期しています。以下の表は、何を依頼すべきかを人が判断するためのものです。

ツールプロファイル

189 個のツールは、限定されたタスクを行うコーディングエージェントに必要な数を超えており、すべてを公開するとコンテキストを消費します。MCP の URL に ?profile=coding を付ける(またはヘッダー X-Archyl-Tool-Profile: coding を送る)と、タスクに絞ったコンテキスト、Harness ワークセッションのループ、適合性/差分チェックの 16 ツールに絞り込めます。パラメータを省略する(または profile=full を使う)と完全なカタログになります。

エージェントコンテキスト (4)

まずはここから: 何度も呼び出す代わりに、1回の呼び出しでアシスタントにアーキテクチャの全体像を伝えられます。

Tool Description
get_agent_context Get the complete architectural context for a project: C4 model, ADRs, tech stack, guardrails, API contracts, and event channels
find_relevant_context Given a natural-language task, return ONLY the architecture elements relevant to it (ranked), their connected neighbours, the decisions (ADRs) and…
get_project_c4_model Get the complete C4 model for a project including all systems, containers, components, code elements, and relationships
impact_of Compute the blast radius of changing a C4 element: the dependents that are AFFECTED if it changes, the dependencies it relies on, and the distinct…

Harness ワークセッション (8)

コーディングエージェントのための統制されたワークループ:作業単位を宣言してタスクに絞ったコンテキストと勧告的ロックを取得し、作業中はハートビートを送り、アーキテクチャ変更リクエストを開けるアウトカムで完了します。 さらにプロジェクトメモリ:将来の作業者のために事実を記憶し、過去のセッションが学んだことを呼び出せます。

Tool Description
plan_work Produce an architecture-aware implementation plan for a task: ordered steps grounded in the documented C4 model, with the ADRs and guardrails that…
start_work_session Declare a unit of work BEFORE starting it
heartbeat_work_session Mark an active work session as still alive
finish_work_session Close a work session with what actually happened: a summary, the decisions worth recording, and follow-ups
list_work_sessions List a project's harness work sessions — who is (or was) working on what, with the elements each session holds leases on
remember Store a memory for future workers: a convention, a pitfall, or a fact worth knowing about an element or the project
recall Search the project's memory: session outcomes, notes, conventions and pitfalls left by previous agents and humans
confirm_memory Re-attest a memory you just verified in the code or at runtime: bumps its confirmation count and resets its freshness, so it keeps outranking stale…

プロジェクト (7)

Tool Description
list_projects List all architecture projects the user has access to
get_project Get detailed information about a specific project including its C4 model overview
create_project Create a new architecture project
update_project Update an existing project's details
delete_project Delete a project and all its associated data (systems, containers, components, relationships)
get_project_settings Get the settings for a project (discovery config, PR settings, layout preferences, etc.)
update_project_settings Update project settings such as diagram layout, code level visibility, request mode, etc

組織とチーム (5)

Tool Description
list_organizations List organizations the user belongs to
get_organization Get detailed information about an organization
list_teams List teams in an organization
get_team Get detailed information about a team
create_team Create a new team in an organization

C4要素 (15)

システム(レベル1)、コンテナ(レベル2)、コンポーネント(レベル3)、コード要素(レベル4)。

Tool Description
list_systems List all C4 Systems in a project
create_system Create a new C4 System (Level 1) in a project
update_system Update an existing C4 System
delete_system Delete a C4 System and all its containers, components, and code elements
list_containers List all C4 Containers in a system
create_container Create a new C4 Container (Level 2) in a system
update_container Update an existing C4 Container
delete_container Delete a C4 Container and all its components and code elements
list_components List all C4 Components in a container
create_component Create a new C4 Component (Level 3) in a container
update_component Update an existing C4 Component
delete_component Delete a C4 Component and all its code elements
create_code_element Create a new C4 Code Element (Level 4) in a component
update_code_element Update an existing C4 Code Element
delete_code_element Delete a C4 Code Element

リレーションシップ (4)

Tool Description
list_relationships List all relationships in a project
create_relationship Create a relationship (connection) between two C4 elements
update_relationship Update an existing relationship
delete_relationship Delete a relationship between C4 elements

ダイアグラムのレイアウトとオーバーレイ (5)

Tool Description
update_positions Batch update positions of C4 elements on the diagram (systems, containers, components, code elements, overlays)
list_overlays List all overlays in a project
create_overlay Create a visual overlay (grouping) on the diagram
update_overlay Update an existing overlay
delete_overlay Delete an overlay

ドキュメント (11)

Tool Description
list_documentation List project documentation
get_documentation Get detailed information about a documentation item
create_documentation Create a new documentation item
update_documentation Update an existing documentation item
delete_documentation Delete a documentation item
move_documentation Move a documentation item to a folder and/or position
list_documentation_folders List folders for a project
create_documentation_folder Create a new documentation folder
update_documentation_folder Rename a documentation folder
move_documentation_folder Move a documentation folder to a new parent and/or position
delete_documentation_folder Delete a documentation folder (children and docs are reparented to the parent folder)

アーキテクチャ決定記録 (6)

Tool Description
list_adrs List Architecture Decision Records in a project
get_adr Get detailed information about an Architecture Decision Record
create_adr Create a new Architecture Decision Record
update_adr Update an existing Architecture Decision Record
delete_adr Delete an Architecture Decision Record
link_adr_to_element Link an ADR to a C4 element (system, container, component, or code)

APIコントラクト (8)

OpenAPI、gRPC、GraphQL、AsyncAPI、MCPツールのコントラクト。

Tool Description
list_api_contracts List API contracts for a project
list_api_contracts_by_element List API contracts linked to a specific C4 element
get_api_contract Get a single API contract with its links to C4 elements
create_api_contract Create a new API contract (OpenAPI, gRPC, GraphQL, AsyncAPI, or MCP tools)
update_api_contract Update an existing API contract
delete_api_contract Delete an API contract and all its links
link_api_contract Link an API contract to a C4 element (system, container, component, or code)
unlink_api_contract Remove a link between an API contract and a C4 element

イベントチャネル (8)

Tool Description
list_event_channels List event channels (producers/consumers) for a project
list_event_channels_by_element List event channels linked to a specific C4 element
get_event_channel Get a single event channel with its links to C4 elements
create_event_channel Create a new event channel (producer or consumer)
update_event_channel Update an existing event channel
delete_event_channel Delete an event channel and all its links
link_event_channel Link an event channel to a C4 element (system, container, component, or code)
unlink_event_channel Remove a link between an event channel and a C4 element

フローとホワイトボード (8)

Tool Description
list_flows List user/system flows in the organization
get_flow Get detailed information about a flow including its steps
create_flow Create a new user/system flow diagram
delete_flow Delete a flow
list_whiteboards List whiteboards in the organization
get_whiteboard Get detailed information about a whiteboard
create_whiteboard Create a new whiteboard for free-form diagramming
delete_whiteboard Delete a whiteboard

コメントとディスカッション (11)

Tool Description
list_comments List all comments for a project with pagination
list_comments_by_element List comments for a specific C4 element
get_comment Get a single comment by ID with its replies
get_comment_count Get the number of comments for a C4 element
create_comment Create a new comment on a project or C4 element
update_comment Update an existing comment (only the author can update)
delete_comment Delete a comment (only the author can delete)
resolve_comment Mark a comment thread as resolved
unresolve_comment Mark a comment thread as unresolved (reopen)
add_comment_reaction Add a reaction emoji to a comment
remove_comment_reaction Remove a reaction emoji from a comment

オーナーシップ (6)

Tool Description
who_owns Find the user and team owners of a C4 element
get_ownership_map Get the global ownership map showing all C4 elements across the organization with their team and user ownership data, plus coverage statistics
get_element_owners Get the owners of a C4 element (system, container, component, or code element)
set_element_owners Set the owners of a C4 element (replaces existing owners)
add_element_owner Add a single owner to a C4 element
remove_element_owner Remove an owner from a C4 element

テクノロジーとレーダー (10)

Tool Description
list_technologies List all technologies in the organization, optionally filtered by category or search term
get_technology Get detailed information about a specific technology
create_technology Create a new technology in the organization
update_technology Update an existing technology
delete_technology Delete a technology and all its element/relationship links
get_technology_radar Get the technology radar data showing all technologies with their usage counts across elements and relationships
get_element_technologies Get technologies linked to a C4 element (system, container, or component)
set_element_technologies Set the technologies linked to a C4 element (replaces existing links)
get_relationship_technologies Get technologies linked to a C4 relationship
set_relationship_technologies Set the technologies linked to a C4 relationship (replaces existing links)

リリースと環境 (10)

Tool Description
list_releases List releases for a project with optional filters
get_release Get detailed information about a specific release
create_release Create a new release for a project
update_release Update an existing release
delete_release Delete a release
list_environments List deployment environments for a project, ordered by position
create_environment Create a new deployment environment for a project
update_environment Update an existing deployment environment
delete_environment Delete a deployment environment
reorder_environments Reorder environments for a project by providing the environment IDs in the desired order

アーキテクチャ変更リクエスト (6)

Tool Description
list_requests List architecture change requests for a project
get_request Get detailed information about an architecture change request including its changes and reviews
create_request Create a new architecture change request
update_request Update the title or description of an architecture change request (author only, not merged)
list_request_changes List all changes in an architecture change request
list_request_reviews List all reviews for an architecture change request

コンフォーマンスルール (9)

Tool Description
list_conformance_rules List architecture conformance rules for the organization, with optional project filter
get_conformance_rule Get detailed information about a conformance rule
create_conformance_rule Create a new architecture conformance rule
update_conformance_rule Update a conformance rule's name, description, severity, or config
delete_conformance_rule Delete a conformance rule
run_conformance_check Run conformance rules against changed files and return a violation report
list_conformance_checks List recent conformance checks for a project
get_conformance_report Get the full report for a conformance check, including all violations
get_conformance_stats Get conformance statistics for a project (total checks, pass/fail rate, latest status)

ドリフト検出 (4)

Tool Description
get_drift_score Get the latest drift score for a project
compute_drift_score Trigger a drift score computation for a project
get_drift_details Get the per-element drift breakdown for a specific score computation
get_drift_history Get the drift score trend over time for a project

DORAメトリクス、ROI、予測 (4)

Tool Description
get_dora_metrics Calculate DORA metrics (Deployment Frequency, Lead Time for Changes, Change Failure Rate, Mean Time to Restore) for a project
get_dora_trend Get DORA metrics trend over time, bucketed by day, week, or month
compute_architecture_roi Quantify the financial impact of architecture decisions
get_predictions Analyze drift trends, DORA trajectories, conformance decay, and complexity growth to forecast risks and recommend preventive actions

履歴とタイムトラベル (5)

Tool Description
list_history List change history entries for the organization, optionally filtered by project, entity name, user, or action
list_versions List all time-travel versions (snapshots) for a project, ordered by version number descending
get_version Get a specific version by project ID and version number, including the full snapshot data and changes
diff_version Compare a version with another version or the current live state
analyze_architecture_diff AI-powered analysis of a git diff to detect architecture changes

インサイト (3)

Tool Description
list_insights List AI-generated architecture insights
get_insight Get detailed information about an insight
silence_insight Silence an insight to hide it from the list

マーケットプレイスとウィジェット (15)

Tool Description
list_marketplace_products List all available marketplace integration products (Datadog, GitHub, GitLab, SonarQube, etc.)
get_marketplace_product Get detailed information about a marketplace product including its configuration schema
list_marketplace_connections List all configured marketplace connections for the organization
get_marketplace_connection Get detailed information about a specific marketplace connection
create_marketplace_connection Create a new marketplace connection to an integration product
update_marketplace_connection Update an existing marketplace connection
delete_marketplace_connection Delete a marketplace connection and all its associated widgets
list_marketplace_widgets List marketplace widgets for a project
list_marketplace_widgets_by_element List marketplace widgets linked to a specific C4 element
get_marketplace_widget Get detailed information about a specific marketplace widget
create_marketplace_widget Create a new marketplace widget for a project
update_marketplace_widget Update an existing marketplace widget
delete_marketplace_widget Delete a marketplace widget
list_organization_widgets List marketplace widgets scoped to the organization (not project-specific)
create_organization_widget Create a new marketplace widget scoped to the organization (not project-specific)

Webhook (7)

Tool Description
list_webhook_notifications List all outgoing webhook notification configurations for the organization
get_webhook_notification Get detailed information about a specific webhook notification configuration
create_webhook_notification Create a new outgoing webhook notification
update_webhook_notification Update an existing webhook notification configuration
delete_webhook_notification Delete a webhook notification and all its delivery history
test_webhook_notification Send a test event to a webhook endpoint to verify it is configured correctly
list_webhook_deliveries List recent delivery history for a webhook notification, including status and response codes

組織全体のアーキテクチャ (9)

プロジェクト横断のビューと組織レベルのアーティファクト。

Tool Description
list_global_systems List all C4 systems across all projects in the organization (global architecture view)
list_global_relationships List all C4 relationships visible in the global architecture view
list_global_adrs List organization-level Architecture Decision Records (not scoped to a specific project)
create_global_adr Create an organization-level Architecture Decision Record
list_global_docs List organization-level documentation (not scoped to a specific project)
create_global_doc Create an organization-level documentation page
list_global_api_contracts List organization-level API contracts (not scoped to a specific project)
create_global_api_contract Create an organization-level API contract
list_global_comments List organization-level discussion comments (not scoped to a specific project)

アーキテクチャ・アズ・コード (1)

Tool Description
import_dsl Import architecture from a DSL format (Archyl YAML, Structurizr DSL, LikeC4, IcePanel JSON, or Backstage catalog JSON) into a project

会話の例

アーキテクチャの探索

あなた: 「ECプロジェクトにはどんなシステムがありますか?」

AI: list_systemsツールを使用 「ECプロジェクトには4つのシステムがあります: Web Store、Payment Service、Inventory System、Notification Service...」

要素の作成

あなた: 「Web Storeシステムにセッション管理用のRedis Cacheという新しいコンテナを追加して」

AI: create_containerツールを使用 「Web StoreシステムにRedis Cacheコンテナを作成しました。説明は「セッション管理用のインメモリキャッシュ」です。」

ドキュメント作成

あなた: 「MongoDBよりもPostgreSQLを選択した理由についてADRを作成して」

AI: create_adrツールを使用 「ADR-001: データベース技術の選定を作成しました。ACIDコンプライアンスとクエリの柔軟性を理由にPostgreSQLを選択した決定を記録しています...」

コードを書く前に

あなた: 「チェックアウトフローにレート制限を追加しようとしています。何を知っておくべきですか?」

AI: find_relevant_contextとimpact_ofを使用 「チェックアウトはAPI GatewayとOrdersサービスに関わります。ゲートウェイの変更は下流の6つのコンテナに影響します。ADR-014ではスロットリングにRedisを使用することがすでに定められており、コンフォーマンスルールによりレガシーのSessionストアへの新規依存は禁止されています...」

ガバナンスのチェック

あなた: 「ドキュメント化されたアーキテクチャからドリフトしていますか?」

AI: get_drift_scoreとrun_conformance_checkを使用 「ドリフトスコアは82%です(先月の91%から低下)。違反が2件あります: Searchサービスが直接Ordersデータベースを呼び出しており、Paymentsが未承認のHTTPクライアントを使用しています...」

エンドポイント

Streamable HTTP(MCP)

https://api.archyl.com/mcp

このエンドポイントを使用して、AIアシスタントをArchylのアーキテクチャドキュメントに接続します。Streamable HTTPトランスポートプロトコルをサポートしています。

トラブルシューティング

接続に失敗する場合

  • APIキーが有効か確認
  • エンドポイントURLが正しいか確認
  • ネットワーク接続を確認

認証に失敗する場合

  • ヘッダー対応ツール: X-API-Key ヘッダーが正しく設定されているか確認
  • ヘッダー非対応ツール: URLに ?apiKey= クエリパラメータが含まれているか確認
  • APIキーの有効期限が切れていないか確認

ツールが見つからない場合

  • 正しいツール名を使用しているか確認してください — ツールリファレンスを参照するか、クライアントにツール一覧の更新を依頼してください
  • 一部のクライアントは tools/list をキャッシュします。アップグレード後はクライアントを再起動してください

書き込みツールが拒否される場合

  • create_*update_*delete_*import_dsl には書き込みスコープを持つAPIキーが必要です。読み取り専用のキーでは list_*get_* しか呼び出せません
  • サブスクリプションプランを確認してください: 一部の機能(Webhook、マーケットプレイス連携、マネージドエージェントの実行)はプランによって制限されています

Antigravity固有の問題

  • 設定に url ではなく serverUrl を使用していることを確認
  • 設定ファイルの場所は ~/.gemini/antigravity/mcp_config.json

OpenAI Codex固有の問題

  • ~/.codex/config.toml のTOML構文が正しいことを確認
  • テーブル名として [mcp_servers.archyl] を使用

Warp固有の問題

  • Settings > MCP Servers で設定を管理
  • 設定変更後にWarpを再起動

ベストプラクティス

具体的に指示する

AIにアーキテクチャの変更を依頼する際は、具体的に:

  • プロジェクト名を含める
  • 要素タイプを指定する
  • 説明を提供する

変更を確認する

AIが作成した要素は必ず確認:

  • 名前と説明が正確か確認
  • リレーションシップが正しいか検証
  • 必要に応じて更新

探索に活用する

MCPは以下の用途に最適:

  • 大規模なアーキテクチャの素早い探索
  • 初期ドキュメントの生成
  • システムに関する質問への回答