AiToEarn MCP 中文文档
A Model Context Protocol (MCP) server that provides social media publishing and account management capabilities for AI-driven content creation and automation.
- 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
- Node.js >= 18.0.0
- npm or yarn
- AiToEarn API access with valid API key
npm install aitoearn-mcp- 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 buildAfter installing globally:
npm install -g aitoearn-mcp
aitoearn-mcpAfter installing locally:
npm install aitoearn-mcp
npx aitoearn-mcpimport { 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}`);
});npm startOpen Aitoearn platform website for account management and platform access.
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"
}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",
}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"
}
}
}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
- Required:
videoUrl- Video file URL - Optional:
imgUrlList- Additional images
- Required:
imgUrlList- Comma-separated list of image URLs - Optional:
videoUrl- Additional video content
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
npm run buildnpm run devThis project is licensed under the MIT License - see the LICENSE file for details.