# get-concord-ai/concord-mcp architecture

> Architecture diagram of the GitHub repository get-concord-ai/concord-mcp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/get-concord-ai/concord-mcp
- Repository: https://github.com/get-concord-ai/concord-mcp

## Overview

Concord MCP is a local-first coordination layer for coding agents, with an optional Concord Cloud path. Agents use MCP tools to establish presence, claim work and detect overlap, exchange messages, manage handoffs, and record review evidence; the server routes workspace-scoped operations to SQLite and can regenerate shareable work-state artifacts. The CLI also supports workspace setup, inspection, cloud access, and agent adapters. The graph focuses on documented capabilities and relationships shown in excerpts or the source index; several feature branches are documented but their internal calls were not sampled.

Main entry points: [`src/index.ts`](https://github.com/get-concord-ai/concord-mcp/blob/main/src/index.ts) (MCP entry), [`src/tools/workflow.ts`](https://github.com/get-concord-ai/concord-mcp/blob/main/src/tools/workflow.ts) (Workflow tools), [`src/server.ts`](https://github.com/get-concord-ai/concord-mcp/blob/main/src/server.ts) (MCP server), [`src/db/index.ts`](https://github.com/get-concord-ai/concord-mcp/blob/main/src/db/index.ts) (Data repositories)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Agent entry points"]
  node_mcp_entry["MCP entry<br/>[index.ts]"]
  node_mcp_server["MCP server<br/>[server.ts]"]
  node_cli["Concord CLI<br/>[index.ts]"]
end

subgraph group_coordination["Work coordination"]
  node_workflow_tools["Workflow tools<br/>[workflow.ts]"]
  node_agent_registration["Agent registration<br/>[register-agent.ts]"]
  node_presence_identity["Presence and identity<br/>[presence.ts]"]
  node_task_lifecycle["Tasks and overlap<br/>[overlap.ts]"]
  node_handoff_reviews["Handoffs and reviews"]
end

subgraph group_persistence["Workspace and storage"]
  node_workspace_manager["Workspace routing<br/>[manager.ts]"]
  node_workspace_store["Workspace store<br/>[store.ts]"]
  node_repositories["Data repositories<br/>[index.ts]"]
  node_sqlite[("SQLite database<br/>[connection.ts]")]
  node_artifacts["State artifacts<br/>[index.ts]"]
end

subgraph group_communication["Messaging and relay"]
  node_agent_messages["Agent messages<br/>[agent-messages.ts]"]
  node_relay["Local relay<br/>[server.ts]"]
end

subgraph group_integrations["Cloud and integrations"]
  node_cloud_proxy["Cloud proxy<br/>[proxy.ts]"]
  node_cloud_client["Cloud client<br/>[client.ts]"]
  node_adapters["Harness adapters<br/>[index.ts]"]
  node_telemetry["Telemetry<br/>[client.ts]"]
end

node_agents(("Coding agents"))
node_external_services{{"Concord Cloud"}}

node_agents -->|"use MCP"| node_mcp_entry
node_mcp_entry -->|"creates"| node_mcp_server
node_mcp_server -->|"registers"| node_workflow_tools
node_mcp_server -->|"routes workspaces"| node_workspace_manager
node_mcp_server -->|"registers agent"| node_agent_registration
node_workflow_tools -.->|"updates state"| node_repositories
node_agent_registration -->|"registers agent"| node_repositories
node_workspace_manager -->|"resolves store"| node_workspace_store
node_workspace_manager -->|"opens repositories"| node_repositories
node_repositories -->|"binds repositories"| node_sqlite
node_mcp_entry -->|"creates context"| node_workspace_manager
node_mcp_entry -->|"writes artifacts"| node_artifacts
node_mcp_server -.->|"notifies on writes"| node_artifacts
node_agents -->|"run commands"| node_cli
node_cli -->|"manages adapters"| node_adapters
node_cli -.->|"offers cloud commands"| node_cloud_proxy
node_mcp_entry -->|"selects cloud path"| node_cloud_proxy
node_cloud_proxy -->|"connects"| node_external_services
node_cloud_proxy -.->|"connects cloud"| node_cloud_client
node_workflow_tools -.->|"supports messaging"| node_agent_messages
node_agent_messages -.->|"delivers messages"| node_relay
node_relay -->|"checks agents"| node_repositories
node_agents -.->|"exchange prompts"| node_relay
node_mcp_entry -->|"creates recorder"| node_telemetry
node_workflow_tools -.->|"tracks presence"| node_presence_identity
node_workflow_tools -.->|"manages claims"| node_task_lifecycle
node_workflow_tools -.->|"handles transfers"| node_handoff_reviews

click node_mcp_entry "https://github.com/get-concord-ai/concord-mcp/blob/main/src/index.ts"
click node_mcp_server "https://github.com/get-concord-ai/concord-mcp/blob/main/src/server.ts"
click node_cli "https://github.com/get-concord-ai/concord-mcp/blob/main/src/cli/index.ts"
click node_workflow_tools "https://github.com/get-concord-ai/concord-mcp/blob/main/src/tools/workflow.ts"
click node_agent_registration "https://github.com/get-concord-ai/concord-mcp/blob/main/src/tools/register-agent.ts"
click node_presence_identity "https://github.com/get-concord-ai/concord-mcp/blob/main/src/domain/presence.ts"
click node_task_lifecycle "https://github.com/get-concord-ai/concord-mcp/blob/main/src/domain/overlap.ts"
click node_handoff_reviews "https://github.com/get-concord-ai/concord-mcp/blob/main/src/tools/handoff-lifecycle.ts"
click node_agent_messages "https://github.com/get-concord-ai/concord-mcp/blob/main/src/tools/agent-messages.ts"
click node_relay "https://github.com/get-concord-ai/concord-mcp/blob/main/src/relay/server.ts"
click node_workspace_manager "https://github.com/get-concord-ai/concord-mcp/blob/main/src/workspaces/manager.ts"
click node_workspace_store "https://github.com/get-concord-ai/concord-mcp/blob/main/src/workspaces/store.ts"
click node_repositories "https://github.com/get-concord-ai/concord-mcp/blob/main/src/db/index.ts"
click node_sqlite "https://github.com/get-concord-ai/concord-mcp/blob/main/src/db/connection.ts"
click node_artifacts "https://github.com/get-concord-ai/concord-mcp/blob/main/src/artifacts/index.ts"
click node_cloud_proxy "https://github.com/get-concord-ai/concord-mcp/blob/main/src/cloud/proxy.ts"
click node_cloud_client "https://github.com/get-concord-ai/concord-mcp/blob/main/src/cloud/client.ts"
click node_adapters "https://github.com/get-concord-ai/concord-mcp/blob/main/src/install/adapters/index.ts"
click node_telemetry "https://github.com/get-concord-ai/concord-mcp/blob/main/src/telemetry/client.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mcp_entry,node_mcp_server,node_cli toneBlue
class node_workflow_tools,node_agent_registration,node_presence_identity,node_task_lifecycle,node_handoff_reviews toneAmber
class node_workspace_manager,node_workspace_store,node_repositories,node_sqlite,node_artifacts toneMint
class node_agent_messages,node_relay toneRose
class node_cloud_proxy,node_cloud_client,node_adapters,node_telemetry,node_agents,node_external_services toneIndigo
```

## Components

### Agent entry points

- [MCP entry](https://github.com/get-concord-ai/concord-mcp/blob/main/src/index.ts): `src/index.ts`
- [MCP server](https://github.com/get-concord-ai/concord-mcp/blob/main/src/server.ts): `src/server.ts`
- [Concord CLI](https://github.com/get-concord-ai/concord-mcp/blob/main/src/cli/index.ts): `src/cli/index.ts`

### Work coordination

- [Workflow tools](https://github.com/get-concord-ai/concord-mcp/blob/main/src/tools/workflow.ts): `src/tools/workflow.ts`
- [Agent registration](https://github.com/get-concord-ai/concord-mcp/blob/main/src/tools/register-agent.ts): `src/tools/register-agent.ts`
- [Presence and identity](https://github.com/get-concord-ai/concord-mcp/blob/main/src/domain/presence.ts): `src/domain/presence.ts`
- [Tasks and overlap](https://github.com/get-concord-ai/concord-mcp/blob/main/src/domain/overlap.ts): `src/domain/overlap.ts`
- [Handoffs and reviews](https://github.com/get-concord-ai/concord-mcp/blob/main/src/tools/handoff-lifecycle.ts): `src/tools/handoff-lifecycle.ts`

### Workspace and storage

- [Workspace routing](https://github.com/get-concord-ai/concord-mcp/blob/main/src/workspaces/manager.ts): `src/workspaces/manager.ts`
- [Workspace store](https://github.com/get-concord-ai/concord-mcp/blob/main/src/workspaces/store.ts): `src/workspaces/store.ts`
- [Data repositories](https://github.com/get-concord-ai/concord-mcp/blob/main/src/db/index.ts): `src/db/index.ts`
- [SQLite database](https://github.com/get-concord-ai/concord-mcp/blob/main/src/db/connection.ts): `src/db/connection.ts`
- [State artifacts](https://github.com/get-concord-ai/concord-mcp/blob/main/src/artifacts/index.ts): `src/artifacts/index.ts`

### Messaging and relay

- [Agent messages](https://github.com/get-concord-ai/concord-mcp/blob/main/src/tools/agent-messages.ts): `src/tools/agent-messages.ts`
- [Local relay](https://github.com/get-concord-ai/concord-mcp/blob/main/src/relay/server.ts): `src/relay/server.ts`

### Cloud and integrations

- [Cloud proxy](https://github.com/get-concord-ai/concord-mcp/blob/main/src/cloud/proxy.ts): `src/cloud/proxy.ts`
- [Cloud client](https://github.com/get-concord-ai/concord-mcp/blob/main/src/cloud/client.ts): `src/cloud/client.ts`
- [Harness adapters](https://github.com/get-concord-ai/concord-mcp/blob/main/src/install/adapters/index.ts): `src/install/adapters/index.ts`
- [Telemetry](https://github.com/get-concord-ai/concord-mcp/blob/main/src/telemetry/client.ts): `src/telemetry/client.ts`

### Other components

- **Coding agents**
- **Concord Cloud**

## Connections

- Coding agents → MCP entry: use MCP (evidence: `README.md`)
- MCP entry → MCP server: creates (evidence: `src/index.ts`)
- MCP server → Workflow tools: registers (evidence: `src/server.ts`)
- MCP server → Workspace routing: routes workspaces (evidence: `src/server.ts`)
- MCP server → Agent registration: registers agent (evidence: `src/index.ts`)
- Workflow tools → Data repositories: updates state
- Agent registration → Data repositories: registers agent
- Workspace routing → Workspace store: resolves store (evidence: `src/workspaces/manager.ts`)
- Workspace routing → Data repositories: opens repositories (evidence: `src/workspaces/manager.ts`)
- Data repositories → SQLite database: binds repositories (evidence: `src/db/index.ts`)
- MCP entry → Workspace routing: creates context (evidence: `src/index.ts`)
- MCP entry → State artifacts: writes artifacts (evidence: `src/index.ts`)
- MCP server → State artifacts: notifies on writes
- Coding agents → Concord CLI: run commands (evidence: `README.md`)
- Concord CLI → Harness adapters: manages adapters
- Concord CLI → Cloud proxy: offers cloud commands
- MCP entry → Cloud proxy: selects cloud path (evidence: `src/index.ts`)
- Cloud proxy → Concord Cloud: connects
- Cloud proxy → Cloud client: connects cloud
- Workflow tools → Agent messages: supports messaging
- Agent messages → Local relay: delivers messages
- Local relay → Data repositories: checks agents (evidence: `src/relay/server.ts`)
- Coding agents → Local relay: exchange prompts (evidence: `README.md`)
- MCP entry → Telemetry: creates recorder (evidence: `src/index.ts`)
- Workflow tools → Presence and identity: tracks presence
- Workflow tools → Tasks and overlap: manages claims
- Workflow tools → Handoffs and reviews: handles transfers
