Cover image
servidor de github-mcp
Public

servidor de github-mcp

Try Now
2025-03-20

Servidor Github MCP para cursor IDE

3 years

Works with Finder

1

Github Watches

0

Github Forks

1

Github Stars

GitHub MCP Server for Cursor IDE

A powerful GitHub integration server that allows you to manage your GitHub repositories directly from Cursor IDE. This server provides a RESTful API to interact with GitHub's API, making it easier to create and manage repositories.

Features

  • Create new GitHub repositories
  • List existing repositories
  • Secure token-based authentication
  • Rate limiting protection
  • Comprehensive error handling
  • Detailed logging
  • Webhook support (coming soon)

Prerequisites

  • Node.js (v14 or higher)
  • npm (v6 or higher)
  • A GitHub account with a Personal Access Token
  • Cursor IDE

Setup

  1. Clone this repository:
git clone <your-repo-url>
cd github-mcp-server
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory:
cp .env.example .env
  1. Configure your environment variables in .env:
# Server Configuration
PORT=3000
NODE_ENV=development

# GitHub Configuration
GITHUB_TOKEN=your_github_token_here
GITHUB_WEBHOOK_SECRET=your_webhook_secret_here

# Rate Limiting
RATE_LIMIT_WINDOW_MS=900000  # 15 minutes
RATE_LIMIT_MAX_REQUESTS=100
  1. Generate a GitHub Personal Access Token:

    • Go to GitHub.com → Settings → Developer Settings → Personal Access Tokens → Tokens (classic)
    • Click "Generate new token" → "Generate new token (classic)"
    • Give your token a descriptive name (e.g., "MCP Server Integration")
    • Select these permissions:
      • repo (Full control of private repositories)
      • read:org (Read organization data)
      • admin:repo_hook (Full control of repository hooks)
    • Copy the generated token and paste it in your .env file
  2. Start the server:

npm run dev

Using with Cursor IDE

  1. Open Cursor IDE
  2. The MCP server will run on http://localhost:3000 by default
  3. You can use the following endpoints:

Create a New Repository

curl -X POST http://localhost:3000/api/github/repos \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-new-repo",
    "description": "A new repository created via MCP",
    "private": false,
    "auto_init": true
  }'

List Your Repositories

curl http://localhost:3000/api/github/repos

API Endpoints

GET /health

Health check endpoint to verify server status.

GET /api/github/repos

Lists all repositories accessible to the authenticated user.

POST /api/github/repos

Creates a new repository.

Request body:

{
  "name": "repository-name",
  "description": "Repository description",
  "private": false,
  "auto_init": true
}

Error Handling

The server includes comprehensive error handling for:

  • Invalid GitHub tokens
  • Rate limiting
  • Validation errors
  • GitHub API errors
  • Server errors

All errors are logged and returned with appropriate HTTP status codes.

Security Features

  • Token-based authentication
  • Rate limiting protection
  • Input validation
  • Secure environment variable handling
  • CORS protection
  • Helmet security headers

Development

To run the server in development mode with auto-reload:

npm run dev

To run tests:

npm test

Logging

Logs are stored in:

  • error.log: Error-level logs
  • combined.log: All logs

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • huahuayu
  • Una puerta de enlace de API unificada para integrar múltiples API de explorador de blockchain similar a Esterscan con soporte de protocolo de contexto modelo (MCP) para asistentes de IA.

  • deemkeen
  • Controle su MBOT2 con un combo de potencia: MQTT+MCP+LLM

  • jae-jae
  • Servidor MCP para obtener contenido de la página web con el navegador sin cabeza de dramaturgo.

  • HiveNexus
  • Un bot de chat de IA para equipos pequeños y medianos, que apoyan modelos como Deepseek, Open AI, Claude y Gemini. 专为中小团队设计的 ai 聊天应用 , 支持 Deepseek 、 Open ai 、 Claude 、 Géminis 等模型。

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Protocolo del conector de mensajes )服务 , 提供了与钉钉企业应用交互的 API 接口。项目基于 Go 语言开发 支持员工信息查询和消息发送等功能。 支持员工信息查询和消息发送等功能。

    Reviews

    5 (1)
    Avatar
    user_tkMuFPWS
    2025-04-15

    I've been using the Pdf application by jhchen2222-ui for a while now, and it's amazing! The seamless experience and intuitive interface make managing PDFs effortless. The direct link to the product is incredibly convenient: https://mcp.so/server/pdf/jhchen2222-ui. Whether you're merging, splitting, or converting, Pdf handles it all with ease. Highly recommend it!