Skip to content

feat(mcp): load secret.env for stdio MCP Inspector - #374

Merged
dawson-turechek-transcend merged 18 commits into
mainfrom
dawson/mcp-inspect-secret-env
Aug 10, 2026
Merged

dawson-turechek-transcend merged 18 commits into
mainfrom
dawson/mcp-inspect-secret-env

Conversation

@dawson-turechek-transcend

Copy link
Copy Markdown
Member

Summary

  • Launch pnpm mcp:inspect stdio servers via scripts/mcp-run.sh so root secret.env credentials reach authenticated tools (same path as Cursor)
  • Keep secrets off Inspector -e args (still readable via ps); only forward non-secret inspector env vars
  • Make mcp-run.sh fail clearly when secret.env looks like JSON instead of dotenv KEY=VALUE

Test plan

  • Ensure root secret.env uses dotenv format with TRANSCEND_API_KEY (or OAuth vars)
  • Run pnpm mcp:inspect and call an authenticated tool; confirm real API data returns
  • Temporarily put JSON in secret.env and confirm mcp-run.sh exits with a clear error
  • Confirm pnpm mcp:inspect --http still works with secret.env via loadSecretEnv

Made with Cursor

dsklyar and others added 9 commits August 5, 2026 15:02
Vendors upstream sandbox_proxy.html and restores it into npx Inspector
installs that omit clients/web/static. Points the removal TODO at ZEL-8153.
Launch the MCP Inspector against a built example server, with the
sandbox document repaired and dev views enabled so a view rebuild is
picked up by re-reading the resource rather than restarting the server.
Generate the component and the ui:// resource module, and add the
package-level view wiring when a package has none yet, so adding a view
is two files to fill in rather than seven to remember.
The generator wrote a view that could not be reached without hand-writing a
tool, and left the install that view build needs as an instruction. Skipping it
surfaced as a resolver error naming a synthesized file, so the view build now
checks its dependencies first and says what to run.

The generated tool stays unregistered: adding it to the package's tool list is
where its name becomes public API, which is a person's call.
Deleting a view leaves its directory behind, because git cannot track an empty
one. Discovery then refused to run at all, which broke re-scaffolding the view
it belonged to.

Files present but no *View.tsx still fails: that is a renamed component, and
skipping it is how a view silently stops existing.
Replaces `pnpm mcp:new-view` with `pnpm mcp:new <app|tool|elicitation>
<package> <name>`. The three kinds shared nearly all their machinery —
resolving the package, spelling the generated names, refusing to clobber a
file, and leaving registration to a person — so they now share it, and each
kind is a template module.

Only `app` touches a package manifest, which is what keeps React, Vite, and
Tailwind out of packages that ship no view. The `elicitation` template emits
a valid form rather than a placeholder, since assertElicitFormSchema runs at
construction and a stub would throw on boot.
Spawn the Inspector server via mcp-run.sh so root secret.env credentials
reach authenticated tools without putting secrets on Inspector -e args.
Also fail clearly when secret.env is JSON instead of dotenv KEY=VALUE.
@dawson-turechek-transcend
dawson-turechek-transcend marked this pull request as ready for review August 6, 2026 20:31
dsklyar
dsklyar previously approved these changes Aug 6, 2026

@dsklyar dsklyar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thank you!

dsklyar added 7 commits August 6, 2026 15:21
Launch the MCP Inspector against a built example server, with the
sandbox document repaired and dev views enabled so a view rebuild is
picked up by re-reading the resource rather than restarting the server.
Generate the component and the ui:// resource module, and add the
package-level view wiring when a package has none yet, so adding a view
is two files to fill in rather than seven to remember.
The generator wrote a view that could not be reached without hand-writing a
tool, and left the install that view build needs as an instruction. Skipping it
surfaced as a resolver error naming a synthesized file, so the view build now
checks its dependencies first and says what to run.

The generated tool stays unregistered: adding it to the package's tool list is
where its name becomes public API, which is a person's call.
Deleting a view leaves its directory behind, because git cannot track an empty
one. Discovery then refused to run at all, which broke re-scaffolding the view
it belonged to.

Files present but no *View.tsx still fails: that is a renamed component, and
skipping it is how a view silently stops existing.
Replaces `pnpm mcp:new-view` with `pnpm mcp:new <app|tool|elicitation>
<package> <name>`. The three kinds shared nearly all their machinery —
resolving the package, spelling the generated names, refusing to clobber a
file, and leaving registration to a person — so they now share it, and each
kind is a template module.

Only `app` touches a package manifest, which is what keeps React, Vite, and
Tailwind out of packages that ship no view. The `elicitation` template emits
a valid form rather than a placeholder, since assertElicitFormSchema runs at
construction and a stub would throw on boot.
@dsklyar
dsklyar force-pushed the danielsklyar/zel-8113-new-view-scaffolder branch from 16aba6b to 883f659 Compare August 6, 2026 22:22
@dsklyar
dsklyar requested review from a team as code owners August 6, 2026 22:22
@pkg-pr-new

