{"_id":"@crazyrabbitltc/mcp-twitter-server","name":"@crazyrabbitltc/mcp-twitter-server","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@crazyrabbitltc/mcp-twitter-server","version":"0.0.1","description":"A Model Context Protocol server for Twitter integration","main":"dist/index.js","types":"dist/index.d.ts","type":"module","bin":{"mcp-twitter-server":"dist/index.js"},"scripts":{"build":"tsc","start":"node dist/index.js","prepare":"npm run build"},"keywords":["mcp","twitter","llm","ai","model-context-protocol","claude","anthropic","x"],"author":{"name":"Dennison Bertram"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/crazyrabbitLTC/mcp-twitter-server.git"},"bugs":{"url":"https://github.com/crazyrabbitLTC/mcp-twitter-server/issues"},"homepage":"https://github.com/crazyrabbitLTC/mcp-twitter-server#readme","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","twitter-api-v2":"^1.15.1","zod":"^3.0.0","dotenv":"^16.0.0"},"devDependencies":{"@types/node":"^20.0.0","typescript":"^5.0.0"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@crazyrabbitltc/mcp-twitter-server@0.0.1","gitHead":"11e54212664f27885b285bcba8424c25cd6624b7","_nodeVersion":"22.12.0","_npmVersion":"11.0.0","dist":{"integrity":"sha512-Hb0+bFjaotuRW2TGxlb218VGUr4w20fw2EGb1NXsb8LpoHn9oCPRcxzUKevuUKZm0DE8zbRN4uNV+ZruNw6TbQ==","shasum":"6238441123a148ff0ab464a969764e63e71b6d5b","tarball":"https://registry.npmjs.org/@crazyrabbitltc/mcp-twitter-server/-/mcp-twitter-server-0.0.1.tgz","fileCount":7,"unpackedSize":13204,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICtksf7yS7mUrx7spJACu48v2U3gsGTnfOfV507VyUNbAiAuXTtCVVFdzBu+91m0DgARZQp+3ftfrI3PKtOoeb1r2A=="}]},"_npmUser":{"name":"crazyrabbitltc","email":"dennison@dennisonbertram.com"},"directories":{},"maintainers":[{"name":"crazyrabbitltc","email":"dennison@dennisonbertram.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-twitter-server_0.0.1_1736477492753_0.753354205793572"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-10T02:51:32.655Z","0.0.1":"2025-01-10T02:51:32.918Z","modified":"2025-01-10T02:51:33.210Z"},"maintainers":[{"name":"crazyrabbitltc","email":"dennison@dennisonbertram.com"}],"description":"A Model Context Protocol server for Twitter integration","homepage":"https://github.com/crazyrabbitLTC/mcp-twitter-server#readme","keywords":["mcp","twitter","llm","ai","model-context-protocol","claude","anthropic","x"],"repository":{"type":"git","url":"git+https://github.com/crazyrabbitLTC/mcp-twitter-server.git"},"author":{"name":"Dennison Bertram"},"bugs":{"url":"https://github.com/crazyrabbitLTC/mcp-twitter-server/issues"},"license":"MIT","readme":"```markdown\n# Twitter MCP Server\n\nA Model Context Protocol (MCP) server that allows Large Language Models (LLMs) to interact with Twitter (X). This server provides tools for posting tweets, searching tweets, and replying to tweets.\n\n## Features\n\n-   **Post Tweets:** Allows LLMs to post new tweets to your Twitter account.\n-   **Search Tweets:** Allows LLMs to search for tweets based on keywords.\n-   **Reply to Tweets:** Allows LLMs to reply to existing tweets, which can be used to make threads.\n\n## Prerequisites\n\nBefore you begin, ensure you have met the following requirements:\n\n*   **Node.js** (version 18 or higher) installed. You can download it from [nodejs.org](https://nodejs.org/).\n*   **npm** (comes with Node.js)\n*   A **Twitter Developer Account** and API keys (see [Twitter Developer Portal](https://developer.twitter.com/en/portal/dashboard)). You will need API Key, API Secret Key, Access Token, Access Token Secret.\n*   **Claude for Desktop** installed. You can download it from [claude.ai/download](https://claude.ai/download).\n\n## Installation\n\n1.  **Clone the repository:**\n\n    ```bash\n    git clone <repository_url>\n    cd <repository_directory>\n    ```\n\n2.  **Install dependencies:**\n\n    ```bash\n    npm install\n    ```\n\n3.  **Set up environment variables:**\n    *   Create a `.env` file in the root of the repository.\n    *   Add your Twitter API keys and access tokens.\n\n        ```env\n        # Twitter API Credentials\n        X_API_KEY=your_api_key\n        X_API_SECRET=your_api_secret\n        X_ACCESS_TOKEN=your_access_token\n        X_ACCESS_TOKEN_SECRET=your_access_token_secret\n        ```\n\n    *   Replace `your_api_key`, `your_api_secret`, `your_access_token`, and `your_access_token_secret` with your actual Twitter API credentials.\n\n4.  **Build the server:**\n\n    ```bash\n    npm run build\n    ```\n\n## Running the Server\n\nTo start the server:\n\n```bash\nnode dist/index.js\n```\n\nThe server will start and listen for MCP connections, logging to the console.\n\n## Using with Claude Desktop\n\nTo connect this Twitter MCP server to Claude Desktop:\n\n1.  **Open Claude Desktop Settings:**\n    *   Open the Claude Desktop application.\n    *   Click the Claude menu from the top of your screen.\n    *   Select \"Settings...\".\n2.  **Open Developer Settings:**\n    *   Select the \"Developer\" tab in the left panel.\n    *   Click \"Edit Config.\" This should open a `claude_desktop_config.json` file in your text editor. If this file doesn't exist, it will be created for you.\n3.  **Add the Server Configuration:**\n    *   Add the following configuration inside the `mcpServers` object in `claude_desktop_config.json`. If you don't have this object, create it. Make sure that this file is in valid JSON format.\n      *   **Important:** Update the `\"args\"` path to match the location of your `dist/index.js` file and add your actual twitter keys in the `env` section.\n\n    ```json\n    {\n      \"mcpServers\": {\n        \"twitter\": {\n          \"command\": \"node\",\n          \"args\": [\n            \"/ABSOLUTE/PATH/TO/YOUR/PROJECT/dist/index.js\"\n          ],\n          \"env\": {\n              \"X_API_KEY\": \"YOUR_TWITTER_API_KEY\",\n              \"X_API_SECRET\": \"YOUR_TWITTER_API_SECRET\",\n              \"X_ACCESS_TOKEN\": \"YOUR_TWITTER_ACCESS_TOKEN\",\n              \"X_ACCESS_TOKEN_SECRET\": \"YOUR_TWITTER_ACCESS_TOKEN_SECRET\"\n\n          }\n        }\n      }\n    }\n    ```\n    -   Replace `/ABSOLUTE/PATH/TO/YOUR/PROJECT` with the correct absolute path to the directory containing your `dist/index.js` file.\n    -   Replace `YOUR_TWITTER_API_KEY`, `YOUR_TWITTER_API_SECRET`, `YOUR_TWITTER_ACCESS_TOKEN`, and `YOUR_TWITTER_ACCESS_TOKEN_SECRET` with your actual Twitter API credentials in the `env` section.\n    -   **macOS path example:** `/Users/yourusername/path/to/your/project/dist/index.js`\n    -   **Windows path example:** `C:\\\\Users\\\\yourusername\\\\path\\\\to\\\\your\\\\project\\\\dist\\\\index.js`\n4.  **Save and Restart:**\n    *   Save the `claude_desktop_config.json` file.\n    *   Restart Claude Desktop.\n\nAfter restarting, the Twitter MCP server should be connected. You can verify this by:\n\n1.  Looking for the hammer <img src=\"https://mintlify.s3.us-west-1.amazonaws.com/mcp/images/claude-desktop-mcp-hammer-icon.svg\" style=\"display: inline; margin: 0; height: 1.3em;\" /> icon in the input bar\n2.  Clicking the icon to see that the `postTweet`, `searchTweets`, and `replyToTweet` tools are available.\n\n## Using the tools in Claude\n\nOnce the server is set up and connected, you can use the available tools by prompting Claude. For example:\n\n*   **Post a tweet:**\n\n    ```text\n    Post a tweet saying \"Hello, world!\"\n    ```\n\n*   **Search for tweets:**\n\n    ```text\n    Search for tweets about \"artificial intelligence\".\n    ```\n\n*   **Reply to a tweet:**\n    *   First search for a tweet using the `searchTweets` tool:\n    ```text\n        Search for tweets about \"test\"\n    ```\n        *   Copy the tweet `id` from the search results.\n    *  Then reply to the tweet:\n    ```text\n       Reply to tweet with id <PASTE_TWEET_ID_HERE> saying \"This is a reply.\"\n    ```\n    * Replace `<PASTE_TWEET_ID_HERE>` with the tweet id you got from the search results.\n\nClaude will interpret the prompts, identify the appropriate tools, and execute them through the server.\n\n**Important Notes:**\n*   When Claude is executing these tools, it will ask you for permission before actually performing actions (posting a tweet etc)\n*  If you are getting errors, you can view the logs by checking `~/Library/Logs/Claude` on MacOS and `%APPDATA%\\Claude\\logs` on Windows.\n\n## Development\n\nTo run the server outside of Claude, you can:\n\n1.  **Set up environment variables:** Make sure you have setup your `.env` file with your twitter keys\n2.  **Build the server:** `npm run build`\n3.  **Run the server directly:** `node dist/index.js`\n\n## Contributing\n\nContributions are welcome! Please feel free to submit pull requests or create issues to suggest improvements.\n\n## License\n\nThis project is licensed under the MIT License.\n```\n","readmeFilename":"README.md"}