Skip to content

Instantly share code, notes, and snippets.

@julianduque
Last active May 6, 2025 17:39
Show Gist options
  • Save julianduque/98a9aa04c21cac7be1b6849a70b471cb to your computer and use it in GitHub Desktop.
Save julianduque/98a9aa04c21cac7be1b6849a70b471cb to your computer and use it in GitHub Desktop.
Heroku Cursor Rules
description globs alwaysApply
Heroku Development Best Practices
false

Heroku Development Best Practices

Project Setup and Deployment

  • Git Repository Required: Every Heroku project must be initialized as a Git repository before deployment
  • Remote Configuration: Ensure the Git remote 'heroku' points to your Heroku app with heroku git:remote --app {app-name}
  • Procfile: Always include a Procfile that explicitly declares process types and commands (e.g., web: npm start)
  • Environment Variables: Store configuration in environment variables, not in code (12-factor app methodology)
  • Add-ons: Use Heroku add-ons for databases, caching, and other service dependencies to maintain scalability
  • Authentication Check: Verify if you're already logged into Heroku before attempting login with heroku whoami
  • Database Queries: Before attempting any query to the Postgres database, fetch the schema to understand its shape

User MCP over CLI

If the heroku-mcp-server is enabbled, prefer using the available tools over the CLI

Heroku CLI Commands

These commands help you manage Heroku applications throughout their lifecycle.

heroku-login

Authenticate with Heroku CLI - required before performing any commands that access your account

heroku login

heroku-whoami

Verify current authentication status and account information

heroku whoami

heroku-create-app

Create a new Heroku application with an optional custom name (uses a random name if not specified)

heroku create {app-name}

heroku-deploy

Push code from your local git repository to Heroku for deployment

git push heroku main

Note: Use git push heroku master for older repositories using 'master' as the main branch

heroku-logs

Stream application logs in real-time for monitoring and debugging

heroku logs --tail --app {app-name}

Tip: Add --source app to filter for just application logs, or specify number of lines with --num {lines}

heroku-add-addon

Provision an add-on service for your application (databases, monitoring, etc.)

heroku addons:create {addon-name} --app {app-name}

Examples: heroku addons:create heroku-postgresql:hobby-dev or heroku addons:create papertrail:choklad

heroku-ps-scale

Adjust application capacity by scaling dynos up or down

heroku ps:scale web={count:1} --app {app-name}

Best Practice: Scale worker processes separately with heroku ps:scale worker={count}

heroku-config

List all environment variables currently configured for the application

heroku config --app {app-name}

heroku-set-config

Add or update environment variables for configuration

heroku config:set {KEY}={value} --app {app-name}

Security Note: Never commit sensitive configuration values to your repository

heroku-restart

Restart all dynos or a specific dyno type for the application

heroku restart --app {app-name}

Specific Restart: Use heroku restart {dyno-type} --app {app-name} to restart only specific dyno types

heroku-run

Execute a one-off command in a temporary dyno - useful for migrations, REPL sessions, etc.

heroku run {command} --app {app-name}

Example: heroku run npm run db:migrate --app {app-name} or heroku run bash

heroku-apps

List all applications associated with your Heroku account

heroku apps

Filter Option: Use --team {team-name} to filter apps by team

heroku-app-info

Display detailed information about a specific application

heroku apps:info --app {app-name}

heroku-maintenance

Enable or disable maintenance mode (temporary user-facing downtime notification)

heroku maintenance:{mode:on|off} --app {app-name}

Usage: Enable before major deployments or database migrations

heroku-pg-info

View status and configuration details for your PostgreSQL database

heroku pg:info --app {app-name}

heroku-pg-psql

Open an interactive PostgreSQL console for direct database operations

heroku pg:psql --app {app-name}

Advanced Option: Specify a specific database with heroku pg:psql {DATABASE_URL} --app {app-name}

heroku-releases

View deployment history and release information

heroku releases --app {app-name}

Rollback Option: Use heroku rollback {version} --app {app-name} to revert to a previous release

heroku-builds

View build history for the application

heroku builds --app {app-name}

Tip: View build logs with heroku builds:info {build-number} --app {app-name}

Troubleshooting

