Claude Code Setup
Set up push notifications and permission hooks for Claude Code
Two ways to use Pushary with Claude Code: MCP tools (agent sends notifications and asks questions) and permission hooks (approve or deny tool calls from your phone). Use both together for the full experience.
Quick setup
The fastest path: one command that configures everything.
Get your API key
Sign up at pushary.com/sign-up and copy your API key from the dashboard. The key looks like pk_abc123.sk_xyz789.
Run the setup wizard
npx @pushary/agent-hooks setupThe wizard will:
- Add the Pushary MCP server to
~/.claude/settings.json - Optionally add permission hooks for Bash, Write, and Edit tools
- Save your API key to your shell profile
- Send a test notification
Enable notifications on your phone
Open pushary.com on your phone's browser and allow notifications. On iPhone, you may need to Add to Home Screen first.
That's it. Claude Code will now send you push notifications proactively.
MCP tools
Once connected, Claude Code can use these tools:
| Tool | Description |
|---|---|
send_notification | Send a push with optional rich context (files changed, errors, next steps) |
ask_user | Ask a question: yes/no, multiple choice, or free text |
wait_for_answer | Poll for your response |
cancel_question | Cancel a pending question |
Question types
Confirm (yes/no):
Ask me via Pushary: should I delete the 3 unused migration files?Select (multiple choice):
Ask me via Pushary which auth strategy to use: JWT tokens, Session cookies, or OAuth2Input (free text):
Ask me via Pushary what the new API endpoint path should beRich context notifications
When a task completes or fails, Claude Code sends a notification with a detail page:
Send me a Pushary notification that the refactoring is complete.
Include the files changed and suggested next steps.The notification links to a detail page showing the summary, files changed, error messages, and next steps.
Permission hooks
Permission hooks intercept Claude Code's built-in tool approval prompts and route them through push notifications. When Claude Code wants to run a bash command or edit a file, you get a push notification to approve or deny from your phone.
Manual setup
If you didn't use the setup wizard, add this to ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash|Write|Edit",
"hooks": [
{
"type": "command",
"command": "pushary-hook",
"timeout": 120
}
]
}
]
}
}And set your API key in your shell profile:
export PUSHARY_API_KEY="pk_abc123.sk_xyz789"Install the hook globally for faster startup: npm install -g @pushary/agent-hooks
Timeout policies
Configure what happens when you don't respond in time at pushary.com/dashboard/agent/policies:
| Tool | Timeout | If no response |
|---|---|---|
| Bash | 60s | Auto-deny |
| Write | 60s | Ask in terminal |
| Edit | 45s | Ask in terminal |
| Read | 0s | Auto-approve |
Auto-approve: allow the action without waiting. Use for safe read-only tools.
Auto-deny: block the action. Use for destructive tools like Bash.
Ask in terminal: fall back to Claude Code's normal terminal permission prompt. Use when you might be at your computer.
How it works
- Claude Code wants to run
bash: rm -rf ./dist - The hook sends a push notification: "Allow bash: rm -rf ./dist?"
- You tap Yes or No on your phone
- Claude Code proceeds or stops based on your answer
- If you don't respond within the timeout, the configured fallback kicks in
Agent identification
When you run multiple Claude Code sessions, each notification shows which session is asking. The hook automatically labels notifications as Claude Code - {project folder name}.
Install the skill
For better agent behavior, install the Pushary skill:
npx skills add Pushary/pushary-skillThe skill teaches Claude Code when to send notifications proactively (after multi-step tasks, on errors) and how to write concise notification copy.