From 123186c26cfe54ad2b74e7199dac5538c7bdef33 Mon Sep 17 00:00:00 2001 From: gitee-bot Date: Tue, 12 Aug 2025 09:11:27 +0000 Subject: [PATCH] Update README.md --- README.en.md | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 236 insertions(+) create mode 100644 README.en.md create mode 100644 README.md diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..8383bf1 --- /dev/null +++ b/README.en.md @@ -0,0 +1,118 @@ + + +# Gitee MCP Ent Server + +The Gitee MCP Ent Server is a Go-based server application that implements the Model Context Provider (MCP) protocol for Gitee Enterprise. It provides a wide range of tools for interacting with Gitee Enterprise, including issue management, pull request handling, repository operations, and more. + +## Features + +- Supports both stdio and SSE transports +- Comprehensive Gitee Enterprise API integration +- Toolset management (enable/disable specific tools) +- Authentication via access token or cookies +- Rich error handling with specific error types +- Structured response formatting + +## Installation + +### Prerequisites + +- Go 1.23 or later +- Gitee Enterprise access token +- Docker (optional for container deployment) + +### From Source + +```bash +git clone https://22718.runjs.cn/gigi-two222/mcp-gitee-ent +cd mcp-gitee-ent +make build +``` + +### Using Docker + +```bash +docker build -t mcp-gitee-ent . +docker run -p 8000:8000 mcp-gitee-ent +``` + +## Usage + +Start the server with: + +```bash +./mcp-gitee-ent --token YOUR_ACCESS_TOKEN +``` + +Available tools include: + +- Issue management: create, update, comment, and list issues +- Pull request handling: create, update, comment, merge, and list pull requests +- Repository operations: create, list repositories, get file content, and repository tree +- Enterprise resource management: list enterprises, programs, groups, members, and labels +- Scrum support: manage sprints and versions +- Issue type and state management + +### Example: + +```bash +# Start server with custom address and port +./mcp-gitee-ent --transport sse --sse-address 0.0.0.0:8000 --token YOUR_TOKEN + +# List all repositories in an enterprise +curl -X POST http://localhost:8000/v1/tools/call \ + -H "Content-Type: application/json" \ + -d '{ + "tool_name": "list-enterprise-projects", + "parameters": { + "enterprise": "your-enterprise-name" + } + }' + +# Create a new issue +curl -X POST http://localhost:8000/v1/tools/call \ + -H "Content-Type: application/json" \ + -d '{ + "tool_name": "create-issue", + "parameters": { + "enterprise": "your-enterprise-name", + "program": "your-program", + "repository": "your-repo", + "title": "New Issue", + "content": "Issue description" + } + }' +``` + +## Configuration + +### Environment Variables + +| Variable | Description | +|---------|-------------| +| `GITEE_ACCESS_TOKEN` | Gitee Enterprise access token | +| `GITEE_API_BASE` | Gitee Enterprise API base URL | + +### Command Line Options + +| Option | Description | +|--------|-------------| +| `--token` | Set Gitee Enterprise access token | +| `--api-base` | Set custom Gitee Enterprise API base URL | +| `--version` | Show version information | +| `--transport` | Set transport type (stdio or sse) | +| `--sse-address` | Set host and port for SSE server | +| `--disabled-toolsets` | Comma-separated list of tools to disable | +| `--enabled-toolsets` | Comma-separated list of tools to enable (if specified, only these tools will be available) | + +## Contributing + +We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for more details. + +## License + +This project is licensed under the MIT License. See [LICENSE](LICENSE) for details. + +## Contact + +For questions or support, please reach out to our team at [contact@gitee.com](mailto:contact@gitee.com) or visit our [Gitee page](https://gitee.com). \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..c7514d3 --- /dev/null +++ b/README.md @@ -0,0 +1,118 @@ + + +# Gitee MCP Ent Server + +The Gitee MCP Ent Server is a Go-based server application that implements the Model Context Provider (MCP) protocol for Gitee Enterprise. It provides a wide range of tools for interacting with Gitee Enterprise, including issue management, pull request handling, repository operations, and more. + +## Features + +- Supports both stdio and SSE transports +- Comprehensive Gitee Enterprise API integration +- Toolset management (enable/disable specific tools) +- Authentication via access token or cookies +- Rich error handling with specific error types +- Structured response formatting + +## Installation + +### Prerequisites + +- Go 1.23 or later +- Gitee Enterprise access token +- Docker (optional for container deployment) + +### From Source + +```bash +git clone https://22718.runjs.cn/gigi-two222/mcp-gitee-ent +cd mcp-gitee-ent +make build +``` + +### Using Docker + +```bash +docker build -t mcp-gitee-ent . +docker run -p 8000:8000 mcp-gitee-ent +``` + +## Usage + +Start the server with: + +```bash +./mcp-gitee-ent --token YOUR_ACCESS_TOKEN +``` + +Available tools include: + +- Issue management: create, update, comment, and list issues +- Pull request handling: create, update, comment, merge, and list pull requests +- Repository operations: create, list repositories, get file content, and repository tree +- Enterprise resource management: list enterprises, programs, groups, members, and labels +- Scrum support: manage sprints and versions +- Issue type and state management + +### Example: + +```bash +# Start server with custom address and port +./mcp-gitee-ent --transport sse --sse-address 0.0.0.0:8000 --token YOUR_TOKEN + +# List all repositories in an enterprise +curl -X POST http://localhost:8000/v1/tools/call \ + -H "Content-Type: application/json" \ + -d '{ + "tool_name": "list-enterprise-projects", + "parameters": { + "enterprise": "your-enterprise-name" + } + }' + +# Create a new issue +curl -X POST http://localhost:8000/v1/tools/call \ + -H "Content-Type: application/json" \ + -d '{ + "tool_name": "create-issue", + "parameters": { + "enterprise": "your-enterprise-name", + "program": "your-program", + "repository": "your-repo", + "title": "New Issue", + "content": "Issue description" + } + }' +``` + +## Configuration + +### Environment Variables + +| Variable | Description | +|---------|-------------| +| `GITEE_ACCESS_TOKEN` | Gitee Enterprise access token | +| `GITEE_API_BASE` | Gitee Enterprise API base URL | + +### Command Line Options + +| Option | Description | +|--------|-------------| +| `--token` | Set Gitee Enterprise access token | +| `--api-base` | Set custom Gitee Enterprise API base URL | +| `--version` | Show version information | +| `--transport` | Set transport type (stdio or sse) | +| `--sse-address` | Set host and port for SSE server | +| `--disabled-toolsets` | Comma-separated list of tools to disable | +| `--enabled-toolsets` | Comma-separated list of tools to enable (if specified, only these tools will be available) | + +## Contributing + +We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for more details. + +## License + +This project is licensed under the MIT License. See [LICENSE](LICENSE) for details. + +## Contact + +For questions or support, please reach out to our team at [contact@gitee.com](mailto:contact@gitee.com) or visit our [Gitee page](https://gitee.com). \ No newline at end of file -- Gitee