MCP Server - Archyl Docs

Connect AI assistants like Claude, Cursor and VS Code to your architecture — 189 tools covering the C4 model, ADRs, contracts, conformance, drift, DORA and more

MCP Server

Archyl provides a Model Context Protocol (MCP) server that allows AI assistants to interact with your architecture documentation. This enables powerful AI-powered architecture exploration and documentation.

What is MCP?

The Model Context Protocol (MCP) is an open protocol that enables AI assistants to securely access external tools and data sources. With Archyl's MCP server, your AI assistant can:

  • Browse and query your projects and their full C4 model
  • Create and modify architecture elements, relationships and diagrams
  • Read and write ADRs, documentation, API contracts and event channels
  • Check conformance rules, drift scores, DORA metrics and ownership before it writes code
  • Track releases, change requests, comments and history

Supported clients

Archyl's MCP server works with:

  • Antigravity - Google's AI-powered IDE
  • Claude Code - Anthropic's CLI tool
  • Claude Desktop - Claude's desktop application
  • Cursor - AI-first code editor
  • OpenAI Codex - OpenAI's AI coding assistant
  • VS Code - With GitHub Copilot Chat
  • Warp - Modern terminal with AI integration
  • Windsurf - Codeium's AI-powered IDE

Authentication

API key (recommended)

Most clients authenticate with an API key. Depending on the tool you're using:

  • Tools with header support (Claude Code, Cursor, Warp, Windsurf, Antigravity): Use the X-API-Key header
  • Tools without header support (Claude Desktop, VS Code, OpenAI Codex): Use the ?apiKey=YOUR_API_KEY query parameter in the URL

Generate an API key from your Profile → API Keys page.

The key's scopes decide what the assistant can do: a read-only key can call every list_* and get_* tool, while create_*, update_*, delete_* and import_dsl require a key with write scope. Handing your agent a read-only key is the simplest way to let it explore your architecture without being able to change it.

OAuth 2.1

The server also implements OAuth 2.1 with dynamic client registration, for clients that connect through a browser sign-in rather than a pasted key (the mcp:read and mcp:write scopes mirror the API key scopes above). Point such a client at the same endpoint and it will discover the flow automatically through:

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

Setup

