Skip to content

fix: Smithery installs (env token) + honest HTTP docs - #43

Merged
johnxie merged 3 commits into
mainfrom
fix/cli-flags-and-docs
Jun 5, 2026
Merged

fix: Smithery installs (env token) + honest HTTP docs#43
johnxie merged 3 commits into
mainfrom
fix/cli-flags-and-docs

Conversation

@johnxie

@johnxie johnxie commented Jun 5, 2026

Copy link
Copy Markdown
Member

What & why

The published @taskade/mcp-server reads only the TASKADE_API_KEY env var and parses no CLI args (cli.ts). Two places contradicted that:

  1. Smithery installs failsmithery.yaml passed ['--token', config.apiKey], an arg the binary ignores, so every stdio install started tokenless and exited with the validateAccessToken error.
  2. n8n example docs advertised --http --token + a localhost:3001/mcp URL that the CLI can't produce.

Changes

Zero-regression

  • stdio runtime path unchanged; this only fixes how the token reaches it on Smithery + corrects docs.
  • smithery.yaml validates as YAML; commandFunction returns {command,args,env}.

Scoped out (conflict avoidance)

The published CLI reads only the TASKADE_API_KEY env var and parses no argv,
so smithery.yaml passing ['--token', config.apiKey] meant every Smithery stdio
install started with no token and exited with the validateAccessToken error.
Switch the commandFunction to set env: { TASKADE_API_KEY: config.apiKey }.

Also correct the n8n example docs: the --http/--token flags are not supported
by the published CLI (stdio only); point HTTP/remote use to hosted endpoint #6.
@johnxie
johnxie requested a review from Copilot June 5, 2026 11:15
@changeset-bot

changeset-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2298830

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR aligns installation and example documentation with the actual published @taskade/mcp-server CLI behavior (stdio-only, token via TASKADE_API_KEY), fixing Smithery installs and correcting misleading HTTP/SSE guidance.

Changes:

  • Update smithery.yaml to pass the Taskade token via TASKADE_API_KEY instead of unsupported --token CLI args.
  • Replace the broken n8n “HTTP/SSE mode” example in examples/README.md with stdio-only guidance and a pointer to the hosted endpoint roadmap (#6).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
smithery.yaml Switches Smithery install to provide the token via environment variable (but currently introduces a YAML indentation/parsing issue).
examples/README.md Updates n8n example docs to reflect stdio-only CLI usage and removes unsupported HTTP/SSE CLI instructions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread smithery.yaml Outdated
Comment on lines +13 to +15
commandFunction:
|-
(config) => ({ command: 'npx', args: ['-y', '@taskade/mcp-server', '--token', config.apiKey] })
(config) => ({ command: 'npx', args: ['-y', '@taskade/mcp-server'], env: { TASKADE_API_KEY: config.apiKey } })
Comment thread examples/README.md
```

Then configure the n8n MCP node to use **HTTP Streamable** transport with URL `http://localhost:3001/mcp`.
> **Note:** The published `@taskade/mcp-server` CLI runs over **stdio** only — configure the n8n MCP Client node with the command `npx -y @taskade/mcp-server` and a `TASKADE_API_KEY` environment variable. The `--http`/`--token` flags are **not** supported by the published CLI. A standalone HTTP/SSE transport is not yet exposed; track the hosted remote endpoint at [#6](https://github.com/taskade/mcp/issues/6).
Addresses Copilot review: the n8n workflow node still used the ignored
--token CLI flag. Pass TASKADE_API_KEY via the node's environments field so
the imported workflow actually authenticates (consistent with the stdio docs).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread smithery.yaml Outdated
Comment on lines +14 to +15
|-
(config) => ({ command: 'npx', args: ['-y', '@taskade/mcp-server', '--token', config.apiKey] })
(config) => ({ command: 'npx', args: ['-y', '@taskade/mcp-server'], env: { TASKADE_API_KEY: config.apiKey } })
Move the |- block-scalar indicator onto the key line (commandFunction: |-)
so the YAML is unambiguous for stricter parsers. Parsed value is identical.
@johnxie

johnxie commented Jun 5, 2026

Copy link
Copy Markdown
Member Author

✅ Validated → fixed → ready to merge

Copilot finding Verdict Action
examples/n8n-taskade-mcp-workflow.json still uses --token while the note says env var VALID Workflow node now passes environments: TASKADE_API_KEY=… (0 --token refs).
commandFunction block scalar "not indented / invalid YAML" FALSE POSITIVE (parses via PyYAML), but canonicalized anyway Moved indicator onto the key line: commandFunction: |-.

QA: smithery.yaml parses; commandFunction evaluates →

{"command":"npx","args":["-y","@taskade/mcp-server"],"env":{"TASKADE_API_KEY":"K"}}

workflow JSON valid; 0 --token. Confidence: high · zero regression. Merging.

@johnxie
johnxie merged commit 8ec90f7 into main Jun 5, 2026
@johnxie
johnxie deleted the fix/cli-flags-and-docs branch June 5, 2026 12:01
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