Skip to content

Conversation

@sashankthapa
Copy link
Contributor

Description

Adds a new X (Twitter) integration tool for Hive, enabling agents to interact directly with the X API v2.

This allows agents to automate social workflows such as posting tweets, replying to users, searching recent tweets, and monitoring mentions without external scripts or manual steps.

The implementations follows the same architecture and conventions as other tools:

  • httpx-based client
  • internal client wrapper
  • register_tools(mcp, credentials)
  • CredentialStoreAdapter support
  • environment variable fallback
  • unit tests and documentation

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

Related Issues

Refs #2598
parent issue #2805

New files

tools/src/aden_tools/tools/x_tool/x_tool.py

  • Internal _XClient using httpx
  • MCP tools:
    • x_post_tweet
    • x_reply_tweet
    • x_delete_tweet
    • x_search_tweets
    • x_get_mentions

tools/src/aden_tools/tools/x_tool/__init__.py

  • Exposes register_tools

tools/src/aden_tools/tools/x_tool/README.md

  • Setup instructions
  • Authentication guide
  • Usage examples

tools/tests/tools/test_x_tool.py

  • Unit tests with mocked httpx requests
  • Client + tool behavior coverage

Modified files

tools/src/aden_tools/tools/__init__.py

  • Imported register_x
  • Added register_x(mcp, credentials)
  • Added X tools to returned tool list

tools/src/aden_tools/credentials/integrations.py

  • Added CredentialSpec for "x"
  • Supports credential store + env var fallback
  • Added health check endpoint

Testing

  • All tests pass locally with pytest
  • MCP server confirms registration of tools
  • Manual testing performed for search and post endpoints

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Environment Variables

X_BEARER_TOKEN
Required
X (Twitter) API v2 Bearer Token

Screenshots (if applicable)

N/A

Copy link

@Amdev-5 Amdev-5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update .claude/skills/building-agents-construction/SKILL.md with the new tool

@sashankthapa sashankthapa reopened this Feb 2, 2026
@sashankthapa sashankthapa requested a review from Amdev-5 February 2, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants