Content
# Tencent Cloud Developer Community Article Publishing MCP Server
<div align="center">
<img width="120" alt="logo" src="https://github.com/user-attachments/assets/c95bbbd2-d1da-4255-a2e8-a07d7b89cfd7" />
<br/>
<p>
<a href="https://github.com/yangbuyiya/tencent-send-article-mcp-server/stargazers">
<img src="https://img.shields.io/github/stars/yangbuyiya/tencent-send-article-mcp-server?style=flat-square" alt="stars"/>
</a>
<a href="https://github.com/yangbuyiya/tencent-send-article-mcp-server/network/members">
<img src="https://img.shields.io/github/forks/yangbuyiya/tencent-send-article-mcp-server?style=flat-square" alt="forks"/>
</a>
<a href="https://github.com/yangbuyiya/tencent-send-article-mcp-server/issues">
<img src="https://img.shields.io/github/issues/yangbuyiya/tencent-send-article-mcp-server?style=flat-square" alt="issues"/>
</a>
<a href="https://github.com/yangbuyiya/tencent-send-article-mcp-server/blob/main/LICENSE">
<img src="https://img.shields.io/github/license/yangbuyiya/tencent-send-article-mcp-server?style=flat-square" alt="license"/>
</a>
</p>
<p>
<img src="https://img.shields.io/badge/Spring%20Boot-3.4.5-brightgreen?style=flat-square" alt="Spring Boot"/>
<img src="https://img.shields.io/badge/Spring%20AI-1.0.0-brightgreen?style=flat-square" alt="Spring AI"/>
<img src="https://img.shields.io/badge/Java-17-orange?style=flat-square" alt="Java"/>
<img src="https://img.shields.io/badge/Maven-3.6+-blue?style=flat-square" alt="Maven"/>
</p>
</div>
## 📝 Project Introduction
This is a server based on the MCP (Model Context Protocol) protocol, specifically designed for automating the publication of articles to the Tencent Cloud Developer Community. By integrating Spring Boot 3.x and Spring AI, it provides the AI assistant with the capability to interact with the Tencent Cloud Developer Community, enabling automatic article publishing and management.
<div align="center">
<img src="https://profile-counter.glitch.me/tencent-send-article-mcp-server/count.svg" alt="Visit Count" style="border-radius: 5px; padding: 5px; background: #f0f0f0;"/>
</div>
## Tech Stack
- **Framework**: Spring Boot 3.4.5
- **AI Integration**: Spring AI 1.0.0
- **Runtime Environment**: Java 17
- **Build Tool**: Maven
- **Protocol Support**: MCP (Model Context Protocol)
- **HTTP Client**: Retrofit2
- **JSON Processing**: FastJSON, Jackson
## Quick Start
### Environment Requirements
- JDK 17 or higher
- Maven 3.6 or higher
- A valid Tencent Cloud Developer Community account
### Installation Steps
1. **Clone the Project**
```bash
git clone https://github.com/yangbuyiya/tencent-send-article-mcp-server.git
cd tencent-send-article-mcp-server
```
2. **Obtain Tencent Cloud Cookie**
- Log in to the [Tencent Cloud Developer Community](https://cloud.tencent.com/developer)
- Open the browser developer tools (F12)
- Switch to the Network tab
- Refresh the page and find the Cookie in the Headers of any request
- Copy the complete Cookie string
3. **Configure Authentication Information**
```bash
# Method 1: Environment Variable
export TENCENT_API_COOKIE="your_cookie_here"
# Method 2: Command Line Argument
java -jar target/tencent-send-article-mcp-server-app.jar --tencent.api.cookie="your_cookie_here"
```
4. **Modify Code to Define Article Column**
Go to the `getAddArticleRequest` method and modify the request parameters for the article section. For specific parameters, log in to the [Tencent Cloud Developer Community](https://cloud.tencent.com/developer), open the developer tools, publish a test article, and select the column and other data you want to publish. Find the `addArticle` request, copy it, and replace the parameters below.
```java
// Only modify the parameters below
addArticleRequest.setSourceType(1); // Set to original
addArticleRequest.setClassifyIds(List.of(3,4)); // Set article category
addArticleRequest.setTagIds(List.of(17375)); // Set article tags
addArticleRequest.setLongtailTag(List.of("Interview","Interview Questions","Fun Interview")); // Set long-tail tags
addArticleRequest.setColumnIds(List.of(105380)); // Set column ID
addArticleRequest.setOpenComment(1); // Enable comments
addArticleRequest.setCloseTextLink(1); // Allow text links
addArticleRequest.setPic("https://foruda.gitee.com/images/1748188287230778527/9289646d_5151444.png"); // Set cover image
addArticleRequest.setSourceDetail(new HashMap<>()); // Set source details
addArticleRequest.setZoneName(""); // Set zone name
```
5. **Compile and Run**
```bash
# Compile the project
mvn clean package
```
## Configuration Instructions
### MCP Client Configuration in STDIO Mode
Add the following configuration to your MCP client configuration file:
```json
{
"mcpServers": {
"tencent-article-publisher": {
"command": "java",
"args": [
"-Dspring.ai.mcp.server.stdio=true",
"-Dfile.encoding=utf-8",
"-jar",
"/path/to/tencent-send-article-mcp-server-app.jar",
"--tencent.api.cookie=your_cookie_here"
]
}
}
}
```
You can also call the [ClientStdio.java](src/test/java/com/yby6/mcp/server/tencent/springAi/ClientStdio.java) class to test if the communication works.
### MCP Client Configuration in SSE Mode
```yaml
{
"mcpServers": {
"tencent-send-article-mcp-server": {
"baseUrl": "http://127.0.0.1:8633/sse"
}
}
}
```
The project defaults to using STDIO mode. If you need to use SSE mode, please modify the configuration as follows: (The project has already distinguished configurations, and you can switch modes using `profiles.active=sse/stdio`)
#### Modify Configuration File - Add Port
```yaml
server:
port: 8633 # Port number
```
#### Modify Configuration File - Switch Mode to SSE
```yaml
ai:
mcp:
server:
stdio: true # Set to false for SSE mode
name: ${spring.application.name}
version: 1.0.0
type: sync # Synchronous/Asynchronous
instructions: "
This is a server based on the MCP (Model Context Protocol) protocol,
specifically designed for automating the publication of articles to the Tencent Cloud Developer Community. By integrating Spring Boot 3.x and Spring AI, it provides the AI assistant with the capability to interact with the Tencent Cloud Developer Community,
enabling automatic article publishing and management.
"
sse-endpoint: /sse # SSE endpoint
sse-message-endpoint: /mcp/messages # Client SSE message endpoint
capabilities:
tool: true
resource: true
prompt: true
completion: true
```
#### Modify Configuration File - Log Configuration Changes
```yaml
# Note: You must disable web banners and console logging to allow STDIO transmission to work!!!
main:
banner-mode: off
# Enable SSE, comment out STDIO
web-application-type: none
logging:
# Enable SSE, comment out STDIO
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
file:
name: data/log/${spring.application.name}.log
```
#### Modify pom.xml - Add SSE Dependency Support
```xml
<!-- Standard SSE/STDIO server configuration, switch via configuration -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-mcp-server-webflux</artifactId>
</dependency>
```
Then you can call the [ClientSse.java](src/test/java/com/yby6/mcp/server/tencent/springAi/ClientSse.java) class to test if the communication works.
## Docker Deployment
### Quick Deployment
```shell
docker run -d --name tencent-send-article-mcp-server \
-p 8635:8633 \
-e TENCENT_API_COOKIE="testCookie" \
registry.cn-hangzhou.aliyuncs.com/yangbuyiya/tencent-send-article-mcp-server-app:1.0.0
```
### Build Image
> ⚠️ First modify the deployment configuration file; I will use a shell file as an example.
```shell
# Docker image related configuration
DOCKER_IMAGE_NAME="change_to_your_DockerHub_repository_name/tencent-send-article-mcp-server-app"
DOCKER_IMAGE_TAG="1.0.0"
DOCKER_PLATFORM="linux/amd64,linux/arm64"
DOCKERFILE_PATH="Dockerfile"
# Alibaba Cloud configuration
ALIYUN_REGISTRY="registry.cn-hangzhou.aliyuncs.com"
NAMESPACE="your_alibaba_cloud_namespace_repository_name"
IMAGE_NAME="tencent-send-article-mcp-server-app"
IMAGE_TAG="1.0.0"
```
After modification, run the [deploy](script/deploy) script to build, and an image will be generated upon completion.
### Run
```shell
docker run -d --name tencent-send-article-mcp-server \
-p 8635:8633 \
-e TENCENT_API_COOKIE="your_cookie_obtained_from_tencent_cloud_developer_community" \
registry.cn-hangzhou.aliyuncs.com/yangbuyiya/tencent-send-article-mcp-server-app:1.0.0
```
## Security Considerations
⚠️ **Important Reminder**:
- The Cookie contains sensitive authentication information; please keep it secure.
- Do not submit the Cookie to code repositories or share it publicly.
- It is recommended to configure the Cookie using environment variables.
- The Cookie may expire periodically and needs to be updated in a timely manner.
- In production environments, it is advisable to use a more secure authentication method.
## Troubleshooting
### Common Issues
1. **Cookie Expired**
- Log in to the Tencent Cloud Developer Community to obtain a new Cookie.
- Check if the Cookie format is complete.
2. **Article Publishing Failed**
- Check network connection.
- Verify if the article content complies with community standards.
- Confirm account permissions.
3. **MCP Connection Issues**
- Check Java path configuration.
- Verify JAR file path.
- Check application log files.
### Log Viewing
```bash
# View real-time logs
tail -f data/log/tencent-send-article-mcp-server.log
# View error logs
grep "ERROR" data/log/tencent-send-article-mcp-server.log
```
## Contribution Guidelines
Contributions are welcome! Please submit Issues and Pull Requests!
1. Fork this project.
2. Create a feature branch named `dev`.
3. Submit your changes.
4. Push to the branch.
5. Open a Pull Request.
---
**Note**: This project is for learning and research purposes only. Please comply with the usage terms of the Tencent Cloud Developer Community and relevant laws and regulations.
You Might Also Like
OpenWebUI
Open WebUI is an extensible web interface for customizable applications.

NextChat
NextChat is a light and fast AI assistant supporting Claude, DeepSeek, GPT4...

cherry-studio
Cherry Studio is a multilingual project for creative collaboration.
mssql-mcp
A .NET MCP server for reliable access to Microsoft SQL Server databases.
cursor-notebook-mcp
cursor-notebook-mcp is a Python package for enhanced notebook cursor management.
notion-server
Notion MCP Server enables Language Models to interact with Notion for page...