Quickstart
Install SpecsGraph on your own server, connect a GitHub repository and Claude Code, then have an agent propose a requirement that you review and publish.
This guide takes you from an empty server to a published requirement. It follows the self-hosted path, which is how you run SpecsGraph today; SpecsGraph Cloud is coming soon. It uses the Northwind Commerce example from the rest of the docs: an online store with contexts such as Orders, Billing and Catalog. Swap in your own system as you go.
Before you start
- A Linux server that meets the minimum requirements, with a domain name pointing at it. The examples use
https://specsgraph.example.com. - A GitHub repository that holds the code you want to describe, and owner rights in its GitHub organization, so you can create a GitHub App and install it there.
- Claude Code installed and working in that repository. Any other MCP client works too; see Connect an agent.
- A rough idea of the main parts of your system. You do not need a written spec.
Set up and publish your first change
Install SpecsGraph with Docker Compose
Follow Install with Docker Compose on your server. It covers the compose file, secrets, TLS and registering your own GitHub App, which sign-in needs. Set
SPECSGRAPH_PUBLIC_URLto your own domain. Whendocker compose psshows every service running, continue here.Sign in as the first user
Open your public URL, here
https://specsgraph.example.com, and sign in with GitHub. The first person to sign in becomes the Owner of the install, so do it before you share the address. Other people join later through invitations; see Members and roles.Create a workspace
A workspace holds your team, its roles and the connection to GitHub. Name it
Northwind Commerce.Connect your GitHub App to the repository
Open Workspace settings, then GitHub and choose Connect GitHub. SpecsGraph sends you to GitHub to install the App you registered in Create your GitHub App; install it on your repository only. It requests Contents (read and write), Pull requests (read and write), Metadata (read). Connect GitHub explains each permission.
Create a project
A project holds the model of one system and publishes to one repository. Name it
Shop, pick the repository you just connected and keep the suggested base branch, the repository's default branch. Workspaces and projects explains when to split a system into several projects.Sketch your first contexts
On the system map, add three or four contexts for the parts of the system you know best, each with a short key that prefixes its requirement IDs: Orders (
ORD), Billing (BIL) and Catalog (CAT). A one-line purpose for each is enough; Edit the graph in the web app shows where. Your edits collect in a Draft proposal. Choose Request review, then Approve, and merge the pull request SpecsGraph opens. The contexts are now part of the spec. If you would rather start from the code, skip this step: after step 8, ask your agent to propose the contexts as described in Start from an existing codebase, and merge that proposal before step 9.Create a personal access token
Open Account settings, then Access tokens and create a token named
claude-code-laptop. Choose Read and write access, because the agent will draft a proposal, and limit the token to theShopproject. Tokens start withsgp_and are shown once, so copy it into an environment variable right away. See Personal access tokens to manage and revoke tokens.Shell export SPECSGRAPH_TOKEN="sgp_paste-your-token-here"Connect Claude Code to your server
From your repository, register your SpecsGraph server's MCP URL: your public URL plus
/mcp, herehttps://specsgraph.example.com/mcp. Your shell expands$SPECSGRAPH_TOKENwhen you run the command, so Claude Code stores the token value in its own configuration. Runclaude mcp list, or/mcpinside a Claude Code session, and check thatspecsgraphshows as connected. Claude Code's own documentation is the authority on its flags.Shell claude mcp add --transport http specsgraph https://specsgraph.example.com/mcp \ --header "Authorization: Bearer $SPECSGRAPH_TOKEN"Ask the agent for a requirement
Give Claude Code a prompt like the one below. It reads the Orders context with
get_context, checks the glossary withlist_glossary_termsand drafts the requirement withpropose_requirement. The proposal opens for review with a branch name underspec/, herespec/checkout-reserve. These docs call the requirementORD-12, its ID in the Northwind Commerce sample; in your project it gets the next number forORD, as described in Requirement IDs.PromptText Use the specsgraph MCP server. Read the Orders context, then propose a requirement: "Reserve stock for every line item at checkout". Add acceptance scenarios for a cart where every line item gets a reservation and for a cart where a line item cannot be reserved. Use existing glossary terms where they fit.Review and approve
In the web app, open Reviews and select the proposal. Read the requirement and its scenarios. If something is off, choose Comment on that node: the agent can read the thread and revise the proposal. When it reads right, choose Approve. Only people can approve; Proposals and reviews covers the details.
See the pull request and the spec folder
After approval, SpecsGraph commits the change to
spec/checkout-reserveand opens a pull request against your base branch. It addsspecsgraph/contexts/orders/requirements/ORD-12.mdto the spec folder and updates the generatedREADME.mdandgraph.json. The proposal stays Approved until you merge the pull request the way you merge any other. Merging it marks the proposal Published.
What lands in your repository
The requirement file carries the scenarios the agent drafted and you approved. For ORD-12 they look like this:
@ORD-12
Feature: Reserve stock for every line item at checkout
Background:
Given the Catalog has 5 units of "Trail mug" in stock
And the Catalog has 1 unit of "Canvas tote" in stock
Scenario: Every line item gets a reservation
Given a Customer has a cart with 2 "Trail mug" and 1 "Canvas tote"
When the Customer starts checkout
Then a reservation holds 2 "Trail mug" for the order
And a reservation holds 1 "Canvas tote" for the order
And the Catalog shows 3 units of "Trail mug" available
Scenario: Checkout stops when a line item cannot be reserved
Given a Customer has a cart with 2 "Canvas tote"
When the Customer starts checkout
Then no reservation is created for the order
And the Customer is told that only 1 "Canvas tote" is left
And payment is not requestedAs the model grows, the specsgraph/ folder fills out. A project with a few changes behind it looks like this:
specsgraph/
README.md index of the model, generated
glossary.md every term with its definition
actors.md people, systems and agents
graph.json machine-readable graph for tools and CI
contexts/
orders/
context.md purpose, subdomain, services, relationships
requirements/
ORD-12.md one file per requirement, scenarios included
ORD-13.md
decisions/
0007-reserve-stock-before-payment.md
workstreams/
WS-3.mdIf the agent cannot connect
specsgraphshows as failed. Check that$SPECSGRAPH_TOKENwas set in the shell where you ranclaude mcp add. If it was empty, remove the server withclaude mcp remove specsgraphand add it again.- Requests are rejected as unauthorized. The token may have been revoked or copied with a missing character. Create a new one and add the server again.
- The connection times out or returns 404. Check that the URL ends in
/mcpand that your proxy sends that path to themcpservice. Check the install lists common causes. - The agent answers without using SpecsGraph. Name the server in your prompt, as in the example above, until the agent picks it up on its own.
- No pull request appears. Confirm your GitHub App is installed on this repository, then check the proposal status in Reviews.
Troubleshooting covers more cases, from sign-in to publishing.
Next steps
- Start from an existing codebase: build a first model of software that already runs.
- Core concepts: the terms used across the product.
- Requirements and scenarios: write requirements agents can build against.
- Working well with agents: prompts and habits that keep proposals small and reviewable.
- Branches and pull requests: how proposals map to Git.
- Upgrades and backups: schedule database backups before the team moves in.