generated from templates/ai-develops
This commit is contained in:
16
.continue/mcpServers/mcp.json
Normal file
16
.continue/mcpServers/mcp.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"mcpServers": {
|
||||
"gitea": {
|
||||
"command": "gitea-mcp",
|
||||
"args": [
|
||||
"-t",
|
||||
"stdio",
|
||||
"--host",
|
||||
"https://gitea.com" //your host
|
||||
],
|
||||
"env": {
|
||||
"GITEA_ACCESS_TOKEN": "<your personal access token>"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
16
.cursor/mcp.json
Normal file
16
.cursor/mcp.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"mcpServers": {
|
||||
"gitea": {
|
||||
"command": "gitea-mcp",
|
||||
"args": [
|
||||
"-t",
|
||||
"stdio",
|
||||
"--host",
|
||||
"<your host>"
|
||||
],
|
||||
"env": {
|
||||
"GITEA_ACCESS_TOKEN": "<your personal access token>"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
21
.gitea/workflows/code-review.yml
Normal file
21
.gitea/workflows/code-review.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
name: ai-reviews
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
jobs:
|
||||
review:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Review code
|
||||
uses: kekxv/AiReviewPR@v0.0.6
|
||||
with:
|
||||
model: ${{ vars.MODEL }}
|
||||
host: ${{ vars.OLLAMA_HOST }}
|
||||
REVIEW_PULL_REQUEST: false
|
||||
31
.vscode/mcp.json
vendored
Normal file
31
.vscode/mcp.json
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"mcp": {
|
||||
"inputs": [
|
||||
{
|
||||
"type": "promptString",
|
||||
"id": "gitea_token",
|
||||
"description": "Gitea 个人访问令牌",
|
||||
"password": true
|
||||
}
|
||||
],
|
||||
"servers": {
|
||||
"gitea-mcp": {
|
||||
"command": "docker",
|
||||
"args": [
|
||||
"run",
|
||||
"-i",
|
||||
"--rm",
|
||||
"-e",
|
||||
"GITEA_HOST",
|
||||
"-e",
|
||||
"GITEA_ACCESS_TOKEN",
|
||||
"docker.gitea.com/gitea-mcp-server"
|
||||
],
|
||||
"env": {
|
||||
"GITEA_HOST": "--host https://devstar.cn",
|
||||
"GITEA_ACCESS_TOKEN": "<your personal access token>"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
62
README.md
Normal file
62
README.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# Devstar MCP
|
||||
|
||||
devstar mcp 工程项目模板
|
||||
|
||||
### 1.安装mcp
|
||||
|
||||
```
|
||||
git clone https://gitea.com/gitea/gitea-mcp.git
|
||||
```
|
||||
|
||||
构建前请先安装:
|
||||
|
||||
- make
|
||||
- Golang (Go 1.24 or later recommended)
|
||||
|
||||
```
|
||||
make install
|
||||
```
|
||||
|
||||
安装后,将 gitea-mcp 可执行文件复制到系统 PATH 目录(例如: /usr/local/bin/)
|
||||
|
||||
```
|
||||
cp gitea-mcp /usr/local/bin/
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 2.配置本地大模型
|
||||
|
||||
|
||||
|
||||
```
|
||||
curl -fsSL https://ollama.com/install.sh | sh
|
||||
|
||||
ollama pull <llm> //eg:deepseek-r1:1.5b
|
||||
```
|
||||
|
||||
#### 解决Ollama只能本地访问的问题
|
||||
|
||||
a. 编辑systemd服务配置,添加环境变量OLLAMA_HOST=0.0.0.0和OLLAMA_ORIGINS=*。
|
||||
|
||||
```
|
||||
sudo nano /etc/systemd/system/ollama.service
|
||||
```
|
||||
|
||||
|
||||
|
||||
并在 `[Service]` 区块中添加:
|
||||
|
||||
```
|
||||
Environment=OLLAMA_HOST=0.0.0.0
|
||||
Environment=OLLAMA_ORIGINS=*
|
||||
```
|
||||
|
||||
|
||||
|
||||
b. 重新加载systemd并重启Ollama服务。
|
||||
```
|
||||
sudo systemctl daemon-reexec
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart ollama
|
||||
```
|
||||
Reference in New Issue
Block a user