A master agent system that provides comprehensive weekly insights for Product Directors, powered by Anthropic's Claude AI and Model Context Protocol (MCP).
This system orchestrates multiple specialized agents to analyze different areas of your work:
- Weekly Recap: Team communications, activities, and customer interview preparation
- Business Health: ARR metrics, deals, churn, and voice of customer insights
- Product Engineering: Development progress, launches, usage metrics, and customer calls
- OKR Progress: Strategic initiative tracking and progress monitoring
The system is built using the agent architecture pattern with markdown-based instructions:
chief-of-staff-agent/
├── agents/ # Agent instruction files (markdown)
│ ├── weekly-recap.md
│ ├── business-health.md
│ ├── product-engineering.md
│ └── okr-progress.md
├── src/ # Core system code
│ ├── index.js # Master orchestrator
│ ├── agent-runner.js # Agent execution engine
│ ├── mcp-client.js # MCP connector integration
│ └── report-generator.js # Report generation
├── reports/ # Generated reports (auto-created)
├── config.json # Your configuration
├── .env # Environment variables
└── package.json
- Anthropic API Key: Get one from https://console.anthropic.com/
- Node.js: Version 18 or higher
- Claude Desktop with MCP Servers: The system uses your existing MCP connectors
You'll need MCP servers configured in Claude Desktop for:
- Slack (for team communications)
- Google Calendar (for calendar access)
- Hubspot (for CRM data)
- Jira/Atlassian (for tickets and ideas boards)
- Confluence (for documentation)
- Mixpanel (for analytics)
- Gong (for call recordings) - optional
-
Clone or download this repository
-
Install dependencies:
npm install
-
Create your configuration files:
# Copy and configure environment variables cp .env.example .env # Edit .env and add your ANTHROPIC_API_KEY # Copy and configure application settings cp config.example.json config.json # Edit config.json with your team and system details
-
Configure your .env file:
ANTHROPIC_API_KEY=your_api_key_here CLAUDE_MODEL=claude-sonnet-4-5-20250929 MCP_CONFIG_PATH=/Users/yourusername/Library/Application Support/Claude/claude_desktop_config.json # Optional: MCP connection settings (defaults shown) MCP_CONNECTION_TIMEOUT=30000 # Connection timeout in milliseconds (default: 30000 = 30s) MCP_MAX_RETRIES=3 # Maximum retry attempts per server (default: 3) MCP_RETRY_DELAY=2000 # Initial retry delay in milliseconds (default: 2000 = 2s)
-
Configure your config.json:
Update
config.jsonwith your:- Team member information (names, Slack IDs, emails)
- Slack channel IDs
- Jira team names and board IDs
- Calendar names
- Other integration details
{
"team": {
"ovTeamMembers": [
{
"name": "Team Member Name",
"slackId": "U1",
"email": "email@w.com",
"role": "Sr PM"
}
],
"pmEmailAddresses": ["email@workleap.com"],
"jiraTeams": ["Team 1", "Team 2"]
},
"slack": {
"channels": {
"teamChannels": ["C1234567890"],
"productGeneral": "C1234567890",
"csmChannels": ["C1234567890"],
"salesChannels": ["C1234567890"]
},
"myslackuserId": "U1234567890"
},
"calendar": {
"name": "Workleap"
},
"jira": {
"ovOkrBoardId": "8570290",
"aiOkrBoardId": "6898981",
"projectKey": "WPD"
},
"confluence": {
"vocPageId": "5022581198",
"spaceKey": "SCE"
},
"hubspot": {
"productFilter": "Officevibe"
},
"mixpanel": {
"projectId": "your_project_id"
},
"gong": {
"enabled": true
}
}npm startThis will execute all agents in sequence and generate a comprehensive report.
npm start weekly-recap business-healthRun only the agents you specify.
npm start -- --listnpm start -- --helpThe system generates:
- Console output: Real-time progress and summary
- Markdown report: Saved to
reports/weekly-report-YYYY-MM-DD-HH-MM-SS.md
Each agent is defined by a markdown file in the agents/ directory. To customize an agent:
- Open the corresponding
.mdfile (e.g.,agents/weekly-recap.md) - Modify the instructions, data sources, or output format
- Save the file
- Run the agent again
- Create a new markdown file in
agents/(e.g.,agents/my-custom-agent.md) - Define the agent's:
- Purpose
- Data sources
- Instructions
- Output format
- Add the agent name (without
.md) to theagentsarray insrc/index.js - Run the agent
Example agent structure:
# My Custom Agent
## Purpose
[What this agent does]
## Data Sources
- [List of data sources]
## Instructions
[Detailed instructions for Claude]
## Output Format
[Expected output structure]
## Success Criteria
[What defines successful execution]The system automatically:
- Loads your Claude Desktop MCP configuration
- Connects to all configured MCP servers
- Makes all MCP tools available to agents
- Handles tool calls transparently
Agents can use any MCP tool you have configured without code changes.
To run this weekly automatically, set up a cron job or scheduled task:
# Run every Monday at 8 AM
0 8 * * 1 cd /path/to/chief-of-staff-agent && npm start- Open Task Scheduler
- Create a new task
- Set trigger to weekly (e.g., Monday 8 AM)
- Set action to run:
cmd /c cd /path/to/chief-of-staff-agent && npm start
- Ensure
.envfile exists with your API key - Verify the key is valid
- Copy
config.example.jsontoconfig.json - Configure with your details
- Verify
MCP_CONFIG_PATHin.envpoints to your Claude Desktop config - Default path (macOS):
~/Library/Application Support/Claude/claude_desktop_config.json
- Ensure the required MCP server is configured in Claude Desktop
- Verify the MCP server is running correctly
- Check MCP server names in Claude Desktop config
- This indicates an MCP server connection timeout
- The system now automatically retries failed connections (default: 3 attempts)
- Connections are made in parallel to reduce startup time
- To fix persistent timeouts:
- Increase
MCP_CONNECTION_TIMEOUTin.env(e.g.,60000for 60 seconds) - Increase
MCP_MAX_RETRIESin.env(e.g.,5for more retry attempts) - Check if the MCP server process is slow to start or has dependencies
- Verify the MCP server command in Claude Desktop config is correct
- Increase
- Check that all required MCP servers are configured
- Verify API credentials for integrated services
- Review agent markdown files for correct tool usage
src/index.js: Master orchestrator and CLIsrc/agent-runner.js: Executes agents with Claude APIsrc/mcp-client.js: Manages MCP server connectionssrc/report-generator.js: Formats and saves reportsagents/*.md: Agent instruction files
You can test MCP connectivity:
import { MCPClientManager } from './src/mcp-client.js';
const client = new MCPClientManager();
await client.initialize();
console.log('Available tools:', client.getAvailableTools());- Keep agents focused: Each agent should have a specific purpose
- Update configurations regularly: Keep team info and IDs current
- Review agent outputs: Periodically check if agents are providing valuable insights
- Customize instructions: Tailor agent markdown files to your needs
- Monitor API usage: Be mindful of Claude API token consumption
Check out the web app in the /frontend folder.
Link: https://www.loom.com/embed/5f7731e4a6b743b4b047e041a668d2a4
To add features or improve agents:
- Modify agent markdown files for better instructions
- Update
config.example.jsonfor new configuration options - Extend
src/agent-runner.jsfor new capabilities - Add new agents following the existing pattern
MIT
For issues or questions:
- Review the Troubleshooting section
- Check agent markdown files for instruction clarity
- Verify MCP server configurations
- Ensure all API keys and credentials are valid
Architecture inspired by rachel wolan's agent-chief-of-staff
Powered by:
