MCP ExplorerExplorer

Mcp Server Of X

@saifalikhan9on a year ago
3 MIT
FreeCommunity
AI Systems
MCP-Server-of-X integrates with Twitter API for posting tweets directly.

Overview

What is Mcp Server Of X

MCP-Server-of-X is a Model Context Protocol (MCP) server that integrates with the Twitter API, enabling users to create and post tweets directly from the server.

Use cases

Use cases include automating tweet posting for marketing campaigns, integrating Twitter functionalities into applications, and utilizing the dynamic greeting resource for user engagement.

How to use

To use MCP-Server-of-X, clone the repository, install dependencies, configure your Twitter API keys in a .env file, build the project, and start the server. You can then use the provided tool to post tweets.

Key features

Key features include integration with the Twitter API for posting tweets, setup using the @modelcontextprotocol/sdk, and a dynamic greeting resource for demonstration purposes.

Where to use

MCP-Server-of-X can be used in social media applications, automated posting tools, and any project requiring seamless integration with Twitter for content sharing.

Content

MCP Server Project

This project is a Model Context Protocol (MCP) server that integrates with the Twitter API to allow users to create posts on Twitter directly from the server.

Features

  • MCP server setup using @modelcontextprotocol/sdk.
  • Integration with Twitter API for posting tweets.
  • Dynamic greeting resource for demonstration purposes.

Demo

https://github.com/user-attachments/assets/2a9b5d52-390c-489c-a311-18052e0bdf42

Prerequisites

  1. Node.js: Ensure you have Node.js installed on your system.
  2. Twitter API Keys: Obtain API keys from the Twitter Developer Portal.
    • You will need the following keys:
      • CONSUMER_KEY
      • CONSUMER_SECRET
      • TWITTER_ACCESS_TOKEN
      • TWITTER_ACCESS_SECRET

Setup Instructions

  1. Clone the repository:

    git clone <repository-url>
    cd mcp
    
  2. Install dependencies:

    pnpm install
    
  3. Create a .env file in the root directory and add your Twitter API keys:

    CONSUMER_KEY="your_consumer_key"
    CONSUMER_SECRET="your_consumer_secret"
    TWITTER_ACCESS_TOKEN="your_access_token"
    TWITTER_ACCESS_SECRET="your_access_secret"
    
  4. Build the project:

    pnpm build
    

Usage

  • The server provides a tool named create-post-on-twitter that allows you to post tweets by providing the content.
  • You can also use the dynamic greeting resource for testing purposes.

Using with VS Code GitHub Copilot

To use this MCP server with GitHub Copilot in VS Code, you need to add the following mcp object to your settings.json file:

"mcp": {
  "servers": {
    "my-mcp-server-84b96f5d": {
      "command": "node",
      "args": ["/Users/Saif Ali Khan/Desktop/Project/MCP-Server-Project/mcp/build/index.js"]
    }
  }
}

This configuration ensures that the MCP server is recognized and can be utilized by GitHub Copilot for enhanced functionality.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers