chore: initial project setup with MCP server configs

- Add MCP servers for Redmine, Jenkins, Gitea, Obsidian
- Add setup_mcp.sh to generate .mcp.json from .env (no secrets in VCS)
- Add .env.example with required variable names for team onboarding
- Add .gitignore to exclude secrets (.env, .mcp.json, settings.local.json)
- Fix obsidian_mcp_server.py stdio_server async context manager usage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
joungmin
2026-02-27 19:16:54 +09:00
commit 3eb685c6f8
11 changed files with 860 additions and 0 deletions

76
setup_mcp.sh Executable file
View File

@@ -0,0 +1,76 @@
#!/bin/bash
# setup_mcp.sh
# .env를 읽어 .mcp.json을 생성합니다.
# 사용법: ./setup_mcp.sh
set -e
ENV_FILE="$(dirname "$0")/.env"
MCP_FILE="$(dirname "$0")/.mcp.json"
if [ ! -f "$ENV_FILE" ]; then
echo "오류: .env 파일이 없습니다."
echo " cp .env.example .env 후 값을 채워주세요."
exit 1
fi
# .env 로드 (주석·빈 줄 제외)
while IFS='=' read -r key value; do
[[ "$key" =~ ^\s*# ]] && continue
[[ -z "$key" ]] && continue
export "$key=$value"
done < <(grep -v '^\s*#' "$ENV_FILE" | grep -v '^\s*$')
# 필수 변수 확인
REQUIRED=(REDMINE_URL REDMINE_API_KEY JENKINS_URL JENKINS_USER JENKINS_TOKEN GITEA_API_URL GITEA_TOKEN OBSIDIAN_VAULT)
for VAR in "${REQUIRED[@]}"; do
if [ -z "${!VAR}" ]; then
echo "오류: $VAR 값이 비어 있습니다. .env를 확인하세요."
exit 1
fi
done
cat > "$MCP_FILE" <<EOF
{
"mcpServers": {
"redmine": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@onozaty/redmine-mcp-server"],
"env": {
"REDMINE_URL": "${REDMINE_URL}",
"REDMINE_API_KEY": "${REDMINE_API_KEY}"
}
},
"jenkins": {
"type": "stdio",
"command": "/opt/homebrew/bin/python3.10",
"args": ["/Users/$(whoami)/claude/jenkins_mcp_server.py"],
"env": {
"JENKINS_URL": "${JENKINS_URL}",
"JENKINS_USER": "${JENKINS_USER}",
"JENKINS_TOKEN": "${JENKINS_TOKEN}"
}
},
"gitea": {
"type": "stdio",
"command": "node",
"args": ["/Users/$(whoami)/claude/gitea_mcp_server.mjs"],
"env": {
"GITEA_API_URL": "${GITEA_API_URL}",
"GITEA_TOKEN": "${GITEA_TOKEN}"
}
},
"obsidian": {
"type": "stdio",
"command": "/opt/homebrew/bin/python3.10",
"args": ["/Users/$(whoami)/claude/obsidian_mcp_server.py"],
"env": {
"OBSIDIAN_VAULT": "${OBSIDIAN_VAULT}"
}
}
}
}
EOF
echo ".mcp.json 생성 완료. Claude Code를 재시작하세요."