[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [FEMA state and local recovery resources](https://spiral.ai/integrations/opencode/fema-state-and-local-recovery-resources)

# How to Use FEMA state and local recovery resources in opencode

Returns recovery organizations, service descriptions, links, and telephone contacts from a state or territory directory. Use it to find regional housing, essential-needs, or other recovery services.

|  |  |
| --- | --- |
| Model | FEMA state and local recovery resources |
| Available through | Alexandria |
| Category | Public Records |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with FEMA state and local recovery resources in opencode

- Use FEMA state and local recovery resources to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from FEMA state and local recovery resources and tell me what changed since last week.
- Check FEMA state and local recovery resources and summarize what you find in three bullet points.
- Pull the newest data from FEMA state and local recovery resources and give me the result as a table.
- Check FEMA state and local recovery resources every morning and tell me only when something changed.

## How to set up FEMA state and local recovery resources in opencode

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run FEMA state and local recovery resources**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "fema-gov/us-disaster-assistance/get_local_referrals",
    "input": {
      "url": "<url>"
    }
  }'
```

Then paste one of the prompts above: opencode finds FEMA state and local recovery resources on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/opencode

## FEMA state and local recovery resources tools and prices

- [FEMA · Get local referrals](https://spiral.ai/tools/alexandria/fema-gov/us-disaster-assistance/get_local_referrals) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| url |  | — | Alternative to `slug`: a pasted fema.gov referral directory URL. |
| slug |  | — | Directory page slug from `list_referral_directories`, e.g. `american-samoa`, `commonwealth-northern-mariana-islands`, `virgin-islands`, `guam`, `puerto-rico`, `texas`. Pattern: ^[a-z0-9][a-z0-9-]*$. |
| category_contains |  | — | Optional case-insensitive substring filter on the Category cell, e.g. `Housing`, `Crisis`, `Legal`. Without it every row is returned. |

## What can you do with FEMA state and local recovery resources in opencode?

Build a county briefing in your project using FEMA disaster details, recovery resources, and community risk records. A coding agent can check dataset definitions and turn abbreviated measures into readable report labels.

### Regional preparedness exercise

Build a Texas exercise packet around a historical disaster, county risk comparisons, and recovery organizations participants could consult. Discover the relevant datasets and directories, check measure definitions, and include both local and national referral resources.

### Public recovery information portal

Create a community portal with declaration details, assistance summaries, regional service contacts, and national recovery resources. Add county risk context and comparison tables, with labels checked against FEMA's field definitions, NRI dictionary, and hazard codes.

### Newsroom disaster recovery explainer

Prepare a reported explainer combining one disaster's assistance totals, affected-community risk comparisons, and organizations offering recovery services. Use catalog metadata and dictionaries to check data selection and chart labels, and directory discovery to assemble regional and national resource sidebars.

### State recovery contact sheets

Find the appropriate FEMA referral directory and organize its recovery services into a contact sheet. Add national organizations in a separate section so readers can distinguish regional services from national resources.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## FEMA state and local recovery resources in other agents

- [Amp](https://spiral.ai/integrations/amp/fema-state-and-local-recovery-resources)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/fema-state-and-local-recovery-resources)
- [Claude](https://spiral.ai/integrations/claude-desktop/fema-state-and-local-recovery-resources)
- [Claude Code](https://spiral.ai/integrations/claude-code/fema-state-and-local-recovery-resources)
- [Cline](https://spiral.ai/integrations/cline/fema-state-and-local-recovery-resources)
- [Codex](https://spiral.ai/integrations/codex/fema-state-and-local-recovery-resources)
- [Cursor](https://spiral.ai/integrations/cursor/fema-state-and-local-recovery-resources)
- [Devin](https://spiral.ai/integrations/devin/fema-state-and-local-recovery-resources)
- [dots](https://spiral.ai/integrations/dots/fema-state-and-local-recovery-resources)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/fema-state-and-local-recovery-resources)
- [Gemini](https://spiral.ai/integrations/gemini/fema-state-and-local-recovery-resources)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/fema-state-and-local-recovery-resources)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/fema-state-and-local-recovery-resources)
- [goose](https://spiral.ai/integrations/goose/fema-state-and-local-recovery-resources)
- [Grok](https://spiral.ai/integrations/grok/fema-state-and-local-recovery-resources)
- [Grok Build](https://spiral.ai/integrations/grok-build/fema-state-and-local-recovery-resources)
- [Hermes](https://spiral.ai/integrations/hermes/fema-state-and-local-recovery-resources)
- [Instinct](https://spiral.ai/integrations/instinct/fema-state-and-local-recovery-resources)
- [Manus](https://spiral.ai/integrations/manus/fema-state-and-local-recovery-resources)
- [Muse](https://spiral.ai/integrations/muse/fema-state-and-local-recovery-resources)
- [Muse Code](https://spiral.ai/integrations/muse-code/fema-state-and-local-recovery-resources)
- [n8n](https://spiral.ai/integrations/n8n/fema-state-and-local-recovery-resources)
- [Notion](https://spiral.ai/integrations/notion/fema-state-and-local-recovery-resources)
- [OpenClaw](https://spiral.ai/integrations/openclaw/fema-state-and-local-recovery-resources)
- [Perplexity](https://spiral.ai/integrations/perplexity/fema-state-and-local-recovery-resources)
- [Raycast](https://spiral.ai/integrations/raycast/fema-state-and-local-recovery-resources)
- [VS Code](https://spiral.ai/integrations/vscode/fema-state-and-local-recovery-resources)
- [Windsurf](https://spiral.ai/integrations/windsurf/fema-state-and-local-recovery-resources)
- [Zapier](https://spiral.ai/integrations/zapier/fema-state-and-local-recovery-resources)

## More opencode guides

- [FEMA recovery directory index](https://spiral.ai/integrations/opencode/fema-recovery-directory-index)
- [Federal Court citation lookup](https://spiral.ai/integrations/opencode/federal-court-citation-lookup)
- [FEMA national recovery resources](https://spiral.ai/integrations/opencode/fema-national-recovery-resources)
- [Federal Court decision search](https://spiral.ai/integrations/opencode/federal-court-decision-search)
- [FEMA disaster details](https://spiral.ai/integrations/opencode/fema-disaster-details)
- [Federal Court decision text](https://spiral.ai/integrations/opencode/federal-court-decision-text)

## Questions about FEMA state and local recovery resources in opencode

**Can opencode use FEMA state and local recovery resources?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run FEMA state and local recovery resources like any built-in tool.

**How much does FEMA state and local recovery resources cost in opencode?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

**Do I need an Alexandria account to use FEMA state and local recovery resources in opencode?**

No. Spiral runs FEMA state and local recovery resources on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up FEMA state and local recovery resources in opencode?**

About two minutes: add the server, then sign in, then check it.

**Does opencode wait while FEMA state and local recovery resources runs?**

FEMA state and local recovery resources runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

**How far back does FEMA's disaster declaration history go?**

FEMA's declaration history starts in 1953. County information is unavailable before 1964, and historical fire management records are partial.

**How can I tell how often a FEMA dataset changes?**

The OpenFEMA catalog publishes update frequency and deprecation status for individual datasets. Check the catalog entry for the dataset you plan to use.

**What information describes the columns in FEMA datasets?**

OpenFEMA publishes field metadata containing descriptions, data types, and other attributes for each field. This helps distinguish similarly named measures before combining records.

**Are all organizations in FEMA's national referral list government agencies?**

No. FEMA's national referral list includes both government and nongovernment disaster recovery services.

**What does a state recovery resource listing contain?**

FEMA organizes referral information by state and resource category. The Texas directory illustrates the listing format: web links, assistance descriptions, and telephone contacts.

