saifalikhan9/MCP-Server-of-X
If you are the rightful owner of MCP-Server-of-X and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
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.
create-post-on-twitter
Allows you to post tweets by providing the 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
- Node.js: Ensure you have Node.js installed on your system.
- 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
- You will need the following keys:
Setup Instructions
-
Clone the repository:
git clone <repository-url> cd mcp
-
Install dependencies:
pnpm install
-
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"
-
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.