The Emlog MCP Server enables AI assistants to interact with an Emlog blog system through standardized interfaces for content management and retrieval.
Core Capabilities:
- Article Management: Create, update, retrieve, and search blog articles with options for titles, content, categories, tags, and draft status
- Comment Management: Add and retrieve comments on articles, with support for replies
- Micro-note Creation: Create and manage short updates with privacy settings
- File Uploads: Upload images and other media resources to the blog
- User Information: Retrieve details about the current user
- Content Interaction: Like articles with optional user details
- Content Discovery: Search or filter articles by keywords, tags, or categories with pagination and sorting options
Used as the HTTP client for interacting with the Emlog API, enabling article management, comments, and file uploads
Manages environment variables for Emlog API credentials and configuration settings
Integration with GitHub for repository hosting and version control of the Emlog MCP project
Supports Markdown format for creating and editing blog content within Emlog blog system
Runs the Emlog MCP server using Node.js runtime environment to connect AI assistants with Emlog blog systems
Distributes the Emlog MCP server as an npm package for easy installation and updates
Provides type-safe interactions with the Emlog blog platform API through TypeScript implementation
Validates input parameters and API responses for type safety when interacting with Emlog blog systems
Emlog MCP Server
An Emlog blog system integration service based on Model Context Protocol (MCP), allowing AI assistants to interact with Emlog blogs through standardized interfaces.
Features
Resources
- Blog Articles (
emlog://articles
) - Get all blog article lists - Categories (
emlog://categories
) - Get all category information - Comments (
emlog://comments
) - Get comment lists (based on latest articles) - Micro Notes (
emlog://notes
) - Get micro note lists - Draft Articles (
emlog://drafts
) - Get all draft article lists - User Information (
emlog://user
) - Get current user information
Tools
- create_article - Create new blog articles
- update_article - Update existing blog articles
- get_article - Get specific article details
- search_articles - Search articles (supports keyword, tag, category filtering)
- like_article - Like articles
- add_comment - Add comments
- get_comments - Get comment lists for specific articles
- create_note - Create micro notes
- upload_file - Upload files (images and other media resources)
- get_user_info - Get user information
- get_draft_list - Get draft article lists
- get_draft_detail - Get detailed information of specific drafts
Tech Stack
- TypeScript - Type-safe JavaScript superset
- Node.js - JavaScript runtime environment
- MCP SDK - Model Context Protocol TypeScript SDK
- Axios - HTTP client library
- Zod - TypeScript-first schema validation library
- form-data - Multipart form data processing
Installation and Configuration
Method 1: Direct Use (Recommended)
Use emlog-mcp
directly in Claude Desktop configuration without local installation. Jump to MCP Client Configuration section.
Method 2: Local Development Installation
1. Clone the Project
2. Install Dependencies
3. Environment Variable Configuration
Copy the example configuration file and edit:
Set the following environment variables in the .env
file:
Getting API Key:
- Log in to your Emlog backend management system
- Go to "Settings" → "API Interface"
- Enable API functionality and generate API key
- Copy the generated key to the
.env
file
4. Build Project
5. Run Service
Or development mode:
MCP Client Configuration
Claude Desktop Configuration
Add to Claude Desktop configuration file (usually located at ~/Library/Application Support/Claude/claude_desktop_config.json
):
Note: The configuration now directly uses the published npm package emlog-mcp
, no local installation or compilation required. npx
will automatically download and run the latest version.
The project also provides an example configuration file claude-desktop-config.json
for reference.
Other MCP Clients
For other MCP-supporting clients, please refer to their respective documentation for stdio transport configuration.
API Interface Documentation
This service is built on Emlog's REST API, supporting the following main operations:
Article Management
GET /api/article_list
- Get article listsGET /api/article_view
- Get specific article detailsPOST /api/article_save
- Create/update articlesPOST /api/article_like
- Like articles
Draft Management
GET /api/draft_list
- Get draft listsGET /api/draft_detail
- Get specific draft details
Category Management
GET /api/sort_list
- Get category lists
Comment Management
GET /api/comment_list
- Get comment listsPOST /api/comment_save
- Publish comments
Micro Notes
GET /api/note_list
- Get micro note listsPOST /api/note_save
- Publish micro notes
File Upload
POST /api/upload
- Upload files
User Management
GET /api/userinfo
- Get user information
Usage Examples
Create Blog Article
Search Articles
Get Article List
Get Draft List
Get Draft Details
Upload File
Create Micro Note
Error Handling
The service includes comprehensive error handling mechanisms:
- Network Errors - Automatic retry and timeout handling
- API Errors - Detailed error information return
- Authentication Errors - API key validation failure prompts
- Parameter Errors - Input parameter validation and prompts
Development and Debugging
Available Scripts
Log Output
The service outputs runtime status information to stderr for debugging:
Test Service
The project includes a simple test script test-server.js
to verify if the service is working properly:
Security Considerations
- API Key Protection - Ensure API keys are not leaked, use environment variables for storage
- HTTPS Connection - Recommend using HTTPS connection to Emlog API in production
- Permission Control - Ensure API keys have appropriate permission scope
- Input Validation - All user inputs are validated and sanitized
Troubleshooting
Common Issues
- Connection Failure
- Check if
EMLOG_API_URL
is correct - Confirm Emlog site is accessible
- Check if
- Authentication Failure
- Verify if
EMLOG_API_KEY
is valid - Check API key permissions
- Verify if
- Tool Call Failure
- Check specific reasons in error messages
- Confirm parameter format is correct
Project Structure
Contributing
Welcome to submit Issues and Pull Requests to improve this project. Before submitting code, please ensure:
- Code passes TypeScript compilation checks
- Follows project code style
- Adds appropriate error handling
- Updates relevant documentation
License
MIT License
Related Links
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
Enables AI assistants to interact with Emlog blog systems through a standardized Model Context Protocol interface, supporting content management operations like creating/updating articles, managing comments, uploading files, and accessing blog resources.
- Features
- Tech Stack
- Installation and Configuration
- MCP Client Configuration
- API Interface Documentation
- Usage Examples
- Error Handling
- Development and Debugging
- Security Considerations
- Troubleshooting
- Project Structure
- Contributing
- License
- Related Links
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityEnables AI assistants to interact with Meilisearch via the Model Context Protocol, allowing comprehensive index, document, and search management through a standardized interface.Last updated -684TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables AI assistants to interact with n8n workflows through natural language, supporting actions like listing, creating, updating, executing and monitoring workflows.Last updated -411814TypeScriptMIT License
- -securityFlicense-qualityA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.Last updated -16TypeScript
- AsecurityFlicenseAqualityA Model Context Protocol server that enables AI assistants to interact with the Omi API for retrieving and creating conversations and memories for users.Last updated -4TypeScript