aitoearn-mcp
v1.0.5
Published
AiToEarn MCP - A Model Context Protocol server for social media publishing and account management
Maintainers
Readme
AiToEarn MCP 中文文档
A Model Context Protocol (MCP) server that provides social media publishing and account management capabilities for AI-driven content creation and automation.
🚀 Features
- Account Management: Retrieve and manage social media accounts
- Content Publishing: Publish video and article content to social media platforms
- Batch Operations: Publish content to multiple accounts simultaneously
- Type Validation: Automatic validation based on content type requirements
- Error Handling: Comprehensive error handling with detailed feedback
📋 Requirements
- Node.js >= 18.0.0
- npm or yarn
- AiToEarn API access with valid API key
🛠️ Installation
Via npm (Recommended)
npm install aitoearn-mcpVia GitHub
- Clone the repository:
git clone https://github.com/aitoearn/aitoearn-mcp-server.git
cd aitoearn-mcp- Install dependencies:
npm install- Build the project:
npm run build🔧 Usage
Using as a Global CLI Tool
After installing globally:
npm install -g aitoearn-mcp
aitoearn-mcpUsing as a Local Package
After installing locally:
npm install aitoearn-mcp
npx aitoearn-mcpProgrammatic Usage
import { spawn } from 'child_process';
// Start the MCP server as a subprocess
const server = spawn('npx', ['aitoearn-mcp']);
server.stdout.on('data', (data) => {
console.log(`Server: ${data}`);
});Running the MCP Server
npm startAvailable Tools
1. get-skKey
Open Aitoearn platform website for account management and platform access.
2. create-publish-list
Batch publish content to all accounts associated with your API key.
Parameters:
skKey(string): Your AiToEarn API keytype(string): Content type ("video" or "article")title(string): Content titlecoverUrl(string): Cover image URLtopics(string): Comma-separated topics/hashtagsdesc(string, optional): Content descriptionvideoUrl(string): Video URL (required for video type)imgUrlList(string): Comma-separated image URLs (required for article type)publishTime(string, optional): Scheduled publish time
Example (Video):
{
"skKey": "sk-YOUR_API_KEY_HERE",
"type": "video",
"title": "My Amazing Video",
"videoUrl": "https://example.com/video.mp4",
"coverUrl": "https://example.com/cover.jpg",
"topics": "lifestyle,entertainment"
}Example (Article):
{
"skKey": "sk-YOUR_API_KEY_HERE",
"type": "article",
"title": "My Article Title",
"imgUrlList": "https://example.com/img1.jpg,https://example.com/img2.jpg",
"coverUrl": "https://example.com/cover.jpg",
"topics": "technology,innovation"
}3. get-publish-task-list
Get the list of published tasks
参数:
skKey(string): Your AiToEarn API keyflowId(string): The flow ID returned during batch release
示例
{
"skKey": "sk-YOUR_API_KEY_HERE",
"flowId": "flowId",
}MCP Client Configuration
Claude Desktop
Add the server configuration to your Claude Desktop config file:
macOS/Linux: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"aitoearn": {
"command": "npx",
"args": ["aitoearn-mcp"]
}
}
}Or if installed globally:
{
"mcpServers": {
"aitoearn": {
"command": "aitoearn-mcp"
}
}
}Other MCP Clients
For other MCP clients, refer to their documentation on how to configure MCP servers. The server runs over stdio transport.
Description: This tool provides information about the AiToEarn platform (https://aitoearn.ai) including:
- Account management and configuration
- Content creation and scheduling
- Analytics and performance tracking
- API key management
- Social media account integration
🏗️ Content Type Requirements
Video Content (type: "video")
- Required:
videoUrl- Video file URL - Optional:
imgUrlList- Additional images
Article Content (type: "article")
- Required:
imgUrlList- Comma-separated list of image URLs - Optional:
videoUrl- Additional video content
🔍 Error Handling
The server provides comprehensive error handling with detailed error messages:
- Validation Errors: Clear messages about missing required fields
- API Errors: Detailed information about API communication issues
- Network Errors: Helpful guidance for connectivity problems
- Authentication Errors: Clear feedback about API key issues
🧪 Development
Build
npm run buildDevelopment Mode
npm run dev📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