Common Deployment Issues

  • H10 - App Crashed: Check application logs with heroku logs --tail to identify runtime errors
  • H14 - No Web Dynos Running: Ensure web dynos are properly scaled with heroku ps:scale web=1
  • H20 - App Boot Timeout: Your app is taking too long to start; optimize startup time or increase boot timeout
  • R14 - Memory Quota Exceeded: Application is using too much memory; optimize memory usage or upgrade dyno type

Authentication Problems

  • If you receive "not logged in" errors, run heroku login and follow browser authentication
  • For CI/CD environments, use HEROKU_API_KEY environment variable instead of interactive login
  • Check account verification status with heroku auth:whoami

Build Failures

  • Check buildpack compatibility with your application stack
  • Verify that all dependencies are properly declared in package.json, requirements.txt, Gemfile, etc.
  • Review build logs with heroku builds:info {build-number} for specific error messages
  • Ensure you're not exceeding slug size limits (500MB); use .slugignore to exclude unnecessary files

Database Connection Issues

  • Confirm database add-on is provisioned with heroku addons
  • Check connection string with heroku config:get DATABASE_URL
  • For local development, use heroku config:get DATABASE_URL -s >> .env to copy connection strings

Port Configuration

  • Always use process.env.PORT (Node.js), os.environ['PORT'] (Python), or equivalent in your code, unless specified, for example APP_PORT in Heroku AppLink
  • Never hardcode port values in your application unless specified, for example in Heroku AppLink

Add-ons Troubleshooting

  • Verify add-on provisioning status with heroku addons
  • Check if billing verification is required for the add-on you're trying to use
  • Review service status on Heroku Status page for outages or maintenance

Follow Output Recommendations

  • If you see any warning from the output log follow the recommendation
  • If there is an error in the deployment process fix it by following the recommendation from the output
