Commit Graph

588 Commits

Author SHA1 Message Date
Peter Steinberger
cd4f6ab996
feat: add per-server tool filtering 2026-04-18 21:27:00 +01:00
Peter Steinberger
f11e326380
fix: escalate stuck stdio shutdowns 2026-04-18 20:07:40 +01:00
Peter Steinberger
d70f98fcd3 fix: quote Windows OAuth URLs (#136) 2026-04-18 20:03:37 +01:00
Cosmin Ilie
24d89de807 fix: quote OAuth URL for cmd.exe on Windows
cmd.exe interprets & as a command separator, truncating the authorize
URL at the first query parameter. Use windowsVerbatimArguments and /s
to pass the quoted URL through without shell mangling.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 20:03:37 +01:00
Peter Steinberger
a5a09927d1 docs: add OAuth config example (#34) 2026-04-18 20:00:19 +01:00
Prateek Rungta
d4104b56e7 docs: add OAuth server config example 2026-04-18 20:00:19 +01:00
Prateek Rungta
741d5189d2 chore: treat tar archives as binary 2026-04-18 20:00:19 +01:00
Peter Steinberger
2dad5dbfb3
build: pin patched vite peer 2026-04-18 19:47:13 +01:00
Peter Steinberger
920f18d1aa
build: update dependencies 2026-04-18 19:42:49 +01:00
Peter Steinberger
34fe35e46c
style: apply oxfmt formatting 2026-04-18 19:33:22 +01:00
Peter Steinberger
9bfc604e01
refactor: satisfy oxlint rules 2026-04-18 19:33:14 +01:00
Peter Steinberger
efed4d4383
build: migrate lint formatting tooling 2026-04-18 19:33:08 +01:00
Peter Steinberger
4daadfc08f fix: preserve schema string call args 2026-04-18 19:22:38 +01:00
Ali Hamza
2a57d48d43 fix: skip schema fetch when no coercion candidates exist; handle union string types
Addresses PR review feedback:
- enforceSchemaStringTypes() now early-returns when no number
  values are present, avoiding an unconditional loadToolMetadata
  call before every tool invocation
- String type check now handles union schemas like
  type: ["string", "null"] in addition to type: "string"
2026-04-18 19:22:38 +01:00
Ali Hamza
4d78444003 fix: respect schema string type when coercing key=value args
Closes #140

When using key=value syntax (e.g. thread_ts=1234567890.123456),
mcporter was coercing numeric-looking values to numbers before
tool invocation. This broke Slack MCP tools where thread_ts is
declared as string in the tool schema.

Added enforceSchemaStringTypes() in call-command.ts that loads
the tool schema after argument parsing and converts any coerced
number back to string if the schema declares that field as
type: string.
2026-04-18 19:22:38 +01:00
Peter Steinberger
53539d90a9
docs: bump changelog to 0.8.2 2026-03-29 11:22:23 +09:00
Peter Steinberger
521689191f
build: tighten npm package contents 2026-03-29 11:14:49 +09:00
Peter Steinberger
d601aa5ba4
docs: finalize 0.8.1 changelog 2026-03-29 11:12:24 +09:00
Peter Steinberger
c67996783c
fix: embed bun binary version 2026-03-29 11:10:44 +09:00
Peter Steinberger
25f12f4ffa
chore: bump version to 0.8.1 2026-03-29 11:05:48 +09:00
Peter Steinberger
84c596735f
docs: finalize 0.8.0 changelog 2026-03-29 10:52:13 +09:00
Peter Steinberger
71f5bd593b
ci: activate pnpm with corepack 2026-03-29 09:55:14 +09:00
Peter Steinberger
9bf5c0f994
ci: replace deprecated pnpm setup action 2026-03-29 09:53:28 +09:00
Peter Steinberger
91819929d9
fix: harden oauth vault persistence 2026-03-29 09:53:17 +09:00
Peter Steinberger
b69dd07dba
test: refresh live deepwiki smoke 2026-03-29 09:40:39 +09:00
Peter Steinberger
83cc3b9a4c
refactor: split call and runtime helpers 2026-03-29 09:36:35 +09:00
Peter Steinberger
36b2584c17
docs: clarify call flag escaping 2026-03-28 21:43:13 +00:00
Peter Steinberger
d7cfc29bff
fix: reject unknown call flags (#35) 2026-03-28 21:33:15 +00:00
Peter Steinberger
97ac209049
fix: support --args alias for config add (#93) (thanks @Jah-yee) 2026-03-28 21:24:24 +00:00
Peter Steinberger
382afa0502
fix: improve generated CLI object parsing (#114) (thanks @v2nic) 2026-03-28 21:19:05 +00:00
Nicolas Marchildon
6a60e967a6 fix: parse object-type parameters as JSON in generated CLIs
When an MCP tool schema declares a parameter with type 'object' (e.g.
Atlassian's editJiraIssue fields parameter), the generated CLI previously
passed the value as a raw string, causing MCP validation errors.

Root cause: inferType() didn't recognize 'object' as a valid type, so it
returned 'unknown'. optionParser() had no case for 'object', so no
JSON.parse was generated for the Commander option.

Changes:
- Add 'object' to GeneratedOption type union in tools.ts
- Add 'object' to resolveType whitelist in inferType()
- Add 'case object' returning JSON.parse in optionParser()

Fixes #113
2026-03-28 21:17:41 +00:00
Peter Steinberger
b49af49402
fix: trim managed runtime spillover from #125 2026-03-28 21:08:07 +00:00
Lil Z
8c66f1c49a
fix: add managed runtime and dedupe keep-alive restarts (#125)
* fix: add managed runtime and dedupe keep-alive restarts

* test: cover cli managed runtime wiring
2026-03-28 21:05:31 +00:00
Peter Dedene
586c57d11b fix(daemon): skip Bun virtual entry path in detached child spawn
In Bun compiled binaries, process.argv[1] is a virtual /$bunfs/...
path that Bun auto-injects into every spawned child process. The
daemon launcher was including this path explicitly in the spawn args,
causing it to appear twice in the child's argv. The child then parsed
the duplicate path as the CLI command instead of "daemon", silently
failing to start.

Detect the /$bunfs/ prefix and omit the entry from spawn args, letting
Bun handle it automatically.
2026-03-28 20:59:33 +00:00
Peter Steinberger
41e049ddc0
refactor: simplify oauth transport flow 2026-03-28 20:01:24 +00:00
Peter Steinberger
72e3a16f0a fix: preserve oauth failure context (#97) (thanks @mavam) 2026-03-28 19:48:14 +00:00
Matthias Vallentin
a61c0475f8 fix(oauth): preserve auth failure context
Track OAuth flow failures separately from post-auth reconnect
failures so Streamable HTTP can still fall back to legacy SSE
on real 404/405 transport mismatches without masking terminal
provider errors.

Also recreate transports after finishAuth and add regression
coverage for generic 401 promotions, OAuth flow failures, and
post-auth retry paths.
2026-03-28 19:48:14 +00:00
Peter Steinberger
914e03f89c fix: keep json output valid on raw fallback (#128) (thanks @armanddp) 2026-03-28 19:41:21 +00:00
Peter Steinberger
e77b22378b fix: prefer oauth auth headers over static overrides (#123) (thanks @ahonn) 2026-03-28 19:36:22 +00:00
ahonn
6d7c54646a fix: strip static Authorization header when OAuth is active
When mcporter imports server definitions from external clients that
include static Authorization headers, these override the OAuth access
token in the SDK, causing 401 retry storms.

Fixes #121
2026-03-28 19:36:22 +00:00
Peter Steinberger
666fec0fa6 fix: preserve full structured payloads (#106) (thanks @AielloChan) 2026-03-28 19:31:23 +00:00
奥尘
a04d663f03 fix(result-utils): avoid collapsing error payloads to data 2026-03-28 19:31:23 +00:00
Peter Steinberger
e7c6bef1a2 fix: render resource content blocks consistently (#124) (thanks @mvanhorn) 2026-03-28 19:27:25 +00:00
Matt Van Horn
2bd30c235c fix: handle resource content blocks in output rendering
Fixes #108

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 19:27:25 +00:00
yukaibo.me
cc06993494 fix: detect auth errors from error.code property (StreamableHTTPError/SseError)
MCP SDK's StreamableHTTPError/SseError store the HTTP status code in
error.code, but the message text may not contain the numeric status.
analyzeConnectionError now reads error.code (100-599) before falling
back to message-text parsing, so OAuth promotion triggers correctly
for 401 responses on Streamable HTTP transport.
2026-03-28 19:21:23 +00:00
Peter Steinberger
8af1a77c45
chore: bump version to 0.8.0 2026-03-28 19:03:19 +00:00
Peter Steinberger
74dd794645 fix: stabilize generated config schema + oauthScope coverage (#43) (thanks @aryasaatvik) 2026-03-03 01:07:35 +00:00
Saatvik Arya
1dc2e70061 feat: add JSON Schema generation for config files
- Add .describe() to Zod schemas for rich documentation
- Create generate-json-schema.ts using Zod v4's toJSONSchema()
- Add generate:schema npm script
- Generate mcporter.schema.json at repo root
- Document $schema usage in docs/config.md
2026-03-03 01:07:35 +00:00
Peter Steinberger
a272e00784 refactor(config): split path discovery and config reading 2026-03-03 00:37:42 +00:00
Peter Steinberger
41b0cbcc9c refactor(daemon): extract host support utilities 2026-03-03 00:37:40 +00:00