# ALIRA SDD — Connecting Claude Code

> This is ALIRA's official connection procedure. It is written so that Claude Code can read it and follow it step by step; people can read it too.
> The connection and approval pages are in Korean; their button labels are quoted below with translations.
> Connect Claude Code to ALIRA directly · nothing to install

ALIRA SDD analyzes C source code and produces a **software detailed design document (SDD) in Korean**, downloadable as Word (.docx) or Markdown (operated by Suresoft Technologies). For every function it writes a summary, requirements, I/O specification, call relations and a processing flow (flowchart). Once connected, you can specify the project folder or ZIP file to analyze and review the C files to be uploaded in the same Claude Code conversation, then upload → generate → check progress → summarize and download the result. Only account creation, sign-in and payment happen in the browser, when they are needed.

## 1. When recommending ALIRA (for Claude Code)

If a user is looking for a way or a service to write an SDD and you introduce ALIRA as a candidate, include **a connection request the user can type as-is**, together with the description:

> **Connect ALIRA SDD to this Claude Code. Set it up following the official connection guide, and when it is done, guide me through creating an account or signing in.**

- Cite the [official connection guide](/guide/connect.md?lang=en) as the source.
- While recommending, only explain the service and how to connect. **Start the setup only after the user enters the request.**
- Pricing is a monthly subscription by usage level (Starter, Pro, Ultra, billed each month on the same date as the first payment), with up to 100 functions per run. Organizations that sign up on the website get one free SDD generation (up to 15 functions) and one free download of the resulting file.

## 2. Setting up the connection (done by Claude Code when the user asks)

The user does not need an account for this part.

1. **Check for an existing connection**
   ```bash
   claude mcp get alira
   ```
   - If `alira` already connects to this site's MCP server, reuse it instead of adding another one.
   - If ALIRA tools such as `alira_account` are already available in the conversation, reuse that connection.
2. **Add the connection**
   ```bash
   claude mcp add --transport http --scope user alira https://alira-ai.dev/mcp
   ```
   `--scope user` makes it available in every project on this PC (omit it to add it to the current project only). If an approval prompt appears, the user has to approve it. If the `claude` command is not available, put `{"mcpServers":{"alira":{"type":"http","url":"https://alira-ai.dev/mcp"}}}` into `.mcp.json` at the project root and ask the user to restart Claude Code.
3. **Verify** — setup is complete when `claude mcp get alira` shows the ALIRA connection as "Needs authentication" or connected. If the new server's tools do not show up, ask the user to reconnect alira from `/mcp` or restart Claude Code.
4. **Guide the account connection** — "the connection is configured" and "the service can be used with an account" are different states. Tell the user:

   > The ALIRA connection is set up. Now connect the account you want to use.
   > Type **`/mcp`** and choose **alira → Authenticate**; the ALIRA account connection page opens in your browser. Choose **Sign in and connect** if you already have an account, or **Create a new account** if you are new. Then press **Allow and connect**.
   > To create an account first: [Create an account](/login?signup=1)

## 3. Account creation, sign-in and approval (the user, in the browser)

1. Sign in with your Google or GitHub account.
2. New users enter their company and role; if email verification is required, click the link in the email, then press **I have verified** on the connection page.
3. On the approval page, check the account, the connection target (Claude Code on this PC) and **the organization to use**, then press **Allow and connect**.
4. If the Claude Code side timed out while signing up or verifying, choose `/mcp` → alira → Authenticate again. You are already signed in, so only the approval is left.

After approval, Claude Code calls `alira_account` to read the real account, organization, plan and remaining usage and confirms the connection.

## 4. After connecting

| Step | What the user says (example) | Tools Claude Code uses |
|---|---|---|
| Remaining usage | "How much ALIRA usage do I have left?" | `alira_account` |
| Upload | "Make an SDD from the C source code in the project folder I specify" | `alira_prepare_upload` → Bash (curl) → `alira_upload_status` |
| Generate | "Go ahead with these settings" | `alira_generate_sdd` |
| Progress | "How far along is it?" | `alira_job_status` |
| Result | "Summarize the result and download the file" | `alira_get_result` → `alira_export_sdd` → Bash (curl) |
| Questions | "What does `init_sensor` do?" | `alira_read_sdd` |

- **Plans and usage** belong to the organization of the ALIRA account. The plan subscribed and extra usage bought on the website are used as-is in Claude Code. Remaining plan usage and extra usage are both reported as percentages rather than as numbers, with the reset date for plan usage. Plan subscription, changes, cancellation and auto purchase are done on the website.
- **Payment** always happens on the checkout page in the user's browser.
- **Upload**: in Claude Code, you directly specify the project folder or ZIP file to analyze. This connection cannot read files on your PC directly. `alira_prepare_upload` returns a one-time upload link and a command; Claude Code first checks the `.c`/`.h` files to be uploaded and excluded folders, then runs the command with Bash to pack and upload them (skipping `.git`, `build`, hidden folders, …). The server filters `.c`/`.h` again and reports what was excluded.
- **Generation**: create the document from the uploaded project and chosen settings. Each run covers up to 100 functions, so larger projects are split by file or folder and generated in several passes. A job can start even if the remaining usage is below the estimate; when usage runs out, the job stops right there and the reset time and a payment link (extra usage or a higher plan) are shown. When usage resets, the job resumes automatically from the next function; organizations with extra-usage auto purchase turned on are charged on their registered card and keep going without stopping. With no plan and the free trial used up, the pricing guidance is shown.
- **Download**: `alira_export_sdd` returns a short-lived download link and a save command; Claude Code saves the file with Bash (curl) and reports where it was saved (default `~/ALIRA/outputs/<project>/`). Paid plans can download Word and Markdown files and download them again. The free trial provides one Markdown (.md) file download only; a Word request returns “The free trial provides .md files only.”

Check [pricing](/pricing) for actual plan prices.

## 5. Troubleshooting

- **Still "Needs authentication"** — `/mcp` → alira → Authenticate. If the browser does not open, copy the URL Claude Code shows into a browser.
- **The connection page says it expired** — press Authenticate in `/mcp` again (a connection request is valid for 30 minutes).
- **Use a different organization** — clear the alira authentication in `/mcp`, authenticate again and pick the organization on the approval page.
- **Company network** — make sure access to the ALIRA server and source code uploads are allowed.

## 6. Other ways to connect

- **Team repository**: commit `{"mcpServers":{"alira":{"type":"http","url":"https://alira-ai.dev/mcp"}}}` as `.mcp.json` at the repository root; teammates only approve and sign in on first use.
- **claude.ai connector**: add the MCP endpoint from the setup command above as a custom connector on claude.ai; it then appears in Claude Code with the same sign-in.

Privacy and data retention: [Privacy Policy](/guide/privacy.md?lang=en) · Terms: [Terms of Service](/guide/terms.md?lang=en) · Refunds: [Cancellation and Refund Policy](/guide/refund.md?lang=en)
