antrophiclove
← Kütüphaneye dön
0

.mcp.json yapılandırma kalıpları

Dört taşıma tipi (http, stdio, sse, ws), ortam değişkeni genişletme ve OAuth ayarları tek dosyada. Projenin köküne konup commit edilirse takımdaki herkes aynı MCP sunucularıyla çalışır.

yazan kuscubasiece·8 Eylül 2026
Kurulum
curl -sL https://www.antrophiclove.com/api/kaynak/mcp-json-yapilandirma-kaliplari/raw

Bu içerik mevcut dosyaya elle harmanlanmalı: .mcp.json

Kaynak: Claude Code resmi dokümantasyonu — https://code.claude.com/docs/en/mcp

.mcp.json — proje köküne koy, commit et

{ "mcpServers": { "github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { "Authorization": "Bearer ${GITHUB_PAT}" } },

"database": {
  "type": "stdio",
  "command": "npx",
  "args": ["-y", "@bytebase/dbhub"],
  "env": { "DB_CONNECTION": "${DB_URL:-postgresql://user:pass@localhost/db}" }
},

"filesystem": {
  "type": "stdio",
  "command": "npx",
  "args": ["-y", "@modelcontextprotocol/server-filesystem", "/izin/verilen/dizin"]
},

"slack": {
  "type": "http",
  "url": "https://mcp.slack.com/mcp",
  "oauth": { "scopes": "channels:read chat:write search:read" }
},

"events": {
  "type": "ws",
  "url": "wss://mcp.example.com/socket",
  "headers": { "Authorization": "Bearer ${WS_TOKEN}" }
}

} }

Ortam değişkeni sözdizimi

${VAR} zorunlu ${VAR:-varsayilan} yoksa varsayılan ${CLAUDE_PLUGIN_ROOT} eklenti kökü

Dinamik başlık (Kerberos, SSO, kısa ömürlü token)

{ "internal-api": { "type": "http", "url": "https://mcp.internal.example.com", "headersHelper": "/opt/bin/get-mcp-auth-headers.sh" } }