# MCP and SKILL.md

Expose Restory workflows to agent environments through a local skill and agent-readable command examples.

## Fast links

- Web page: https://www.restory.pics/agent/docs/mcp-skill
- Markdown: https://www.restory.pics/api/agent/docs/markdown/mcp-skill
- Capabilities JSON: https://www.restory.pics/api/agent/capabilities
- OpenAPI JSON: https://www.restory.pics/api/agent/openapi
- API keys: https://www.restory.pics/agent

## Skill install

Restory ships an agent skill at `skills/restory-agent/SKILL.md`. Publish it through your skill distribution flow so agents can discover commands and examples.

```bash
npx skills add yourorg/restory-agent
```

## Agent behavior

The skill instructs agents to discover capabilities, check credits, submit jobs, poll completion, and return result URLs.

## MCP direction

The current production surface is API keys plus CLI/skill. An MCP server can wrap the same endpoints with tools such as `restore_photo`, `generate_image`, `generate_video`, `get_job`, `list_gallery`, and `get_credits`.

## Safety rules

Agents should never print API keys in user-facing output, should check credits before batches, and should poll jobs instead of assuming synchronous completion.