Claude Code Integration
Claude Code is Anthropic’s official CLI and VS Code extension for Claude. This guide covers integrating Moira with Claude Code.
Prerequisites
- Claude Code installed and configured
- Moira server access (cloud or self-hosted)
- Valid Moira account credentials
Configuration
Use the Claude Code entry in MCP Clients for generated setup, scope, current authentication and official vendor instructions. Check the existing connection first; when authentication is required, use its OAuth path or native API-token alternative. Keep other servers and do not copy credentials into project instructions.
Verify Connection
Test the connection by asking Claude:
List available Moira workflowsYou should see your workflows listed.
Using Moira in Claude Code
Starting a Workflow
Find the current software development workflow in Moira and start it for this taskClaude will:
- Call
executionwithaction: "prepare"and the workflow ID - Call
executionwithaction: "execute"and the returned Start attempt ID - Receive the Process ID, Step attempt ID, and first directive
- Execute the directive
- Submit results via
execution(step) - Continue until workflow completes
Continuing a Session
If a session was interrupted, continue with:
Continue my Moira workflow with process ID abc-123Getting Help
Show Moira documentation for nodesClaude will call help with the topic.
CLAUDE.md Integration
For project-specific workflows, add to your CLAUDE.md:
## Moira Workflows
This project uses Moira for development workflows.
### Available Workflows
- `dev-flow` - Main development workflow- `review-flow` - Code review workflow
### Starting Development
To start a task, run the development workflow:
1. Prepare and execute a start for the `dev-flow` workflow2. Follow each step directive3. Submit results before moving to next stepKeep project-wide workflow selection rules in CLAUDE.md. Store an active Process ID in the task’s ignored workspace/handoff so transient run state does not become permanent project instructions.
Available Tools
The core workflow lifecycle uses these tools:
| Tool | Description |
|---|---|
workflow (list) | List available workflows |
execution (prepare, execute) | Prepare or execute a replay-safe workflow start |
execution (step) | Submit result, get next directive |
help | Get documentation |
settings | User settings management |
execution | Session and execution info |
See the MCP tools reference for the complete current catalog, input schemas, actions, and examples.
Troubleshooting
Connection Issues
- Verify MCP server URL is correct
- Check network connectivity
- Ensure authentication is valid
- Check Claude Code logs for errors
Workflow Not Starting
- Verify workflow ID exists:
workflowwithaction: "list" - Check workflow visibility permissions
- Ensure you have access to the workflow
Session Lost
If process ID is lost:
- Check
execution({ action: "executions" })for active executions - Resume with the correct process ID
- Retain the selected Process ID in the task’s ignored workspace/handoff
Best Practices
- Save Process IDs - Retain in the task’s ignored workspace/handoff
- Follow Directives - Execute exactly what the directive says
- Meet Completion Conditions - Verify before submitting
- Check Help - Use
helpwhen unsure
Related
- Quick Start - General setup guide
- MCP Clients - Other client integrations