Skip to content

v2.2.0 — agent-native MCP, single LLM client

Choose a tag to compare

@ihuzaifashoukat ihuzaifashoukat released this 24 Jul 14:12

v2.2 makes the MCP server agent-native: interactive use needs no LLM key at all — your MCP client (Claude, Codex, ...) does the analysis and writing, and the server drives the browser. The old three-provider LLM stack collapses into a single OpenAI-compatible client for the paths that genuinely need one (background automation, "auto" text). This release was audited end to end and live-tested against a real X account: 25/25 tools exercised, real post + self-reply + like executed through the draft and queue gates.

Highlights

  • One OpenAI-compatible LLM client: llm block in settings.json (api_key, base_url, model), env fallbacks OPENAI_API_KEY / OPENAI_BASE_URL / OPENAI_MODEL. OpenAI, OpenRouter, Azure, Gemini, and local servers (Ollama, vLLM) all speak this API. Legacy api_keys.openai_api_key is honored as a last-resort key source; gemini/azure keys warn-and-ignore. service_preference routing and the langchain-google-genai dependency are gone.
  • Agent-native interactive path: every write tool takes explicit text, and the new read-only prepare_reply(account, tweet_url) tool returns a tweet's content plus account context so your agent can compose the reply itself. 25 tools total.
  • Hardening from a full audit: concurrent queue drains are refused (already_running), account-tool session closes wait for in-flight actions, browsers that cold-start past their timeout are closed instead of leaked, crash-window drafts recover to pending, get_account_health reports invalid configs instead of failing, paused accounts are refused on every write path, and the mcp pin is now >=1.6 (first release with FastMCP lifespan).
  • Fixes found by live testing: undetected-chromedriver no longer receives excludeSwitches (modern chromedriver rejected the session), UC is pinned to the installed Chrome major version, successful likes are no longer misreported as failures (verification now watches the button flip to "unlike"), cookie imports already at the convention path work, handles render without "@@", and the settings template defaults to Chrome.

Details

  • doctor: single llm check; a missing key is SKIP (keyless interactive use is valid), not FAIL. The init wizard writes OPENAI_API_KEY / OPENAI_BASE_URL / OPENAI_MODEL.
  • LLMService returns None when unconfigured, so heuristic fallbacks (e.g. the analyzer's keyword relevance) keep working keyless. Tools that strictly need generation return a clear envelope pointing at the llm block or the explicit-text path.
  • Runtime state (data/drafts.jsonl, data/engagement_queue.jsonl, data/metrics/*.json) is now gitignored.
  • Tests: 234 -> 258, all passing; the 25-tool contract is pinned so signature drift fails CI.

Upgrade notes

  • pip install -U x-use-mcp
  • If you used Gemini or Azure keys before: set the llm block (api_key + base_url + model) — both providers offer OpenAI-compatible endpoints. Legacy openai_api_key keeps working with no changes.
  • Interactive MCP use needs no key at all: prefer explicit text from your MCP client; use prepare_reply to give it the tweet context.
  • Background automation (run_cycle, pipelines, "auto" text in the queue) requires the llm block or env vars and errors clearly without them.