feat: xurl mcp + token, headless OAuth2, auth/UX hardening (v1.2.0)#78
Merged
Conversation
…/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
previously approved these changes
Jun 29, 2026
Collaborator
Author
|
This release also resolves several open issues:
(The v1.2.0 release also publishes |
This was referenced Jun 29, 2026
Closed
- 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).
Collaborator
Author
|
Folded in three more fixes (commit ba32144):
|
This was referenced Jun 29, 2026
tcaldwell-x
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add
xurl mcpbridge +xurl token, headless OAuth2, and auth/UX hardeningNew commands
xurl mcp [URL]: a stdio<->Streamable-HTTP MCP bridge for the hosted X API MCPserver. 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 theactive app; never opens a browser, so it is scriptable.
Auth
xurl auth oauth2 --headless: authenticate on remote/headless machines with noreachable localhost callback -- print the authorize URL, paste the redirect
URL/code back (also via stdin).
header for confidential clients, body for public), fixing
unauthorized_client: Missing valid authorization headeragainst X.auth app->auth app-only(aliases: app, bearer); token is positional orread from stdin (
-);auth clear --app-only.Command surface
--help; addxurl posts USERNAME; supportxurl --version;-dimplies POST (curl-like).Fixes
auto-detection (erroring on unsupported types instead of guessing).
null; fail fast onmissing credentials; JSON-encode DM text; clamp
--max-resultsper endpoint;OAuth2 expiry/skew handling; webhook help + isolated ServeMux;
.gitignorefix. See CHANGELOG.md for the complete list.