Antigravity

  1. Open Antigravity and click the "..." menu in the Agent panel
  2. Select "MCP Servers" > "Manage MCP Servers" > "View raw config"
  3. Add to ~/.gemini/antigravity/mcp_config.json:
{
  "mcpServers": {
    "archyl": {
      "serverUrl": "https://api.archyl.com/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
  1. Restart Antigravity to apply changes

Note: Antigravity uses serverUrl instead of url for HTTP-based MCP servers.

Claude Code

Create a .mcp.json file in your project root:

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

Run Claude Code - it will auto-detect the MCP server.

Claude Desktop

  1. Open Claude Desktop settings
  2. Navigate to Developer → MCP Servers
  3. Click "Add Server" and add:
{
  "mcpServers": {
    "archyl": {
      "url": "https://api.archyl.com/mcp?apiKey=YOUR_API_KEY"
    }
  }
}
  1. Restart Claude Desktop

Note: Claude Desktop remote connectors don't support custom headers, so the API key must be passed as a URL query parameter.

Cursor

Create a .cursor/mcp.json file in your project:

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

Restart Cursor to load the MCP server.

OpenAI Codex

Open or create ~/.codex/config.toml and add:

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

Restart Codex CLI or IDE to apply changes.

VS Code

  1. Open VS Code settings (Cmd/Ctrl + ,)
  2. Search for "MCP" and click "Edit in settings.json"
  3. Add:
{
  "mcp": {
    "servers": {
      "archyl": {
        "url": "https://api.archyl.com/mcp?apiKey=YOUR_API_KEY"
      }
    }
  }
}

Warp

  1. Open Warp and go to Settings > MCP Servers
  2. Click "Add Server" and paste the configuration:
{
  "archyl": {
    "url": "https://api.archyl.com/mcp",
    "headers": {
      "X-API-Key": "YOUR_API_KEY"
    }
  }
}
  1. Restart Warp to apply changes

Windsurf

Open the MCP config file at ~/.codeium/windsurf/mcp_config.json:

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

Restart Windsurf to apply changes.

Tool reference

The server exposes 189 tools. They follow a predictable naming scheme, so an assistant can usually guess the right one:

Prefix What it does Scope needed
list_* List the items of a kind, usually within a project read
get_* Fetch one item in full, with its links read
create_* Create a new item write
update_* Modify an existing item write
delete_* Remove an item (and its dependents) write
link_* / unlink_* Attach or detach an artifact to a C4 element write

Most project-scoped tools take a projectId; element-scoped tools take an elementId plus an elementType (the C4 level: 1 = system, 2 = container, 3 = component, 4 = code). Ask your assistant to call list_projects first — it will pick up the IDs it needs from there.

Your client discovers this list automatically via tools/list, so it is always in sync with the server. The tables below are for humans deciding what to ask for.

Tool profiles

189 tools is more than a coding agent doing a bounded task needs — advertising them all costs context. Append ?profile=coding to the MCP URL (or send an X-Archyl-Tool-Profile: coding header) to narrow the surface to 16 tools: task-scoped context, the harness work-session loop, and the conformance/diff checks. Omit the parameter (or use profile=full) for the complete catalog.

Agent context (4)

Start here: these give an assistant the architecture picture in one call, instead of many.

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 work sessions (8)

The governed work loop for coding agents: declare a unit of work to get focused context and advisory leases, heartbeat while working, finish with an outcome that can open an Architecture Change Request. Plus project memory: remember facts for future workers, recall what previous sessions learned.

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…

Projects (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

Organizations & teams (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 elements (15)

Systems (level 1), containers (level 2), components (level 3) and code elements (level 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

Relationships (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

Diagram layout & overlays (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

Documentation (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)

Architecture Decision Records (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 contracts (8)

OpenAPI, gRPC, GraphQL, AsyncAPI and MCP tool contracts.

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

Event channels (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

Flows & whiteboards (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

Comments & discussions (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

Ownership (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

Technologies & radar (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)

Releases & environments (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

Architecture change requests (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

Conformance rules (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)

Drift detection (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 metrics, ROI & predictions (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

History & time travel (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

Insights (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

Marketplace & widgets (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)

Webhooks (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

Organization-wide architecture (9)

Cross-project views and organization-level artifacts.

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)

Architecture as code (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

Example Conversations

Exploring Architecture

You: "What systems are in my e-commerce project?"

AI: Uses list_systems tool "Your e-commerce project has 4 systems: Web Store, Payment Service, Inventory System, and Notification Service..."

Creating Elements

You: "Add a new container called Redis Cache to the Web Store system for session storage"

AI: Uses create_container tool "I've created the Redis Cache container in the Web Store system with the description 'In-memory cache for session storage'."

Documentation

You: "Create an ADR for our decision to use PostgreSQL over MongoDB"

AI: Uses create_adr tool "I've created ADR-001: Database Technology Selection, documenting the decision to use PostgreSQL for its ACID compliance and query flexibility..."

Before writing code

You: "I'm about to add rate limiting to the checkout flow. What should I know?"

AI: Uses find_relevant_context and impact_of "Checkout touches the API Gateway and the Orders service. Changing the gateway affects 6 downstream containers. ADR-014 already mandates Redis for throttling, and a conformance rule forbids new dependencies on the legacy Session store..."

Governance check

You: "Are we drifting from the documented architecture?"

AI: Uses get_drift_score and run_conformance_check "Drift score is 82% (down from 91% last month). Two violations: the Search service calls the Orders database directly, and Payments uses an unapproved HTTP client..."

Endpoint

Streamable HTTP (MCP)

https://api.archyl.com/mcp

Use this endpoint to connect your AI assistant to Archyl's architecture documentation. It supports the Streamable HTTP transport protocol.

Troubleshooting

Connection Failed

  • Check your API key is valid
  • Ensure the endpoint URL is correct
  • Check your network connection

Authentication Failed

  • For tools with header support: Verify the X-API-Key header is set correctly
  • For tools without header support: Verify the ?apiKey= query parameter is in the URL
  • Ensure your API key hasn't expired

Tool Not Found

  • Make sure you're using the correct tool name — see the tool reference, or ask your client to refresh its tool list
  • Some clients cache tools/list; restart the client after upgrading

Write Tools Rejected

  • create_*, update_*, delete_* and import_dsl need an API key with write scope — a read-only key can only call list_* and get_*
  • Check your subscription plan: some features (webhooks, marketplace connections, managed agent runs) are plan-gated

Antigravity-specific Issues

  • Make sure you're using serverUrl (not url) for the configuration
  • Config location is ~/.gemini/antigravity/mcp_config.json

OpenAI Codex-specific Issues

  • Ensure the TOML syntax is correct in ~/.codex/config.toml
  • Use [mcp_servers.archyl] as the table name

Warp-specific Issues

  • Navigate to Settings > MCP Servers to manage configurations
  • Restart Warp after making configuration changes

Best Practices

Be Specific

When asking your AI to modify architecture, be specific:

  • Include project names
  • Specify element types
  • Provide descriptions

Review Changes

Always review AI-created elements:

  • Check names and descriptions are accurate
  • Verify relationships are correct
  • Update as needed

Use for Exploration

MCP is great for:

  • Quickly exploring large architectures
  • Generating initial documentation
  • Answering questions about your systems