# Bilagun MCP server Lets an AI assistant (Claude Desktop, Claude Code…) manage the Bilagun website in plain language, through the website's REST API. Examples: - "Crea la ficha de Kira, perra de unos 2 años, tamaño mediano, muy cariñosa. Déjala en borrador." - "Marca a Txuri como adoptada." - "Sube esta foto como principal de Hartz." - "Añade 'arena para gatos' a lo que necesitamos, en castellano y en euskera." ## Tools | Tool | What it does | |---|---| | `list_animals` | List animals (filter by language, status, species, text) | | `get_animal` | Full record: story, profile, translation | | `create_animal` | New animal (draft by default). With `language: "eu"` + `translationOf` it creates the Basque version and links it | | `update_animal` | Change name, story, texts or profile fields | | `set_status` | available / pending / adopted (both languages) | | `upload_photo` | Upload a JPG/PNG/WebP (local file or URL) as main photo or to the gallery | | `get_needs` / `set_needs` | Material needs list shown on the website (es / eu) | It can't read the contact messages, delete content or change settings: that stays in the dashboard. ## Setup 1. In WordPress create a dedicated user (role **Editor**) and, in *Users → Profile → Application passwords*, create one called "Asistente". Copy it (it is shown only once). It can be revoked at any time. 2. Install: `cd mcp && npm install` (Node 20+). 3. Add the server to your assistant. **Claude Code** ```bash claude mcp add bilagun \ --env BILAGUN_URL=https://gureametsabilagun.pireon.dev \ --env BILAGUN_USER=asistente \ --env "BILAGUN_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx" \ -- node /absolute/path/to/mcp/index.js ``` **Claude Desktop** (`claude_desktop_config.json`) ```json { "mcpServers": { "bilagun": { "command": "node", "args": ["/absolute/path/to/mcp/index.js"], "env": { "BILAGUN_URL": "https://gureametsabilagun.pireon.dev", "BILAGUN_USER": "asistente", "BILAGUN_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx" } } } } ``` Application passwords only work over HTTPS (the production site already is).