ArchiSpark
Development

Claude Code Configuration

Configure Claude Code and Claude Code Web for ArchiSpark.

This repo ships a project-scoped Claude Code configuration (.mcp.json and .claude/) so that opening it in Claude Code — CLI or Claude Code Web — gives access to the same MCP tools and skills used during development, without relying on any per-machine setup.

Sandbox setup (Claude Code Web)

When connecting this repo on Claude Code Web, the project setup screen asks for a bash setup script and environment variables.

Setup script

set -euo pipefail

# The setup script's working directory is /home/user, not the repo
# checkout, so `pnpm install` there fails with ERR_PNPM_NO_PKG_MANIFEST.
# Locate the cloned ArchiSpark repo (its pnpm workspace root) and cd into it.
# The `|| true` keeps `find`'s exit status from tripping `set -e`/`pipefail`
# (e.g. if it can't descend into some subdirectory).
REPO_DIR=$(find /home/user -maxdepth 4 -name pnpm-workspace.yaml \
  -not -path "*/node_modules/*" 2>/dev/null | head -1 | xargs -r dirname || true)
cd "${REPO_DIR:?could not locate the ArchiSpark repo checkout under /home/user}"

corepack enable
corepack prepare pnpm@11.5.1 --activate
pnpm install --frozen-lockfile
  • package.json requires Node >=22.13 and pins pnpm@11.5.1 via packageManager — corepack activates the matching pnpm version without a global install. Cloud sessions already provide Node 22 via nvm.
  • pnpm install --frozen-lockfile is enough to run pnpm lint, pnpm typecheck, pnpm test, and pnpm build: the test suites run against PGlite (in-memory Postgres) and fake Keycloak responses (apps/server/lib/archimate/test-setup.ts), so no .env, database, or Docker is needed for the normal dev loop.

Environment variables

VariableRequired forNotes
ARCHISPARK_MCP_TOKENarchimate-vercel MCP server (.mcp.json)Personal API token — generate from Mon profil → Tokens API → Nouveau token on archispark.cloud (see MCP server)
GITHUB_PERSONAL_ACCESS_TOKENgithub plugin MCP serverSee Plugins & skills below

Mark both as secrets. Nothing else is required: the vercel plugin authenticates via OAuth through the Claude Code Web UI, and playwright launches its own headless browser.

Running the full app (pnpm infra:up then pnpm dev, with real Postgres + Keycloak, e.g. to drive the UI with Playwright via the run skill) needs Docker inside the sandbox plus pnpm keycloak-setup — heavier, and not covered by the setup script above.

MCP servers (.mcp.json)

ServerProvides
archimate-vercelThis project's own MCP server, against the production deployment at archispark.cloud (/mcp/).

The secret is referenced as a ${VAR} placeholder — Claude Code expands environment variables when loading .mcp.json, so no token is committed:

  • ARCHISPARK_MCP_TOKEN — a personal API token for the ArchiSpark MCP server, generated from Mon profil → Tokens API → Nouveau token on archispark.cloud (same kind of token as MCP_AUTH_TOKEN in .env.example, see MCP server).

On Claude Code Web, configure this as a project secret/environment variable. Locally, export it in your shell before running claude.

vercel, github, and playwright MCP servers are not defined here — they come from marketplace plugins (see below).

What's intentionally left out

  • archimate-local (MCP server against localhost:8000) and sonarqube (runs via docker run) are personal/local-dev tools that don't fit a cloud sandbox — keep those in your own ~/.claude.json if needed.

On this page