Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.

Add read-only endpoints, remove write tools, fix API params#1

Open
jrejaud wants to merge 1 commit intokinhunt:mainfrom
jrejaud:add-read-only-endpoints
Open

Add read-only endpoints, remove write tools, fix API params#1
jrejaud wants to merge 1 commit intokinhunt:mainfrom
jrejaud:add-read-only-endpoints

Conversation

@jrejaud
Copy link

@jrejaud jrejaud commented Feb 28, 2026

Summary

  • 3 new read-only tools: get_user_mentions, get_tweet_quotes, get_tweet_thread
  • 3 API param bug fixes found by testing against live API (docs differ from code)
  • Removed write tools (login_user, create_tweet) — cookie-based auth is fragile and unsuitable for MCP use

New Tools

Tool Endpoint Description
get_user_mentions /user/mentions Get tweets @mentioning a user
get_tweet_quotes /tweet/quotes Get quote tweets for a tweet
get_tweet_thread /tweet/thread_context Get full thread context

Bug Fixes

Tool Bug Fix
get_tweet_by_id param tweet_id → should be tweet_ids Fixed per API docs
get_tweet_quotes param id → should be tweetId; invalid count param sent Fixed per API docs
get_tweet_thread endpoint /tweet/thread/tweet/thread_context; param idtweetId Fixed per API docs

Why Remove Write Tools

The login_user + create_tweet flow stores session cookies which are fragile, expire, and require re-auth. For a use case where Claude Code needs to post tweets, a dedicated write-capable integration (e.g. Typefully API with reply_to_url support) is more reliable. Keeping write tools out of this server makes it safe to expose broadly without risk of accidental posting.

All new endpoints verified against live twitterapi.io API.

New tools:
- get_user_mentions: fetch tweets @mentioning a user (/user/mentions)
- get_tweet_quotes: fetch quote tweets for a tweet (/tweet/quotes)
- get_tweet_thread: fetch full thread context (/tweet/thread_context)

Bug fixes:
- get_tweet_by_id: param renamed tweet_id → tweet_ids (API expects plural)
- get_tweet_quotes: param renamed id → tweetId (per API docs)
- get_tweet_thread: endpoint /tweet/thread → /tweet/thread_context, param id → tweetId
- Error messages now include API response body for easier debugging

Removed write tools:
- login_user (required storing cookies, not suitable for MCP)
- create_tweet (write operations should go through official API or Typefully)
- All related loginCookie/makePostRequest internals

This makes the server fully read-only and suitable for use as a
monitoring/research tool alongside a separate write-capable integration.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant