[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [Wikimedia project directory](https://spiral.ai/integrations/opencode/wikimedia-project-directory)

# How to Use Wikimedia project directory in opencode

Returns available Wikimedia projects with their identifiers, names, URLs, project types, and languages. Use it to find the actual wiki for a research task or validate the destination for a content lookup.

|  |  |
| --- | --- |
| Model | Wikimedia project directory |
| Available through | Alexandria |
| Category | Web |
| Price | $0.013 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Wikimedia project directory in opencode

- Use Wikimedia project directory to find Portuguese Wikipedia and compare its returned identifier and URL with our source configuration.
- Use Wikimedia project directory to retrieve available French-language projects and generate a source-menu data file containing their names, identifiers, and URLs.
- Use Wikimedia project directory to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from Wikimedia project directory and tell me what changed since last week.
- Check Wikimedia project directory and summarize what you find in three bullet points.

## How to set up Wikimedia project directory 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 Wikimedia project directory**: 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": "wikipedia/reference/projects",
    "input": {
      "code": "wiki"
    }
  }'
```

Then paste one of the prompts above: opencode finds Wikimedia project directory on Spiral, shows the price and runs it.

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

## Wikimedia project directory tools and prices

- [Wikipedia · Projects](https://spiral.ai/tools/alexandria/wikipedia/reference/projects) (Alexandria): $0.013 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| code | wiki, wiktionary, wikisource, wikiquote, wikibooks, wikiversity, wikivoyage | — | Only projects of this type, for example `wiki` for Wikipedia. |
| language |  | — | Only projects in this language code, for example `de`. |

## What can you do with Wikimedia project directory in opencode?

Build a language selector or validate wiki destinations against Wikimedia's reference records. A coding agent can compare the returned names, codes, directions, and project URLs with the project's configuration.

### Create a wiki destination index

Build an index of available Wikimedia project identifiers and URLs for a research assistant's source menu.

### Validate a multilingual research plan

Resolve French, German, and Japanese to Wikimedia language codes, then confirm the available project destinations before planning content lookups.

### Audit localization settings

Compare an application's configured languages and wiki destinations with the returned directories. Flag unmatched codes and project identifiers for review.

### Map educational sources by language

Prepare a source directory for an educational assistant by matching language labels to available Wikipedia, Wikibooks, and Wikiversity projects.

### Review directory changes

Compare occasional directory refreshes with an earlier copy and report added or removed language codes, changed names, and changed project destinations.

## Overview

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

## Wikimedia project directory in other agents

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

## More opencode guides

- [Wikidata property details](https://spiral.ai/integrations/opencode/wikidata-property-details)
- [Wikipedia article text](https://spiral.ai/integrations/opencode/wikipedia-article-text)
- [Wikidata labels](https://spiral.ai/integrations/opencode/wikidata-labels)
- [Wikipedia language codes](https://spiral.ai/integrations/opencode/wikipedia-language-codes)
- [Wikidata item details](https://spiral.ai/integrations/opencode/wikidata-item-details)
- [Wikipedia structured article](https://spiral.ai/integrations/opencode/wikipedia-structured-article)

## Questions about Wikimedia project directory in opencode

**Can opencode use Wikimedia project directory?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Wikimedia project directory like any built-in tool.

**How much does Wikimedia project directory cost in opencode?**

$0.013 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 Wikimedia project directory in opencode?**

No. Spiral runs Wikimedia project directory on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Wikimedia project directory in opencode?**

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

**Does opencode wait while Wikimedia project directory runs?**

Wikimedia project directory runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

**Does this reference data cover only Wikipedia?**

It supports Wikimedia's textual projects, including Wikipedia, Wiktionary, Wikibooks, Wikisource, Wikiquote, Wikiversity, and Wikivoyage. Language metadata identifies languages; project metadata identifies the individual wikis.

**How often does the directory change?**

Wikimedia describes reference metadata as changing rarely and recommends caching it instead of fetching it on every run. This is directory data, so article edit frequency does not describe its freshness.

**Are language records and project records interchangeable?**

No. Language records include English and localized language names, while project records identify a particular wiki with its identifier, URL, project type, and language.

**Does the article result cap also restrict these directories?**

Wikimedia documents its result-limit setting as applying only to On-demand endpoints. The language and project directories are metadata endpoints, so that article cap does not describe their directory coverage.

**Can I reuse the returned reference data?**

Wikimedia Enterprise's terms say returned content remains subject to the applicable Free Culture and Open Source licenses. Reuse must follow the license that applies to the content.

