### Run tests and start server Source: https://github.com/arianchen777/yuquemcp/blob/main/CONTRIBUTING.md Run the test suite and start the server with the configuration file to verify your changes. ```bash go test ./... go run cmd/server/main.go -f config.yaml ``` -------------------------------- ### Install Go dependencies with go mod tidy Source: https://github.com/arianchen777/yuquemcp/blob/main/README.md Installs the Go module dependencies for the project. Run this after setting the environment variable and before starting the server. ```bash go mod tidy ``` -------------------------------- ### Start Yuque MCP server Source: https://github.com/arianchen777/yuquemcp/blob/main/README.md Starts the Yuque MCP server using the specified configuration file. The server will listen on http://localhost:8080. ```bash go run cmd/server/main.go -f config.yaml ``` -------------------------------- ### Set up development environment Source: https://github.com/arianchen777/yuquemcp/blob/main/CONTRIBUTING.md These commands set up the development environment: clone the forked repository, install dependencies with go mod tidy, and set the YUQUE_TOKEN environment variable. ```bash git clone https://github.com/YOUR_USERNAME/YuQueMCP.git cd YuQueMCP ``` ```bash go mod tidy ``` ```bash export YUQUE_TOKEN="your_yuque_token" ``` -------------------------------- ### Example commit messages Source: https://github.com/arianchen777/yuquemcp/blob/main/CONTRIBUTING.md Example commit messages following the Conventional Commits format: feat, fix, and docs types. ```text feat(client): add document search functionality fix(auth): handle token expiration correctly docs: update API documentation ``` -------------------------------- ### Commit changes with Conventional Commits Source: https://github.com/arianchen777/yuquemcp/blob/main/CONTRIBUTING.md Stage all changes and commit using the Conventional Commits format. The example commit message is 'feat: add new feature'. ```bash git add . git commit -m "feat: add new feature" # 使用约定式提交格式 ``` -------------------------------- ### Set YUQUE_TOKEN environment variable Source: https://github.com/arianchen777/yuquemcp/blob/main/README.md Sets the YUQUE_TOKEN environment variable required for authenticating with the Yuque API. Replace the placeholder with your actual token before starting the server. ```bash export YUQUE_TOKEN="your_yuque_token_here" ``` -------------------------------- ### Push branch and create PR Source: https://github.com/arianchen777/yuquemcp/blob/main/CONTRIBUTING.md Push the feature branch to your fork, then create a Pull Request on GitHub. ```bash git push origin feature/your-feature-name ``` -------------------------------- ### Project directory structure Source: https://github.com/arianchen777/yuquemcp/blob/main/CONTRIBUTING.md The project directory structure showing the main folders and their purposes: cmd/server for the server entry, internal for configuration, MCP server implementation, tools, and YuQue API client, plus .github, config.yaml, and README.md. ```text ├── cmd/server/ # 服务器入口 ├── internal/ │ ├── config/ # 配置相关 │ ├── server/ # MCP服务器实现 │ │ └── tools/ # 工具实现 │ └── yuque/ # 语雀API客户端 ├── .github/ # GitHub模板 ├── config.yaml # 配置文件 └── README.md # 项目说明 ``` -------------------------------- ### Cursor IDE MCP integration config Source: https://github.com/arianchen777/yuquemcp/blob/main/README.md JSON configuration for integrating the Yuque MCP server with Cursor IDE. Add this to the MCP settings, then modify the cwd path to your project's actual path and replace YUQUE_TOKEN with your real token. Restart Cursor IDE after adding the configuration. ```json { "mcpServers": { "yuque": { "command": "go", "args": ["run", "cmd/server/main.go", "-f", "config.yaml"], "cwd": "/path/to/YuQueMCP", "env": { "YUQUE_TOKEN": "your_yuque_token_here" } } } } ``` -------------------------------- ### Create a feature or fix branch Source: https://github.com/arianchen777/yuquemcp/blob/main/CONTRIBUTING.md Create a new branch for your feature or bug fix. Use the feature/ prefix for new features and fix/ for bug fixes. ```bash git checkout -b feature/your-feature-name # 或 git checkout -b fix/your-bug-fix ``` -------------------------------- ### Yuque MCP server config.yaml Source: https://github.com/arianchen777/yuquemcp/blob/main/README.md Configuration file for the Yuque MCP server. The token is set via the YUQUE_TOKEN environment variable, not in this file. The CORS setting allows requests from http://localhost:3000. ```yaml name: yuque-mcp-server host: localhost port: 8080 mcp: name: yuque-mcp-server messageTimeout: 30s cors: - http://localhost:3000 yuque: baseUrl: "https://www.yuque.com/api/v2" # token 通过环境变量 YUQUE_TOKEN 设置 ``` -------------------------------- ### Conventional Commits format Source: https://github.com/arianchen777/yuquemcp/blob/main/CONTRIBUTING.md The Conventional Commits format for commit messages. The type is required, scope is optional, and the description follows. Optional body and footer can be added. ```text <类型>[可选的作用域]: <描述> [可选的正文] [可选的脚注] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.