> ## Documentation Index
> Fetch the complete documentation index at: https://docs.struct.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up Capy with Struct

> Connect Capy to Struct and Slack, install the observability skill, and verify alert investigation and deploy coverage.

Confirm the Capy project, its repository, the intended Struct workspace, and the service environment. Reuse the project's existing configuration. Inspect the workspace's telemetry before running an alert or deploy workflow. Use the [Struct Quickstart](https://docs.struct.ai/quickstart.md) if the service still needs instrumentation.

## Connect Struct MCP

1. In **Settings → MCP & plugins**, find the project's Struct server or add a **Streamable HTTP** server for that project. Use `https://api.struct.ai/mcp` for Struct cloud. Use the endpoint your team supplies for a separate Struct deployment. Capy can prepare these settings in a **Review and add** card. [Capy MCP setup](https://docs.capy.ai/integrations/mcp#add-a-server-manually)
2. Choose OAuth with the **Automatic** OAuth client. On the server page, confirm **Owner** and **Project** before sign-in. For an organization server, have the person choose the saved connection mode. **Each member** uses the account of the thread's creator. **Shared** uses the account that connected the server. [Capy ownership and connection modes](https://docs.capy.ai/integrations/mcp#choose-the-owner)
3. Select **Connect** and have the person approve the correct Struct workspace and permissions. The staging write exercises need a read-and-write grant. Confirm the server is **Connected**. Discover the tools and verify one real read from a fresh thread in the project. [Struct MCP authentication](https://docs.struct.ai/mcp/authentication.md)

If the selected Struct server supports [workspace automation keys](https://docs.struct.ai/mcp/authentication.md#workspace-api-keys), a workspace admin can supply a scoped key. In Capy, select **API key** authentication and store `Authorization: Bearer <key>` under **Headers** in the server form. [Capy API key configuration](https://docs.capy.ai/integrations/mcp#use-an-api-key)

## Install the observability skill

Download the `struct-observability` ZIP from the [Struct skill releases](https://github.com/struct-dot-ai/agent-skills/releases). Extract `skills/struct-observability/SKILL.md` and keep its YAML frontmatter. Save it at that path in the Capy **Project** Drive. You can use **New skill** in Drive or ask Capy to save the file. If the repository already carries the skill in `.agents/skills/struct-observability/`, reuse that copy. Check that `$struct-observability` resolves in a fresh project thread. [Capy skill sources](https://docs.capy.ai/skills#skill-sources)

## Verify the setup from Slack

In Capy, open **Settings → Integrations → Slack** and connect the intended Slack workspace. Link your Slack account on the same page so Capy can associate your Slack mentions with your Capy account. Invite the app to the alert and deploy channels with `/invite @Capy`. Map each channel to the right project in Capy's Slack settings, or include `project="PROJECT NAME"` in the mention. Select the Capy app when typing each mention. [Capy Slack setup](https://docs.capy.ai/integrations/slack)

Replace the placeholders and start a fresh Slack thread in a test channel.

```text theme={null}
@Capy project="PROJECT NAME" Use $struct-observability and the Struct MCP connection for WORKSPACE. Read the MONITOR NAME monitor for staging and its latest firing, if one exists. Tell me which workspace and monitor you read, and reply in this thread. This is a read-only check.
```

Confirm the result matches the expected workspace and monitor and that Slack shows the **Capy** app as the reply author. Start an alert or deploy run in the original message's thread to get a normal Capy reply there. A send to a different thread can also show a requester footer. Check both the reply location and the app byline before enabling ongoing delivery. [Stable Slack app identities](https://docs.struct.ai/integrations/slack.md#persistent-agents-in-slack)

## Investigate an alert

After the read-only check passes, try an existing staging alert. Confirm the workspace and write authorization before sending the prompt in the alert's thread.

```text theme={null}
@Capy project="PROJECT NAME" Use $struct-observability to investigate this alert in WORKSPACE staging. Check the firing, telemetry and deployed revision. If a specific diagnostic question remains, I authorize one narrow temporary Observation with a short expiry. Verify fresh samples, remove the Observation, and confirm collection has stopped while normal work continues. Reply here with what triggered the alert, what you learned, and the cleanup evidence.
```

## Cover a merged PR

Start in the thread of a successful deploy. Supply the PR link and the approved staging notification group.

```text theme={null}
@Capy project="PROJECT NAME" Use $struct-observability to check coverage for PR LINK in this deploy. Confirm the change is running in WORKSPACE staging and inspect existing coverage. If a path is uncovered, I authorize one baseline Observation and one monitor. Verify fresh samples and preview the rule before enabling delivery to NOTIFICATION GROUP. Verify the first evaluation and reply here with what you added and the result.
```

## Schedule a verified workflow

Create a Capy automation with the same project and an authorized run-as account. For unattended runs, use a Capy service user with project access when available. Adapt the tested prompt to name the repository, environment, event or time window, and Slack destination. Run it once manually and verify Struct access and an app-authored reply in the intended destination before enabling a schedule. [Capy Automations](https://docs.capy.ai/automations)

## Fix a setup problem

* If the Capy machine reports `insufficient_credits`, check the organization's balance before retrying. [Capy billing](https://docs.capy.ai/admin/billing)
* If the connection or monitor read fails, use **Test** on the MCP server page, check the project and workspace, and reconnect with the required permissions. [Capy connection statuses](https://docs.capy.ai/integrations/mcp#statuses-and-what-to-do)
* If the skill is missing in a fresh thread, check the selected project and the `SKILL.md` path in Drive or the repository. [Capy skill format](https://docs.capy.ai/skills#the-skillmd-file)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.