Skip to content

feat: xurl mcp + token, headless OAuth2, auth/UX hardening (v1.2.0) - #78

Merged
santiagomed merged 2 commits into
mainfrom
release-v1.2.0
Jun 29, 2026
Merged

feat: xurl mcp + token, headless OAuth2, auth/UX hardening (v1.2.0)#78
santiagomed merged 2 commits into
mainfrom
release-v1.2.0

Conversation

@santiagomed

Copy link
Copy Markdown
Collaborator

feat: add xurl mcp bridge + xurl token, headless OAuth2, and auth/UX hardening

New commands

  • xurl mcp [URL]: a stdio<->Streamable-HTTP MCP bridge for the hosted X API MCP
    server. Injects an auto-refreshed OAuth2 Bearer token, maintains the MCP
    session id, handles JSON/SSE/202 responses, processes requests in order off
    the read loop while dispatching notifications concurrently, synthesizes a
    JSON-RPC error for any request it cannot answer (so a strict client never
    hangs), and shuts down cleanly on SIGINT/EOF.
  • xurl token: print a valid (refreshed, persisted) OAuth2 access token for the
    active app; never opens a browser, so it is scriptable.

Auth

  • xurl auth oauth2 --headless: authenticate on remote/headless machines with no
    reachable localhost callback -- print the authorize URL, paste the redirect
    URL/code back (also via stdin).
  • OAuth2 token exchange/refresh now sets the client-auth style explicitly (Basic
    header for confidential clients, body for public), fixing
    unauthorized_client: Missing valid authorization header against X.
  • auth app -> auth app-only (aliases: app, bearer); token is positional or
    read from stdin (-); auth clear --app-only.

Command surface

  • Group subcommands in --help; add xurl posts USERNAME; support xurl --version; -d implies POST (curl-like).

Fixes

  • media upload: corrected verbose/wait/trace argument order and added media-type
    auto-detection (erroring on unsupported types instead of guessing).
  • Surface real transport/auth errors instead of printing null; fail fast on
    missing credentials; JSON-encode DM text; clamp --max-results per endpoint;
    OAuth2 expiry/skew handling; webhook help + isolated ServeMux; .gitignore
    fix. See CHANGELOG.md for the complete list.
…/UX hardening

New commands
- `xurl mcp [URL]`: a stdio<->Streamable-HTTP MCP bridge for the hosted X API MCP
  server. Injects an auto-refreshed OAuth2 Bearer token, maintains the MCP
  session id, handles JSON/SSE/202 responses, processes requests in order off
  the read loop while dispatching notifications concurrently, synthesizes a
  JSON-RPC error for any request it cannot answer (so a strict client never
  hangs), and shuts down cleanly on SIGINT/EOF.
- `xurl token`: print a valid (refreshed, persisted) OAuth2 access token for the
  active app; never opens a browser, so it is scriptable.

Auth
- `xurl auth oauth2 --headless`: authenticate on remote/headless machines with no
  reachable localhost callback -- print the authorize URL, paste the redirect
  URL/code back (also via stdin).
- OAuth2 token exchange/refresh now sets the client-auth style explicitly (Basic
  header for confidential clients, body for public), fixing
  `unauthorized_client: Missing valid authorization header` against X.
- `auth app` -> `auth app-only` (aliases: app, bearer); token is positional or
  read from stdin (`-`); `auth clear --app-only`.

Command surface
- Group subcommands in `--help`; add `xurl posts USERNAME`; support `xurl
  --version`; `-d` implies POST (curl-like).

Fixes
- media upload: corrected verbose/wait/trace argument order and added media-type
  auto-detection (erroring on unsupported types instead of guessing).
- Surface real transport/auth errors instead of printing `null`; fail fast on
  missing credentials; JSON-encode DM text; clamp `--max-results` per endpoint;
  OAuth2 expiry/skew handling; webhook help + isolated ServeMux; `.gitignore`
  fix. See CHANGELOG.md for the complete list.
tcaldwell-x
tcaldwell-x previously approved these changes Jun 29, 2026
@santiagomed

Copy link
Copy Markdown
Collaborator Author

This release also resolves several open issues:

(The v1.2.0 release also publishes @xdevplatform/xurl to npm, which resolves #77.)

- install.sh: detect root with `id -u` instead of the bash-only `$EUID`, so
  `curl ... | sh` under a POSIX shell (dash) installs to /usr/local/bin as root
  instead of silently falling back to ~/.local/bin (#68).
- npm/install.js: extract the Windows .zip with PowerShell's Expand-Archive
  instead of the Unix `unzip` command, fixing `npm install -g` on Windows (#56).
- whoami/user: request `verified_type` and `subscription_type` so Premium/blue
  accounts report correctly instead of `verified: false` (#41).
@santiagomed

Copy link
Copy Markdown
Collaborator Author

Folded in three more fixes (commit ba32144):

@santiagomed
santiagomed merged commit 080123e into main Jun 29, 2026
2 checks passed
@santiagomed
santiagomed deleted the release-v1.2.0 branch June 29, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants