Skip to content

fix: use projects-get MCP tool for env var setup in instrument skills#116

Merged
MattBro merged 1 commit intomainfrom
matt/use-projects-get-for-env-vars
Apr 17, 2026
Merged

fix: use projects-get MCP tool for env var setup in instrument skills#116
MattBro merged 1 commit intomainfrom
matt/use-projects-get-for-env-vars

Conversation

@MattBro
Copy link
Copy Markdown
Contributor

@MattBro MattBro commented Apr 16, 2026

Problem

The instrument skills reference a non-existent env-file-tools MCP server for setting up PostHog environment variables. This means the env var step silently fails for all users.

Meanwhile, the PostHog MCP server is already connected and authenticated via OAuth, and its projects-get tool returns the api_token for every project.

Changes

Updated the env var setup step in all 6 omnibus instrument skill description.md files to:

  1. Check if PostHog env vars already exist (skip if so)
  2. Call projects-get from the PostHog MCP to retrieve the api_token
  3. Handle multi-project orgs (ask user which project)
  4. Gracefully fall back to asking the user if MCP isn't connected
  5. Default to US/EU Cloud host URLs
  6. Write values using framework-specific env var naming conventions

Mirrors PostHog/ai-plugin#25 but applied upstream so the daily sync propagates it.

🤖 Generated with Claude Code

Replace references to non-existent env-file-tools MCP server with
the PostHog MCP server's projects-get tool for retrieving api_token.
Adds graceful fallbacks for missing MCP connection and multi-project orgs.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@MattBro MattBro requested a review from rafaeelaudibert April 16, 2026 20:25
@github-actions
Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci android
  • /wizard-ci angular
  • /wizard-ci astro
  • /wizard-ci django
  • /wizard-ci fastapi
  • /wizard-ci flask
  • /wizard-ci javascript-node
  • /wizard-ci javascript-web
  • /wizard-ci laravel
  • /wizard-ci next-js
  • /wizard-ci nuxt
  • /wizard-ci python
  • /wizard-ci rails
  • /wizard-ci react-native
  • /wizard-ci react-router
  • /wizard-ci stripe
  • /wizard-ci sveltekit
  • /wizard-ci swift
  • /wizard-ci tanstack-router
  • /wizard-ci tanstack-start
  • /wizard-ci vue

Test an individual app:

  • /wizard-ci android/Jetchat
  • /wizard-ci angular/angular-saas
  • /wizard-ci astro/astro-hybrid-marketing
Show more apps
  • /wizard-ci astro/astro-ssr-docs
  • /wizard-ci astro/astro-static-marketing
  • /wizard-ci astro/astro-view-transitions-marketing
  • /wizard-ci django/django3-saas
  • /wizard-ci fastapi/fastapi3-ai-saas
  • /wizard-ci flask/flask3-social-media
  • /wizard-ci javascript-node/express-todo
  • /wizard-ci javascript-node/fastify-blog
  • /wizard-ci javascript-node/hono-links
  • /wizard-ci javascript-node/koa-notes
  • /wizard-ci javascript-node/native-http-contacts
  • /wizard-ci javascript-web/saas-dashboard
  • /wizard-ci laravel/laravel12-saas
  • /wizard-ci next-js/15-app-router-saas
  • /wizard-ci next-js/15-app-router-todo
  • /wizard-ci next-js/15-pages-router-saas
  • /wizard-ci next-js/15-pages-router-todo
  • /wizard-ci nuxt/movies-nuxt-3-6
  • /wizard-ci nuxt/movies-nuxt-4
  • /wizard-ci python/meeting-summarizer
  • /wizard-ci rails/fizzy
  • /wizard-ci react-native/expo-react-native-hacker-news
  • /wizard-ci react-native/react-native-saas
  • /wizard-ci react-router/react-router-v7-project
  • /wizard-ci react-router/rrv7-starter
  • /wizard-ci react-router/saas-template
  • /wizard-ci react-router/shopper
  • /wizard-ci stripe/stripe-next-js-saas-starter
  • /wizard-ci stripe/stripe-saas-demo
  • /wizard-ci sveltekit/CMSaasStarter
  • /wizard-ci swift/hackers-ios
  • /wizard-ci tanstack-router/tanstack-router-code-based-saas
  • /wizard-ci tanstack-router/tanstack-router-file-based-saas
  • /wizard-ci tanstack-start/tanstack-start-saas
  • /wizard-ci vue/movies

Results will be posted here when complete.

@MattBro MattBro merged commit cb909f6 into main Apr 17, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants