GitHub MCP Server
GitHub MCP CLI with Ollama
一个基于终端的项目,使用模型上下文协议(MCP)和本地大语言模型(通过 Ollama)来查询和汇总 GitHub 数据。
概述
本项目分为两个组件:
MCP 服务器(
server.py):使用fastmcp构建,提供获取 GitHub 仓库详细信息、近期 issue 和近期提交的工具。CLI 客户端(
client.py):使用rich和 LangChain 构建的交互式终端界面,通过本地 Ollama 模型与 MCP 工具交互。
Related MCP server: GitHub MCP Server
环境搭建
安装依赖:
pip install -r requirements.txt配置 GitHub 访问: 为了获得更高的速率限制并访问私有仓库,请将你的 GitHub 个人访问令牌(PAT)导出为环境变量(或将其放入
.env文件中):export GITHUB_TOKEN="your_personal_access_token_here"启动 Ollama: 确保 Ollama 在本地运行,并使用支持工具调用的模型(如
llama3.2):ollama run llama3.2运行客户端:
python client.py
开发
目前,server.py 和 client.py 都已完全可用。客户端使用 MultiServerMCPClient 和 LangChain 的 React Agent 无缝连接到工具,并将你的问题路由到 Ollama。
MCP 服务器暴露的工具:
get_repo(owner, repo):获取仓库的基本信息。list_issues(owner, repo, state, limit):获取最近的 issue。list_commits(owner, repo, limit):获取最近的提交。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityAmaintenanceMCP server that exposes GitHub operations as tools for AI agents, enabling code search, issue management, and PR review.12MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides tools for interacting with the GitHub API, enabling AI assistants to query repositories, pull requests, issues, commits, users, and more.441ISC
- AlicenseBqualityCmaintenanceA comprehensive MCP server that exposes 73 GitHub API tools for managing repositories, pull requests, issues, actions, releases, search, and more, enabling natural language control of GitHub.73MIT
- AlicenseAqualityCmaintenanceA lightweight MCP server that enables fetching public GitHub user profiles, repository stats, recent events, and pull request insights through simple tool calls.21111MIT
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
A MCP server built for developers enabling Git based project management with project and personal…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dhirendra1729/git_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server