ADK์ฉ GitHub MCP ๋๊ตฌ¶
ADK์์ ์ง์PythonTypeScript
GitHub MCP Server๋ AI ๋๊ตฌ๋ฅผ GitHub ํ๋ซํผ์ ์ง์ ์ฐ๊ฒฐํฉ๋๋ค. ์ด๋ฅผ ํตํด ADK ์์ด์ ํธ๋ ๋ฆฌํฌ์งํ ๋ฆฌ์ ์ฝ๋ ํ์ผ์ ์ฝ๊ณ , ์ด์์ PR์ ๊ด๋ฆฌํ๊ณ , ์ฝ๋๋ฅผ ๋ถ์ํ๋ฉฐ, ์์ฐ์ด๋ก ์ํฌํ๋ก๋ฅผ ์๋ํํ ์ ์์ต๋๋ค.
์ฌ์ฉ ์ฌ๋ก¶
- ๋ฆฌํฌ์งํ ๋ฆฌ ๊ด๋ฆฌ: ์ ๊ทผ ๊ฐ๋ฅํ ๋ชจ๋ ๋ฆฌํฌ์งํ ๋ฆฌ์์ ์ฝ๋๋ฅผ ํ์ ๋ฐ ์ง์ํ๊ณ , ํ์ผ์ ๊ฒ์ํ๋ฉฐ, ์ปค๋ฐ์ ๋ถ์ํ๊ณ , ํ๋ก์ ํธ ๊ตฌ์กฐ๋ฅผ ํ์ ํฉ๋๋ค.
- ์ด์ ๋ฐ PR ์๋ํ: ์ด์์ ํ ๋ฆฌํ์คํธ๋ฅผ ์์ฑ, ์ ๋ฐ์ดํธ, ๊ด๋ฆฌํฉ๋๋ค. AI๊ฐ ๋ฒ๊ทธ ๋ถ๋ฅ, ์ฝ๋ ๋ณ๊ฒฝ ๊ฒํ , ํ๋ก์ ํธ ๋ณด๋ ์ ์ง ๊ด๋ฆฌ๋ฅผ ๋์ธ ์ ์์ต๋๋ค.
- ์ฝ๋ ๋ถ์: ๋ณด์ ํ์ง ๊ฒฐ๊ณผ๋ฅผ ์ดํด๋ณด๊ณ , Dependabot ๊ฒฝ๊ณ ๋ฅผ ๊ฒํ ํ๋ฉฐ, ์ฝ๋ ํจํด์ ์ดํดํ๊ณ , ์ฝ๋๋ฒ ์ด์ค ์ ๋ฐ์ ๋ํ ์ข ํฉ์ ์ธ ์ธ์ฌ์ดํธ๋ฅผ ์ป์ต๋๋ค.
์ ์ ์กฐ๊ฑด¶
- GitHub์์ Personal Access Token์ ์์ฑํ์ธ์. ์์ธํ ๋ด์ฉ์ ๋ฌธ์๋ฅผ ์ฐธ๊ณ ํ์ธ์.
์์ด์ ํธ์ ํจ๊ป ์ฌ์ฉ¶
from google.adk.agents import Agent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPServerParams
GITHUB_TOKEN = "YOUR_GITHUB_TOKEN"
root_agent = Agent(
model="gemini-2.5-pro",
name="github_agent",
instruction="์ฌ์ฉ์๊ฐ GitHub์์ ์ ๋ณด๋ฅผ ์ป๋๋ก ๋์ต๋๋ค",
tools=[
McpToolset(
connection_params=StreamableHTTPServerParams(
url="https://api.githubcopilot.com/mcp/",
headers={
"Authorization": f"Bearer {GITHUB_TOKEN}",
"X-MCP-Toolsets": "all",
"X-MCP-Readonly": "true"
},
),
)
],
)
import { LlmAgent, MCPToolset } from "@google/adk";
const GITHUB_TOKEN = "YOUR_GITHUB_TOKEN";
const rootAgent = new LlmAgent({
model: "gemini-2.5-pro",
name: "github_agent",
instruction: "Help users get information from GitHub",
tools: [
new MCPToolset({
type: "StreamableHTTPConnectionParams",
url: "https://api.githubcopilot.com/mcp/",
transportOptions: {
requestInit: {
headers: {
Authorization: `Bearer ${GITHUB_TOKEN}`,
"X-MCP-Toolsets": "all",
"X-MCP-Readonly": "true",
},
},
},
}),
],
});
export { rootAgent };
์ฌ์ฉ ๊ฐ๋ฅํ ๋๊ตฌ¶
| ๋๊ตฌ | ์ค๋ช |
|---|---|
context |
ํ์ฌ ์ฌ์ฉ์์ ์์ ์ค์ธ GitHub ์ปจํ ์คํธ์ ๋ํ ๋งฅ๋ฝ์ ์ ๊ณตํ๋ ๋๊ตฌ |
copilot |
Copilot ๊ด๋ จ ๋๊ตฌ(์: Copilot Coding Agent) |
copilot_spaces |
Copilot Spaces ๊ด๋ จ ๋๊ตฌ |
actions |
GitHub Actions ์ํฌํ๋ก์ CI/CD ์์ |
code_security |
GitHub Code Scanning๊ณผ ๊ฐ์ ์ฝ๋ ๋ณด์ ๊ด๋ จ ๋๊ตฌ |
dependabot |
Dependabot ๋๊ตฌ |
discussions |
GitHub Discussions ๊ด๋ จ ๋๊ตฌ |
experiments |
์์ง ์์ ์ ์ธ ๊ฒ์ผ๋ก ๊ฐ์ฃผ๋์ง ์๋ ์คํ์ ๊ธฐ๋ฅ |
gists |
GitHub Gist ๊ด๋ จ ๋๊ตฌ |
github_support_docs_search |
GitHub ์ ํ ๋ฐ ์ง์ ์ง๋ฌธ์ ๋ตํ๊ธฐ ์ํ ๋ฌธ์ ๊ฒ์ |
issues |
GitHub Issues ๊ด๋ จ ๋๊ตฌ |
labels |
GitHub Labels ๊ด๋ จ ๋๊ตฌ |
notifications |
GitHub Notifications ๊ด๋ จ ๋๊ตฌ |
orgs |
GitHub Organization ๊ด๋ จ ๋๊ตฌ |
projects |
GitHub Projects ๊ด๋ จ ๋๊ตฌ |
pull_requests |
GitHub Pull Request ๊ด๋ จ ๋๊ตฌ |
repos |
GitHub Repository ๊ด๋ จ ๋๊ตฌ |
secret_protection |
GitHub Secret Scanning๊ณผ ๊ฐ์ ์ํฌ๋ฆฟ ๋ณดํธ ๊ด๋ จ ๋๊ตฌ |
security_advisories |
๋ณด์ ๊ถ๊ณ ๊ด๋ จ ๋๊ตฌ |
stargazers |
GitHub Stargazers ๊ด๋ จ ๋๊ตฌ |
users |
GitHub User ๊ด๋ จ ๋๊ตฌ |
๊ตฌ์ฑ¶
์๊ฒฉ GitHub MCP ์๋ฒ์๋ ์ฌ์ฉํ ์ ์๋ ๋๊ตฌ ์ธํธ์ ์ฝ๊ธฐ ์ ์ฉ ๋ชจ๋๋ฅผ ๊ตฌ์ฑํ๊ธฐ ์ํ ์ ํ์ ํค๋๊ฐ ์์ต๋๋ค.
-
X-MCP-Toolsets: ํ์ฑํํ ๋๊ตฌ ์ธํธ์ ์ผํ ๊ตฌ๋ถ ๋ชฉ๋ก์ ๋๋ค. (์:"repos,issues")- ๋ชฉ๋ก์ด ๋น์ด ์์ผ๋ฉด ๊ธฐ๋ณธ ๋๊ตฌ ์ธํธ๊ฐ ์ฌ์ฉ๋ฉ๋๋ค. ์๋ชป๋ ๋๊ตฌ ์ธํธ๊ฐ ์ ๊ณต๋๋ฉด ์๋ฒ๊ฐ ์์๋์ง ์๊ณ 400 bad request ์ํ๋ฅผ ๋ฐํํฉ๋๋ค. ๊ณต๋ฐฑ์ ๋ฌด์๋ฉ๋๋ค.
-
X-MCP-Readonly: "์ฝ๊ธฐ" ๋๊ตฌ๋ง ํ์ฑํํฉ๋๋ค.- ์ด ํค๋๊ฐ ๋น์ด ์๊ฑฐ๋
"false","f","no","n","0","off"์ด๋ฉด (๊ณต๋ฐฑ๊ณผ ๋์๋ฌธ์๋ฅผ ๋ฌด์ํ๊ณ ) false๋ก ํด์๋ฉ๋๋ค. ๊ทธ ์ธ์ ๊ฐ์ ๋ชจ๋ true๋ก ํด์๋ฉ๋๋ค.
- ์ด ํค๋๊ฐ ๋น์ด ์๊ฑฐ๋