# auto **Repository Path**: zhao-qiuling/auto ## Basic Information - **Project Name**: auto - **Description**: 用AI在csdn上自动写博客 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-23 - **Last Updated**: 2026-04-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CSDN Auto Blogger Spring Boot prototype for generating CSDN blog drafts with Spring AI Alibaba and publishing them through Playwright browser automation. ## Run Without AI This mode uses the local template generator and does not require a model API key. ```powershell java -jar target\mcp-1.0-SNAPSHOT.jar ``` ## Run With Spring AI Alibaba Set your DashScope API key through an environment variable. Do not hard-code it in the project. ```powershell $env:AI_DASHSCOPE_API_KEY="your-dashscope-api-key" $env:AI_DASHSCOPE_MODEL="qwen-plus" java -jar target\mcp-1.0-SNAPSHOT.jar --spring.profiles.active=ai ``` The application also accepts `DASHSCOPE_API_KEY` or `AI_BAILIAN_API_KEY` if you prefer those environment variable names. ## CSDN Login State Open the application and call the login bootstrap endpoint once. A browser window will open for manual CSDN login, then the login state is saved to `.local/csdn-state.json`. ```powershell Invoke-RestMethod -Method Post http://localhost:8080/api/csdn/bootstrap-login ``` ## Publish A Generated Article Save as draft: ```powershell Invoke-RestMethod -Method Post "http://localhost:8080/api/articles/publish-generated?publishNow=false" ``` Publish immediately: ```powershell Invoke-RestMethod -Method Post "http://localhost:8080/api/articles/publish-generated?publishNow=true" ``` ## MCP Server The application exposes MCP tools through Spring AI MCP WebMVC server support. Available tools: - `publishToCsdn`: publish or save a provided Markdown article to CSDN. - `generateAndPublishToCsdn`: generate today's article and publish or save it. Default MCP transport is Streamable HTTP. The server runs on the same Spring Boot port.