By Trial and Error Inc
The reliable bridge between App Store Connect and AI assistants
You need iOS app metrics in Claude. The "official" MCP servers are broken. Manual exports waste hours. This fixes that.
A working MCP server for App Store Connect. Built in 3 hours. No dependencies on broken packages. It just works.
# Clone the repo
git clone https://github.com/TrialAndErrorAI/appstore-connect-mcp
cd appstore-connect-mcp
# Install dependencies
npm install
# Build
npm run build
# Configure Claude Desktop
# Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"appstore-connect": {
"command": "node",
"args": ["/path/to/appstore-connect-mcp/dist/index.js"],
"env": {
"APP_STORE_KEY_ID": "YOUR_KEY_ID",
"APP_STORE_ISSUER_ID": "YOUR_ISSUER_ID",
"APP_STORE_P8_PATH": "/path/to/key.p8"
}
}
}
}
# Restart Claude Desktop
- Go to App Store Connect
- Navigate to Users and Access → Keys
- Click "+" to generate a new key
- Select "Admin" or "Finance" role
- Download the .p8 file (ONLY downloadable once!)
- Note your Key ID and Issuer ID
Once configured, Claude can help you with:
- Financial Metrics: "What's our iOS monthly recurring revenue?"
- Subscription Analytics: "Show me active subscriber count and churn rate"
- App Performance: "List all our iOS apps with their current versions"
- Revenue Insights: "Calculate our ARR and growth rate"
- API Health: "Test the App Store Connect connection"
- Usage Monitoring: "Show API rate limit status"
More features coming soon: crash analytics, TestFlight metrics, customer reviews
See RFC-001-architecture.md for technical details.
appstore-connect-mcp/
├── PRFAQ.md # Product vision and FAQ
├── RFC-001-architecture.md # Technical specification
├── src/
│ ├── auth/ # JWT authentication
│ ├── api/ # App Store Connect client
│ ├── services/ # Domain logic
│ └── server/ # MCP server implementation
├── tests/ # Test suite
└── dist/ # Compiled output
# Install dependencies
npm install
# Run in development mode
npm run dev
# Run tests
npm test
# Build for production
npm run build
# Type check
npm run type-check
Our portfolio company RenovateAI is ranked #28 in Design Tools on the App Store. We needed real-time iOS metrics in Claude to make data-driven decisions. The existing solutions failed us:
@joshuarileydev/app-store-connect-mcp-server
- NPM 404 error- Manual API integration - Days of work, maintenance burden
- CSV exports - Manual, error-prone, time-consuming
So we built our own. Clean, typed, reliable. In 3 hours flat.
🚀 ALPHA RELEASE - MVP Complete, Ready for Testing
- PRFAQ written - Vision crystallized
- RFC drafted - Architecture defined
- Authentication module - JWT with P8 keys
- API client - Rate limiting, pagination, error handling
- MCP server - 8 tools exposed to Claude
- Core services - App and Finance services
- TypeScript setup - Full type safety
- Build system - Clean compilation
- Documentation - Setup guides and API docs
- Live testing with real App Store Connect account
- Analytics service implementation
- Comprehensive test suite
- npm package publishing
- Automated testing with GitHub Actions
- More financial report types
- TestFlight integration
- Customer reviews analysis
- Crash reporting metrics
Current Status: MVP complete, awaiting App Store Connect credentials for live testing
MIT - Use it, modify it, sell it. Just make it work.
The MCP server exposes 8 tools to Claude:
Tool | Description | Status |
---|---|---|
list_apps |
Get all apps in your account | ✅ Ready |
get_app |
Get detailed app information | ✅ Ready |
get_sales_report |
Fetch sales and subscription data | ✅ Ready |
get_revenue_metrics |
Calculate MRR, ARR, churn | ✅ Ready |
get_subscription_metrics |
Subscription analytics | ✅ Ready |
get_app_analytics |
User engagement metrics | 🔄 Stub |
test_connection |
Verify API access | ✅ Ready |
get_api_stats |
Rate limit monitoring | ✅ Ready |
Cause: Console output polluting JSON-RPC stream
Fix: Ensure no console.log
statements in production code
Check: /Users/sid/Library/Logs/Claude/mcp-server-appstore-connect.log
# Look for console output in logs
tail -f ~/Library/Logs/Claude/mcp-server-appstore-connect.log
Cause: Apple's JWT doesn't use 'scope' field
Fix: Remove scope from JWT payload in jwt-manager.ts
The JWT payload should only include:
{
"iss": "ISSUER_ID",
"iat": 1234567890,
"exp": 1234568890,
"aud": "appstoreconnect-v1"
}
Troubleshooting steps:
- Check credentials in Claude config
- Verify P8 file has correct permissions:
chmod 600 /path/to/key.p8
- Test authentication manually:
source .env && npm run test:auth
- Verify Claude Desktop config path:
~/Library/Application Support/Claude/claude_desktop_config.json
- Restart Claude Desktop after config changes
Common fixes:
- Add version parameter:
version: "1_4"
for reports - Vendor number required for financial data (find in App Store Connect → Payments)
- Ensure API key has "Finance" role permissions
Check:
- App ID exists and you have access permissions
- Date ranges are valid (Apple keeps limited historical data)
- Reports are available for your region/app
Solutions:
- Built-in exponential backoff should handle this automatically
- If persistent, reduce request frequency
- Check API usage: use the
get_api_stats
tool in Claude
Fix: Tokens auto-refresh every 19 minutes. If issues persist:
# Clear any cached tokens and restart
rm -f ~/.appstore-connect-token-cache
Enable detailed logging:
export DEBUG=appstore-connect:*
npm start
# Test P8 key format
openssl pkey -in /path/to/key.p8 -text -noout
# Test API connectivity
curl -H "Authorization: Bearer $(npm run generate-token)" \
https://api.appstoreconnect.apple.com/v1/apps
# Validate Claude config
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json | jq .
- Issues: GitHub Issues
- Discussions: Coming soon
- Email: mcp@trialanderror.ai
Built by Trial and Error Inc because broken dependencies are unacceptable.
First production use: RenovateAI - The AI that understands architecture.
"We don't wait for packages to work. We build." - Trial and Error Inc
Star this repo if you found it useful! We're building more MCP servers for the tools you actually use.