Cover image
Try Now
2025-04-14

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars

GitHub MCP Client

A TypeScript client for interacting with GitHub using the Model Context Protocol (MCP) and the Vercel AI SDK with Gemini.

Features

  • MCP Integration: Connects to the GitHub MCP server to perform GitHub operations
  • AI-Powered: Uses the Gemini model to process natural language queries
  • CLI Interface: Provides a command-line interface for interacting with the agent
  • Interactive Mode: Supports an interactive chat-like interface

Prerequisites

  • Node.js 18 or later
  • GitHub Personal Access Token
  • Google Gemini API Key

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/github-mcp-client.git
cd github-mcp-client
  1. Install dependencies:
npm install
  1. Create a .env file with your API keys:
GITHUB_TOKEN=your_github_personal_access_token
GEMINI_API_KEY=your_gemini_api_key
  1. Build the project:
npm run build

Usage

CLI Commands

Query Mode

Process a single query:

npm start -- query "Search for repositories related to TypeScript MCP"

Interactive Mode

Start an interactive session:

npm start -- interactive

Or use the shorthand:

npm start -- i

API Usage

You can also use the GitHub MCP client programmatically:

import { GitHubAgent } from 'github-mcp-client';

async function main() {
  // Create a GitHub agent
  const agent = new GitHubAgent(
    'your_github_token',
    'your_gemini_api_key'
  );

  try {
    // Process a query
    const response = await agent.processQuery(
      'Search for repositories related to TypeScript MCP'
    );
    console.log(response);
  } finally {
    // Close the agent
    await agent.close();
  }
}

main().catch(console.error);

Available GitHub Operations

The GitHub MCP client supports the following operations:

  • Create a repository
  • Search for repositories
  • Get file contents
  • Create or update files
  • Push multiple files
  • Create issues
  • Create pull requests
  • Create branches
  • Search code, issues, and users

Development

Project Structure

github-mcp-client/
├── src/
│   ├── client/         # MCP client implementation
│   ├── agent/          # AI agent implementation
│   ├── cli/            # CLI interface
│   ├── config/         # Configuration management
│   └── index.ts        # Main entry point
├── dist/               # Compiled JavaScript
├── .env                # Environment variables
├── tsconfig.json       # TypeScript configuration
└── package.json        # Project metadata

Scripts

  • npm run build: Build the project
  • npm start: Run the CLI
  • npm run dev: Run the CLI in development mode

License

MIT

相关推荐

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • Byaidu
  • PDF科学纸翻译带有保留格式的pdf -基于ai完整保留排版的pdf文档全文双语翻译

  • sigoden
  • 使用普通的bash/javascript/python函数轻松创建LLM工具和代理。

  • RockChinQ
  • 😎简单易用、🧩丰富生态 -大模型原生即时通信机器人平台| 适配QQ / 微信(企业微信、个人微信) /飞书 /钉钉 / discord / telegram / slack等平台| 支持chatgpt,deepseek,dify,claude,基于LLM的即时消息机器人平台,支持Discord,Telegram,微信,Lark,Dingtalk,QQ,Slack

  • hkr04
  • 轻巧的C ++ MCP(模型上下文协议)SDK

  • dmayboroda
  • 带有可配置容器的本地对话抹布

  • modelscope
  • 开始以更轻松的方式开始构建具有LLM授权的多代理应用程序。

    Reviews

    2 (5)
    Avatar
    user_nuhvH0oH
    2025-04-24

    As a dedicated mcp application enthusiast, I find the GitHub-MCP-Agent developed by objones25 to be immensely useful. This agent seamlessly integrates with GitHub, providing robust automation and efficient management of my projects. It’s user-friendly and significantly streamlines my workflow. Highly recommended!

    Avatar
    user_76NIB51G
    2025-04-24

    I've been using github-mcp-agent by objones25, and it's truly a game-changer for developers. It has streamlined my workflow and provided intuitive management of my projects. The integration and support are top-notch, making it an essential tool for anyone serious about efficient coding and project management. Highly recommend!

    Avatar
    user_V2H02aie
    2025-04-24

    I've been using the github-mcp-agent for a while now, and it has vastly improved my workflow. Created by objones25, this tool integrates seamlessly with my existing setup. The efficiency and reliability of the agent are top-notch, making my coding tasks much more manageable. I highly recommend it to any developer looking for a robust and user-friendly solution!

    Avatar
    user_71cSHuFN
    2025-04-23

    As a dedicated user of mcp applications, I highly recommend the github-mcp-agent created by objones25. This tool is incredibly efficient and user-friendly, enhancing productivity for managing repositories. It seamlessly integrates with GitHub, providing a smooth workflow and powerful features that streamline development tasks. Whether you are a beginner or an experienced developer, this agent will significantly boost your efficiency.

    Avatar
    user_GoWT8CU9
    2025-04-23

    As a dedicated user of the github-mcp-agent by objones25, I must say it has significantly streamlined my workflow. Efficient and reliable, this agent seamlessly integrates with my projects, providing robust functionalities that enhance my development experience. Highly recommended for anyone looking to boost their productivity with a dependable tool.