pkg-pr-new Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@transcend-io/airgap.js-types

pnpm add https://pkg.pr.new/@transcend-io/airgap.js-types@374
yarn add https://pkg.pr.new/@transcend-io/airgap.js-types@374.tgz

@transcend-io/cli

pnpm add https://pkg.pr.new/@transcend-io/cli@374
yarn add https://pkg.pr.new/@transcend-io/cli@374.tgz

@transcend-io/design-tokens

pnpm add https://pkg.pr.new/@transcend-io/design-tokens@374
yarn add https://pkg.pr.new/@transcend-io/design-tokens@374.tgz

@transcend-io/internationalization

pnpm add https://pkg.pr.new/@transcend-io/internationalization@374
yarn add https://pkg.pr.new/@transcend-io/internationalization@374.tgz

@transcend-io/privacy-types

pnpm add https://pkg.pr.new/@transcend-io/privacy-types@374
yarn add https://pkg.pr.new/@transcend-io/privacy-types@374.tgz

@transcend-io/sdk

pnpm add https://pkg.pr.new/@transcend-io/sdk@374
yarn add https://pkg.pr.new/@transcend-io/sdk@374.tgz

@transcend-io/type-utils

pnpm add https://pkg.pr.new/@transcend-io/type-utils@374
yarn add https://pkg.pr.new/@transcend-io/type-utils@374.tgz

@transcend-io/utils

pnpm add https://pkg.pr.new/@transcend-io/utils@374
yarn add https://pkg.pr.new/@transcend-io/utils@374.tgz

@transcend-io/mcp

pnpm add https://pkg.pr.new/@transcend-io/mcp@374
yarn add https://pkg.pr.new/@transcend-io/mcp@374.tgz

@transcend-io/mcp-server-admin

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-admin@374
yarn add https://pkg.pr.new/@transcend-io/mcp-server-admin@374.tgz

@transcend-io/mcp-server-assessment

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-assessment@374
yarn add https://pkg.pr.new/@transcend-io/mcp-server-assessment@374.tgz

@transcend-io/mcp-server-base

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-base@374
yarn add https://pkg.pr.new/@transcend-io/mcp-server-base@374.tgz

@transcend-io/mcp-server-consent

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-consent@374
yarn add https://pkg.pr.new/@transcend-io/mcp-server-consent@374.tgz

@transcend-io/mcp-server-discovery

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-discovery@374
yarn add https://pkg.pr.new/@transcend-io/mcp-server-discovery@374.tgz

@transcend-io/mcp-server-docs

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-docs@374
yarn add https://pkg.pr.new/@transcend-io/mcp-server-docs@374.tgz

@transcend-io/mcp-server-dsr

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-dsr@374
yarn add https://pkg.pr.new/@transcend-io/mcp-server-dsr@374.tgz

@transcend-io/mcp-server-inventory

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-inventory@374
yarn add https://pkg.pr.new/@transcend-io/mcp-server-inventory@374.tgz

@transcend-io/mcp-server-preferences

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-preferences@374
yarn add https://pkg.pr.new/@transcend-io/mcp-server-preferences@374.tgz

@transcend-io/mcp-server-workflows

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-workflows@374
yarn add https://pkg.pr.new/@transcend-io/mcp-server-workflows@374.tgz

commit: 992d6b0

@dsklyar
dsklyar force-pushed the danielsklyar/zel-8113-new-view-scaffolder branch from 4aac7cf to d07c4a6 Compare August 7, 2026 22:50
Base automatically changed from danielsklyar/zel-8113-new-view-scaffolder to main August 8, 2026 06:05
@dsklyar
dsklyar dismissed their stale review August 8, 2026 06:05

The base branch was changed.

@dawson-turechek-transcend

Copy link
Copy Markdown
Member Author

Merge Conflict Resolution

Merged main into this branch and resolved conflicts from parallel MCP inspect/scaffolder/examples work that already landed via #349–#351.

Resolution details
File Resolution
dev/mcp-server-examples/**, scripts/mcp-new*, scripts/lib/mcp-new/**, scripts/build-mcp-views.ts, types/html.d.ts, turbo.json, packages/mcp/README.md, dev-view-html* Took main (canonical merged versions)
scripts/mcp-inspect.ts, scripts/lib/mcp-app-dev.ts, scripts/inspector-env-args.test.ts Took main as base, re-applied this PR’s secret.env / mcp-run.sh stdio launch
scripts/mcp-run.sh Kept this PR’s JSON-detection + clearer source errors (no conflict)

@dawson-turechek-transcend
dawson-turechek-transcend added this pull request to the merge queue Aug 10, 2026
Merged via the queue into main with commit f6ca084 Aug 10, 2026
4 checks passed
@dawson-turechek-transcend
dawson-turechek-transcend deleted the dawson/mcp-inspect-secret-env branch August 10, 2026 16:47
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