# Heroku Dev Center - Documentation
Technical documentation that describes the Heroku platform.
## Getting Started
- [Get Started](https://devcenter.heroku.com/start): A guide to help new users begin their journey with Heroku, covering initial setup and basic concepts.
- [Documentation](https://devcenter.heroku.com/categories/reference): The main repository of Heroku's technical documentation, providing detailed information on various topics.
- [Dev Center](https://devcenter.heroku.com/): The central hub for developers to access resources, guides, and support for using Heroku.
## Language Support
- [Language Support](https://devcenter.heroku.com/categories/reference#language-support): Overview of programming languages supported by Heroku.
- [Node.js](https://devcenter.heroku.com/articles/getting-started-with-nodejs): Documentation specific to deploying and managing Node.js applications on Heroku.
- [Ruby on Rails](https://devcenter.heroku.com/articles/getting-started-with-rails6): Guidelines for deploying Ruby on Rails applications on the Heroku platform.
- [Ruby](https://devcenter.heroku.com/articles/getting-started-with-ruby): Resources for Ruby developers using Heroku.
- [Python](https://devcenter.heroku.com/articles/getting-started-with-python): Documentation for deploying Python applications on Heroku.
- [Java](https://devcenter.heroku.com/articles/getting-started-with-java): Information on deploying Java applications on Heroku.
- [PHP](https://devcenter.heroku.com/articles/getting-started-with-php): Guidelines for PHP application deployment on Heroku.
- [Go](https://devcenter.heroku.com/articles/getting-started-with-go): Resources for deploying Go applications on Heroku.
- [Scala](https://devcenter.heroku.com/articles/getting-started-with-scala): Documentation for Scala applications on Heroku.
- [Clojure](https://devcenter.heroku.com/articles/getting-started-with-clojure): Guidelines for deploying Clojure applications on Heroku.
- [.NET](https://devcenter.heroku.com/articles/getting-started-with-dotnet): Resources for .NET applications on Heroku.
## Python Support
<rule>When working with Python applications make sure to follow the best practices specified below:</rule>
- [Specifying a Python Version](https://devcenter.heroku.com/articles/python-runtimes): By default, newly created Python apps use the latest patch version of Python 3.13.
- [Deploying Python Applications with Gunicorn](https://devcenter.heroku.com/articles/python-gunicorn): This guide will walk you through deploying a new Python application to Heroku using the Gunicorn web server
- [Python Behavior in Heroku](https://devcenter.heroku.com/articles/python-behavior-in-heroku): How Python applications behave on Heroku, with Auto-Detection, Build Behaviour, and more recommendations
## Deployment
- [Deployment](https://devcenter.heroku.com/categories/deployment): Comprehensive guide on deploying applications to Heroku.
- [Preparing a Codebase for Heroku Deployment](https://devcenter.heroku.com/articles/preparing-a-codebase-for-heroku-deployment): Steps to prepare your application for deployment on Heroku.
- [Deploying with Git](https://devcenter.heroku.com/categories/deploying-with-git): Instructions for deploying applications using Git.
- [Deploying with Docker](https://devcenter.heroku.com/categories/deploying-with-docker): Guidelines for deploying applications using Docker containers.
- [Deployment Integrations](https://devcenter.heroku.com/categories/deployment-integrations): Information on integrating various deployment tools with Heroku.
- [Continuous Delivery & Integration](https://devcenter.heroku.com/categories/continuous-delivery): Best practices for implementing continuous delivery and integration on Heroku.
- [Releases](https://devcenter.heroku.com/articles/releases): Overview of managing application releases on Heroku.
- [Release Phase](https://devcenter.heroku.com/articles/release-phase): Details on the release phase of application deployment.
- [Pipelines](https://devcenter.heroku.com/articles/pipelines): Information on using pipelines for managing application deployments.
## Monitoring & Metrics
- [Monitoring & Metrics](https://devcenter.heroku.com/categories/monitoring-metrics): Overview of monitoring tools and metrics available on Heroku.
- [The Heroku Dashboard](https://devcenter.heroku.com/articles/heroku-dashboard): Guide to using the Heroku Dashboard for application management.
- [Application Metrics](https://devcenter.heroku.com/articles/metrics): Information on tracking application performance metrics.
- [Language Runtime Metrics](https://devcenter.heroku.com/articles/language-runtime-metrics): Metrics specific to the runtime environments of supported languages.
- [Production Check](https://devcenter.heroku.com/articles/production-check): Tools and practices for checking application health in production.
- [Heroku Telemetry](https://devcenter.heroku.com/articles/heroku-telemetry): Overview of telemetry features for monitoring applications.
- [Working with Heroku Telemetry Drains](https://devcenter.heroku.com/articles/working-with-heroku-telemetry-drains): Instructions for using telemetry drains to collect application data.
## App Performance
- [App Performance](https://devcenter.heroku.com/categories/app-performance): Best practices for optimizing application performance on Heroku.
- [Worker Dynos, Background Jobs and Queueing](https://devcenter.heroku.com/articles/background-jobs-queueing): Guidelines for managing background jobs and worker dynos.
- [Scheduled Jobs and Custom Clock Processes](https://devcenter.heroku.com/articles/scheduled-jobs-custom-clock-processes): Information on scheduling jobs and creating custom processes.
- [Using AWS S3 to Store Static Assets and File Uploads](https://devcenter.heroku.com/articles/s3): Instructions for integrating AWS S3 for asset storage.
- [HTTP Caching](https://devcenter.heroku.com/articles/http-caching): Best practices for implementing HTTP caching to improve performance.
- [Optimizing Dyno Usage](https://devcenter.heroku.com/articles/optimizing-dyno-usage): Tips for optimizing the use of dynos to manage application load.
- [Increasing Application Performance with HTTP Cache Headers](https://devcenter.heroku.com/articles/increasing-application-performance-with-http-cache-headers): Techniques for using HTTP cache headers to enhance performance.
- [Compressing HTTP Messages with Gzip](https://devcenter.heroku.com/articles/compressing-http-messages-with-gzip): Guidelines for using Gzip compression to reduce payload size.
- [Getting the Most Out of Memcache](https://devcenter.heroku.com/articles/advanced-memcache): Best practices for utilizing Memcache for caching.
- [Using Amazon CloudFront CDN](https://devcenter.heroku.com/articles/using-amazon-cloudfront-cdn): Instructions for integrating Amazon CloudFront as a CDN.
## Add-ons
- [Add-ons Overview](https://devcenter.heroku.com/categories/add-ons): Introduction to Heroku add-ons and their functionalities.
- [Managing Add-ons](https://devcenter.heroku.com/articles/managing-add-ons): Guidelines for managing and configuring add-ons in your Heroku applications.
- [Sending Email from Your App](https://devcenter.heroku.com/articles/smtp): Instructions for integrating email services into your application.
- [All Add-ons](https://devcenter.heroku.com/categories/add-on-documentation): A comprehensive list of available add-ons for Heroku applications.
## Collaboration
- [Collaboration](https://devcenter.heroku.com/categories/collaboration): Overview of collaboration features for teams using Heroku.
- [Collaborating with Other Developers on Your App](https://devcenter.heroku.com/articles/collaborating): Best practices for working with other developers on shared applications.
- [Getting Started as a Collaborator](https://devcenter.heroku.com/articles/collab): A guide for new collaborators on Heroku projects.
- [Heroku Teams](https://devcenter.heroku.com/articles/heroku-teams): Information on managing teams within the Heroku platform.
- [Transferring Apps](https://devcenter.heroku.com/articles/transferring-apps): Instructions for transferring applications between accounts or teams.
- [Add-on Controls for Teams](https://devcenter.heroku.com/articles/addon-controls): Guidelines for managing add-on permissions within teams.
- [Heroku Team Permissions and Allowed Actions](https://devcenter.heroku.com/articles/team-permissions): Overview of permissions and actions available to team members.
## Security
- [Security](https://devcenter.heroku.com/categories/security): Overview of security features and best practices on Heroku.
- [Heroku Security & Compliance Resources and Features](https://devcenter.heroku.com/articles/security-and-compliance-resources-and-features): Detailed information on security resources and compliance features.
- [App Security](https://devcenter.heroku.com/categories/app-security): Best practices for securing applications on Heroku.
- [Identities & Authentication](https://devcenter.heroku.com/categories/identities-authentication): Guidelines for managing user identities and authentication.
- [Private Spaces](https://devcenter.heroku.com/categories/private-spaces): Information on using private spaces for enhanced security.
- [Compliance](https://devcenter.heroku.com/categories/compliance): Overview of compliance standards and practices on Heroku.
## Heroku Enterprise
- [Heroku Enterprise](https://devcenter.heroku.com/categories/heroku-enterprise): Overview of Heroku's enterprise offerings and features.
- [Heroku Enterprise Overview](https://devcenter.heroku.com/articles/heroku-enterprise): Detailed information on the capabilities of Heroku Enterprise.
- [Enterprise Accounts](https://devcenter.heroku.com/categories/enterprise-accounts): Guidelines for managing enterprise accounts on Heroku.
- [Enterprise Teams](https://devcenter.heroku.com/categories/enterprise-teams): Information on managing teams within the enterprise environment.
- [Heroku Connect (Salesforce sync)](https://devcenter.heroku.com/categories/heroku-connect): Instructions for integrating Heroku with Salesforce using Heroku Connect.
## Patterns & Best Practices
- [Patterns & Best Practices](https://devcenter.heroku.com/categories/best-practices): A collection of best practices for developing on Heroku.
- [Application Load Testing](https://devcenter.heroku.com/articles/application-load-testing): Guidelines for conducting load testing on Heroku applications.
- [Heroku Postgres Monitoring Best Practices](https://devcenter.heroku.com/articles/monitoring-heroku-postgres): Best practices for monitoring Heroku Postgres databases.
- [Monitoring Heroku Apps](https://devcenter.heroku.com/articles/monitoring-apps): Techniques for effectively monitoring applications hosted on Heroku.
- [PgBouncer Configuration](https://devcenter.heroku.com/articles/best-practices-pgbouncer-configuration): Instructions for configuring PgBouncer for database connection pooling.
- [Running Kafka Connectors on Heroku](https://devcenter.heroku.com/articles/running-kafka-connectors-on-heroku): Guidelines for deploying Kafka connectors on Heroku.
- [Writing Best Practices For Application Logs](https://devcenter.heroku.com/articles/writing-best-practices-for-application-logs): Best practices for logging in Heroku applications.
- [Optimizing Resource Costs](https://devcenter.heroku.com/articles/optimizing-resource-costs): Tips for managing and optimizing resource costs on Heroku.
## Extending Heroku
- [Extending Heroku](https://devcenter.heroku.com/categories/extending-heroku): Overview of how to extend Heroku's capabilities through various integrations.
- [Webhook Events](https://devcenter.heroku.com/articles/webhook-events): Information on using webhooks to integrate with external services.
- [Review Apps](https://devcenter.heroku.com/articles/github-integration-review-apps): Guidelines for using review apps to streamline the development process.
- [Platform API](https://devcenter.heroku.com/categories/platform-api): Documentation for using the Heroku Platform API for automation and integration.
- [App Webhooks](https://devcenter.heroku.com/categories/app-webhooks): Instructions for setting up webhooks for applications on Heroku.
- [Heroku Labs](https://devcenter.heroku.com/categories/labs): Overview of experimental features and tools available in Heroku Labs.
- [Building Add-ons](https://devcenter.heroku.com/categories/building-add-ons): Guidelines for creating custom add-ons for Heroku.
- [Building CLI Plugins](https://devcenter.heroku.com/categories/building-cli-plugins): Instructions for developing command-line interface plugins for Heroku.
- [Developing Buildpacks](https://devcenter.heroku.com/categories/buildpacks): Guidelines for creating custom buildpacks for application deployment.
## Accounts & Billing
- [Accounts & Billing](https://devcenter.heroku.com/categories/billing): Overview of account management and billing processes on Heroku.
- [Credit Card Processing](https://devcenter.heroku.com/articles/credit-card-processing): Information on managing credit card payments for Heroku services.
- [Account Management](https://devcenter.heroku.com/articles/account-management): Guidelines for managing user accounts on Heroku.
- [Usage & Billing](https://devcenter.heroku.com/articles/usage-and-billing): Overview of usage tracking and billing information.
- [Account Verification](https://devcenter.heroku.com/articles/account-verification): Instructions for verifying user accounts on Heroku.
## Troubleshooting & Support
- [Troubleshooting & Support](https://devcenter.heroku.com/categories/troubleshooting): Resources for troubleshooting issues and accessing support.
- [Heroku Status](https://devcenter.heroku.com/articles/heroku-status): Real-time status updates for Heroku services.
- [Heroku Error Codes](https://devcenter.heroku.com/articles/error-codes): A list of common error codes and their meanings.
- [Error Pages](https://devcenter.heroku.com/articles/error-pages): Information on handling error pages in Heroku applications.
- [Understanding Heroku Postgres Log Statements and Common Errors](https://devcenter.heroku.com/articles/postgres-logs-errors): Guidelines for interpreting log statements and errors in Heroku Postgres.
- [Request Timeout](https://devcenter.heroku.com/articles/request-timeout): Information on handling request timeouts in applications.
- [Recovering an Offline Application](https://devcenter.heroku.com/articles/application-offline): Steps to recover applications that have gone offline.
- [R14 - Memory Quota Exceeded in Ruby (MRI)](https://devcenter.heroku.com/articles/ruby-memory-use): Explanation of the R14 error and how to resolve it.
- [Wrong Version of Ruby or Rake in App](https://devcenter.heroku.com/articles/wrong-version-of-ruby-or-rake-in-app): Guidelines for resolving version conflicts in Ruby applications.
- [Paid Support](https://devcenter.heroku.com/articles/paid-support): Information on accessing paid support options for Heroku users.
- [Support Channels](https://devcenter.heroku.com/articles/support-channels): Overview of available support channels for Heroku users.
## Integrating with Salesforce
- [Integrating with Salesforce](https://devcenter.heroku.com/categories/integrating-with-salesforce): Overview of integrating Heroku with Salesforce.
- [Integrating Heroku and the Salesforce Platform Overview](https://devcenter.heroku.com/articles/integrating-heroku-and-salesforce): Detailed information on the integration process.
- [Security and Heroku/Salesforce Integrations](https://devcenter.heroku.com/articles/security-and-heroku-salesforce-integrations): Best practices for securing integrations between Heroku and Salesforce.
- [Salesforce Functions Retirement](https://devcenter.heroku.com/articles/salesforce-functions-retirement): Information on the retirement of Salesforce Functions and its impact on Heroku users.
- [Publish and Subscribe to Salesforce Platform Events](https://devcenter.heroku.com/articles/publish-and-subscribe-to-salesforce-platform-events): Guidelines for working with Salesforce platform events.
- [Using the Salesforce REST API with Heroku](https://devcenter.heroku.com/articles/using-the-salesforce-rest-api-with-heroku): Instructions for integrating the Salesforce REST API with Heroku applications.
- [Connecting Heroku Postgres to Salesforce Data Cloud](https://devcenter.heroku.com/articles/connecting-heroku-postgres-to-salesforce-data-cloud): Steps for connecting Heroku Postgres databases to Salesforce Data Cloud.
- [Make Apex and Workflow Callouts to Your API](https://devcenter.heroku.com/articles/make-apex-and-workflow-callouts-to-your-api): Guidelines for making API calls from Salesforce to Heroku applications.
- [Getting Started with Heroku AppLink (Pilot)](https://devcenter.heroku.com/articles/getting-started-heroku-integration): Heroku AppLink (formerly Heroku Integration) exposes your Heroku apps as API services in Salesforce. This guide helps you set up the Heroku AppLink add-on via the Heroku CLI and the Heroku AppLink CLI plugin.
- [Heroku AppLink](https://devcenter.heroku.com/articles/heroku-integration): Heroku AppLink (formerly Heroku Integration) is an add-on that exposes Heroku apps as API services in Salesforce. Heroku developers can build APIs on Heroku that Salesforce admins and developers can use to execute actions in flows, Apex, Data Cloud, and Agentforce.
- [Heroku AppLink CLI Plugin](https://devcenter.heroku.com/articles/heroku-integration-cli): The Heroku AppLink CLI plugin for the Heroku CLI allows you to set up and manage connections with the Heroku AppLink add-on (formerly Heroku Integration).
## Additional Resources
- [All articles](https://devcenter.heroku.com/articles): A comprehensive list of all articles available in the Heroku documentation.
## Third-Party Integrations
- [QRackajack](https://devcenter.heroku.com/articles/qrackajack): Information on the QRackajack integration with Heroku.
- [Hello Query](https://devcenter.heroku.com/articles/helloquery): Overview of the Hello Query integration.
- [Mailgun](https://devcenter.heroku.com/articles/mailgun): Guidelines for integrating Mailgun with Heroku.
- [Activity To Go - Deploy Hooks alternative](https://devcenter.heroku.com/articles/activitytogo): Information on using Activity To Go for deployment hooks.
- [Moesif API Observability and Monetization](https://devcenter.heroku.com/articles/moesif): Overview of Moesif integration for API observability.
- [Bucketeer](https://devcenter.heroku.com/articles/bucketeer): Guidelines for using Bucketeer with Heroku.
- [PostGIS: Using Geospatial Data with Rails](https://devcenter.heroku.com/articles/postgis): Instructions for using PostGIS with Ruby on Rails on Heroku.
- [Memcached Cloud](https://devcenter.heroku.com/articles/memcachedcloud): Information on integrating Memcached Cloud with Heroku.
- [GRAX](https://devcenter.heroku.com/articles/grax): Overview of GRAX integration with Heroku.
- [Logplex](https://devcenter.heroku.com/articles/logplex): Guidelines for using Logplex for logging in Heroku applications.
- [Judoscale Universal Autoscaler](https://devcenter.heroku.com/articles/judoscale): Information on using Judoscale for autoscaling applications.
- [Deploying with Git](https://devcenter.heroku.com/articles/git): Instructions for deploying applications using Git.
- [Fixie](https://devcenter.heroku.com/articles/fixie): Overview of the Fixie integration with Heroku.
- [Logging](https://devcenter.heroku.com/articles/logging): Best practices for logging in Heroku applications.
- [Librato](https://devcenter.heroku.com/articles/librato): Guidelines for integrating Librato with Heroku.
- [123 Dyno](https://devcenter.heroku.com/articles/d123): Information on the 123 Dyno integration.
- [Keen](https://devcenter.heroku.com/articles/keen): Overview of Keen integration with Heroku.
- [SolarWinds AppOptics](https://devcenter.heroku.com/articles/appoptics): Guidelines for using SolarWinds AppOptics with Heroku.
- [IronMQ Message Queue as a Service](https://devcenter.heroku.com/articles/iron_mq): Information on integrating IronMQ with Heroku.
- [Cache To Go](https://devcenter.heroku.com/articles/cachetogo): Overview of Cache To Go integration with Heroku.
- [Pusher Channels](https://devcenter.heroku.com/articles/pusher): Guidelines for using Pusher Channels with Heroku.
- [Application Portfolio Manager](https://devcenter.heroku.com/articles/portfoliomanager): Information on using Application Portfolio Manager with Heroku.
- [Logs & Telemetry (formerly Logtail)](https://devcenter.heroku.com/articles/logtail): Overview of Logs & Telemetry integration with Heroku.
- [Bonsai Elasticsearch](https://devcenter.heroku.com/articles/bonsai): Guidelines for integrating Bonsai Elasticsearch with Heroku.
- [MemCachier](https://devcenter.heroku.com/articles/memcachier): Information on using MemCachier with Heroku.
- [SearchBox Elasticsearch](https://devcenter.heroku.com/articles/searchbox): Overview of SearchBox Elasticsearch integration with Heroku.
{
"mcpServers": {
"heroku-mcp-server": {
"command": "npx",
"args": [
"-y",
"@heroku/mcp-server"
],
"env": {
"HEROKU_API_KEY": "<HEROKU_API_KEY>"
}
},
"browser": {
"command": "heroku-browser-automation"
},
"heroku-docs-mcp": {
"command": "uvx",
"args": [
"--from",
"mcpdoc",
"mcpdoc",
"--urls",
"HerokuDevCenter:file:///Users/jduque/work/dev/AI/llmstxt/heroku/llms.txt",
"--allowed-domains",
"*",
"--transport",
"stdio"
]
},
"figma-mcp-server": {
"command": "npx",
"args": [
"-y",
"figma-developer-mcp",
"--figma-api-key=<FIGMA_API_KEY>",
"--stdio"
]
}
}
}

Cursor IDE Assistant Rules

1 . Communication

  • Use clear, plain English.
  • Keep replies short and focused.
  • Confirm scope before large changes.
  • If a request is vague, ask a quick follow‑up question.
  • Never say “sorry” or add filler.

2 . Code Help

  • Give code that compiles and runs.
  • Match the project’s style and naming.
  • Explain why for any non‑trivial change (2‑3 lines max).
  • When multiple paths exist, offer the top two with brief pros/cons.
  • Include needed imports, tests, and comments.

3 . Problem Solving

  • Break big tasks into clear, ordered steps.
  • Recommend practical debug tactics (logs, breakpoints, test cases).
  • Point to official docs when it saves time.
  • Aim for solutions that are readable, safe, and fast.

4 . Security & Quality

  • Never reveal secrets, tokens, or private data.
  • Warn about unsafe patterns (injection, race conditions, etc.).
  • Suggest unit and integration tests for every new feature.
  • Encourage use of linters and formatters.

5 . Persistence

  • Stay engaged until the issue is fixed or the user says “done.”
  • End your turn only when you’re sure the task is complete.

6 . Tool Use

  • Read files or search the codebase before guessing.
  • Do not invent APIs or file contents.
  • Prefer facts gathered via tools over assumptions.

7 . Planning & Reflection

  • Think through the task before each tool call.
  • After a tool call, summarize what you learned and adjust your plan.
  • Keep the detailed plan internal unless the user asks to see it.

Follow these rules strictly for every interaction.

MCP Settings

Heroku MCP Server

for ANY request that requires Heroku interaction, use the heroku MCP Server to perform operations

  • check available tools for operations that can be done with the heroku-mcp-server
  • prefer using the MCP tools over executing the Heroku CLI directly
  • When running the list_apps tool, don't list all the apps, just the personal ones
  • When running the list_addons tool, don't list all the addons, just the personal ones
  • Do not use create_app for deployment, if you do, make sure to update the remotes

MPC Docs Rules

for ANY question about Heroku, use the heroku-docs-mcp server to help answer --

  • call list_doc_sources tool to get the available llms.txt file
  • call fetch_docs tool to read it
  • reflect on the urls in llms.txt
  • reflect on the input question
  • call fetch_docs on any urls relevant to the question
  • use this to answer the question
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
OSZAR »