@mokoconsulting/mcp-mokogitea-api 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mokogitea/workflows/auto-bump.yml +9 -9
- package/.mokogitea/workflows/auto-release.yml +90 -28
- package/.mokogitea/workflows/branch-cleanup.yml +1 -1
- package/.mokogitea/workflows/npm-publish.yml +69 -10
- package/.mokogitea/workflows/pr-check.yml +2 -2
- package/.mokogitea/workflows/pre-release.yml +244 -3
- package/.mokogitea/workflows/repo-health.yml +4 -3
- package/dist/client.js +20 -1
- package/dist/index.js +10 -2
- package/package.json +1 -1
- package/src/client.ts +15 -1
- package/src/index.ts +10 -2
- package/Dockerfile +0 -18
- package/dist/server.d.ts +0 -4
- package/dist/server.js +0 -12
- package/dist/sse.d.ts +0 -2
- package/dist/sse.js +0 -87
- package/src/server.ts +0 -16
- package/src/sse.ts +0 -100
- package/wiki/ARCHITECTURE.md +0 -144
- package/wiki/Home.md +0 -35
- package/wiki/INSTALLATION.md +0 -170
package/wiki/INSTALLATION.md
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
← [Home](Home)
|
|
2
|
-
|
|
3
|
-
# Installation Guide
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- **Node.js** >= 20.0.0 ([download](https://nodejs.org))
|
|
8
|
-
- **npm** (included with Node.js)
|
|
9
|
-
- A **Gitea instance** with API access enabled
|
|
10
|
-
- A **Gitea access token** with appropriate scopes
|
|
11
|
-
|
|
12
|
-
## Install
|
|
13
|
-
|
|
14
|
-
### Clone and Build
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
git clone https://git.mokoconsulting.tech/MokoConsulting/gitea-api-mcp.git
|
|
18
|
-
cd gitea-api-mcp
|
|
19
|
-
npm install
|
|
20
|
-
npm run build
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
The compiled output is placed in `dist/index.js`.
|
|
24
|
-
|
|
25
|
-
### Verify the Build
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
node dist/index.js --help
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Gitea Token Generation
|
|
32
|
-
|
|
33
|
-
1. Log in to your Gitea instance (e.g., `https://git.mokoconsulting.tech`)
|
|
34
|
-
2. Navigate to **Settings** (click your avatar, top-right corner)
|
|
35
|
-
3. Select **Applications** from the sidebar
|
|
36
|
-
4. Under **Manage Access Tokens**, enter a descriptive token name (e.g., `mcp-server`)
|
|
37
|
-
5. Select the required permission scopes:
|
|
38
|
-
- `repo` -- for repository operations
|
|
39
|
-
- `admin:org` -- for organization management
|
|
40
|
-
- `notification` -- for notification tools
|
|
41
|
-
- `user` -- for user profile operations
|
|
42
|
-
- `issue` -- for issue and pull request tools
|
|
43
|
-
- `package` -- if using package-related endpoints
|
|
44
|
-
6. Click **Generate Token**
|
|
45
|
-
7. **Copy the token immediately** -- it will not be displayed again
|
|
46
|
-
|
|
47
|
-
## Configuration
|
|
48
|
-
|
|
49
|
-
### Config File Format
|
|
50
|
-
|
|
51
|
-
Create `~/.gitea-api-mcp.json`:
|
|
52
|
-
|
|
53
|
-
```json
|
|
54
|
-
{
|
|
55
|
-
"defaultConnection": "moko",
|
|
56
|
-
"connections": {
|
|
57
|
-
"moko": {
|
|
58
|
-
"baseUrl": "https://git.mokoconsulting.tech",
|
|
59
|
-
"token": "your-gitea-access-token",
|
|
60
|
-
"insecure": false
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Config Fields
|
|
67
|
-
|
|
68
|
-
| Field | Type | Required | Description |
|
|
69
|
-
|-------|------|----------|-------------|
|
|
70
|
-
| `defaultConnection` | string | No | Name of the default connection (defaults to the first one) |
|
|
71
|
-
| `connections` | object | Yes | Map of named connections |
|
|
72
|
-
| `connections.<name>.baseUrl` | string | Yes | Base URL of the Gitea instance (no trailing slash) |
|
|
73
|
-
| `connections.<name>.token` | string | Yes | Gitea API access token |
|
|
74
|
-
| `connections.<name>.insecure` | boolean | No | Skip TLS certificate verification (default: `false`) |
|
|
75
|
-
|
|
76
|
-
### Custom Config Path
|
|
77
|
-
|
|
78
|
-
Override the default config location with an environment variable:
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
export GITEA_API_MCP_CONFIG=/path/to/custom-config.json
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### File Permissions
|
|
85
|
-
|
|
86
|
-
Secure your config file since it contains API tokens:
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
chmod 600 ~/.gitea-api-mcp.json
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Claude Code Registration
|
|
93
|
-
|
|
94
|
-
### Project-Level (`.mcp.json`)
|
|
95
|
-
|
|
96
|
-
Create or edit `.mcp.json` in your project root:
|
|
97
|
-
|
|
98
|
-
```json
|
|
99
|
-
{
|
|
100
|
-
"mcpServers": {
|
|
101
|
-
"gitea-moko": {
|
|
102
|
-
"command": "node",
|
|
103
|
-
"args": ["/absolute/path/to/gitea-api-mcp/dist/index.js"]
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Global-Level (`~/.claude/claude_desktop_config.json`)
|
|
110
|
-
|
|
111
|
-
```json
|
|
112
|
-
{
|
|
113
|
-
"mcpServers": {
|
|
114
|
-
"gitea-moko": {
|
|
115
|
-
"command": "node",
|
|
116
|
-
"args": ["/absolute/path/to/gitea-api-mcp/dist/index.js"]
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
After registering, restart Claude Code or run `/mcp` to verify the server is connected.
|
|
123
|
-
|
|
124
|
-
## Troubleshooting
|
|
125
|
-
|
|
126
|
-
### "Failed to load config" Error
|
|
127
|
-
|
|
128
|
-
- Verify `~/.gitea-api-mcp.json` exists and is valid JSON
|
|
129
|
-
- Check that at least one connection is defined in `connections`
|
|
130
|
-
- If using `GITEA_API_MCP_CONFIG`, verify the path is correct and the file is readable
|
|
131
|
-
|
|
132
|
-
### "Connection not found" Error
|
|
133
|
-
|
|
134
|
-
- The `connection` parameter you passed does not match any key in `connections`
|
|
135
|
-
- Run `gitea_list_connections` to see available connections
|
|
136
|
-
- Check for typos in the connection name
|
|
137
|
-
|
|
138
|
-
### Authentication Failures (HTTP 401)
|
|
139
|
-
|
|
140
|
-
- Verify your token is correct and has not expired
|
|
141
|
-
- Ensure the token has the required scopes for the operation
|
|
142
|
-
- Check that the `baseUrl` points to the correct Gitea instance
|
|
143
|
-
- Confirm the Gitea instance has API access enabled (admin setting)
|
|
144
|
-
|
|
145
|
-
### TLS / Certificate Errors
|
|
146
|
-
|
|
147
|
-
- For self-signed certificates, set `"insecure": true` in the connection config
|
|
148
|
-
- Ensure the Gitea instance URL uses the correct protocol (`https://` vs `http://`)
|
|
149
|
-
|
|
150
|
-
### Timeout Errors
|
|
151
|
-
|
|
152
|
-
- The default request timeout is 30 seconds
|
|
153
|
-
- Check network connectivity to the Gitea instance
|
|
154
|
-
- Verify the Gitea instance is running and responsive
|
|
155
|
-
- For large responses (e.g., recursive tree listings), consider pagination
|
|
156
|
-
|
|
157
|
-
### MCP Server Not Appearing in Claude Code
|
|
158
|
-
|
|
159
|
-
- Ensure the path in your MCP config is an absolute path to `dist/index.js`
|
|
160
|
-
- Verify the build completed successfully (`npm run build`)
|
|
161
|
-
- Check that Node.js >= 20.0.0 is in your PATH
|
|
162
|
-
- Restart Claude Code after modifying MCP configuration
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
*Repo: [gitea-api-mcp](https://git.mokoconsulting.tech/MokoConsulting/gitea-api-mcp) . [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/mokoplatform/wiki/Home)*
|
|
167
|
-
|
|
168
|
-
| Revision | Date | Author | Description |
|
|
169
|
-
|---|---|---|---|
|
|
170
|
-
| 1.0 | 2026-05-09 | Moko Consulting | Initial version |
|