GitX MCPTry GitX MCP
Documentation

GitX MCP Docs

Everything you need to connect GitX MCP to your AI coding environment and start querying GitHub momentum.

What is GitX MCP?

GitX MCP is a GitHub intelligence layer built for AI coding tools. It exposes a standardized MCP (Model Context Protocol) endpoint and a REST API that let AI agents query repository health, momentum, and risk signals in real time.

Instead of asking an AI to guess whether a repository is maintained, GitX MCP fetches live data from the GitHub API — commit velocity, pull request throughput, issue engagement, contributor breadth — and synthesizes it into a single 0–100 momentum score with a plain-English verdict.

Use with Cursor

Open your Cursor settings and add GitX MCP to the mcpServers block. If you have deployed GitX MCP to Vercel, use the URL transport. For local development, use the stdio transport with the bundled server script.

~/.cursor/mcp.json
{
  "mcpServers": {
    "gitxmcp": {
      "url": "https://your-deployment.vercel.app/api/mcp",
      "env": {
        "GITHUB_TOKEN": "your_github_token"
      }
    }
  }
}

Once connected, you can ask Cursor: "Analyze the repo solana-labs/solana" or "Which MCP repos are gaining momentum this week?" and it will invoke the GitX MCP tools automatically.

Use with Claude Desktop

Add GitX MCP to Claude Desktop's MCP configuration file at ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent path on Windows.

claude_desktop_config.json
{
  "mcpServers": {
    "gitxmcp": {
      "command": "npx",
      "args": ["tsx", "/path/to/gitxmcp/scripts/gitxmcp-server.ts"],
      "env": {
        "GITHUB_TOKEN": "your_github_token"
      }
    }
  }
}

The gitxmcp-server.ts script is included in the scripts/ directory. It implements the same MCP tool logic as the HTTP endpoint, using stdio transport for local use.

Note: Local MCP package publishing via npx gitxmcp is planned. For now, point directly to the script path or use the HTTP endpoint after deploying to Vercel.

Use with Claude Code

Claude Code supports HTTP MCP endpoints directly. Run the following command to register GitX MCP as a project-scoped server:

terminal
# In your project directory
claude mcp add gitxmcp \
  --url https://your-deployment.vercel.app/api/mcp \
  --env GITHUB_TOKEN=your_github_token

After adding the server, Claude Code will have access to all four GitX MCP tools. You can verify with /mcp in any Claude Code session.

Available MCP tools

GitX MCP exposes four tools over the MCP protocol. All tools reuse the same core analysis logic from lib/analysis.ts.

analyze_repo

Analyze a single GitHub repository. Returns momentum score (0–100), status verdict, risk level, signal breakdown, and warnings.

Params: owner: string, repo: string

find_trending_repos

Search for trending repositories by topic and rank them by momentum. Topics: solana, mcp, ai-agents, devtools, crypto-infra, rust, typescript.

Params: topic: string, timeframe?: '7d' | '30d', limit?: number

compare_repos

Compare 2–10 repositories and rank them by momentum score. Accepts owner/repo slugs or full GitHub URLs.

Params: repos: string[]

repo_health_check

Run a health check on a repository using its GitHub URL. Useful when the agent has a URL but not owner/repo separately.

Params: repo_url: string

Full schema

mcp-tools.ts
// Tool: analyze_repo
{
  "name": "analyze_repo",
  "description": "Analyze a GitHub repository momentum, status, and risk level.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "owner": { "type": "string" },
      "repo": { "type": "string" }
    },
    "required": ["owner", "repo"]
  }
}

// Tool: find_trending_repos
{
  "name": "find_trending_repos",
  "description": "Find trending GitHub repositories for a topic.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "topic": { "type": "string" },
      "timeframe": { "type": "string", "enum": ["7d", "30d"] },
      "limit": { "type": "number" }
    },
    "required": ["topic"]
  }
}

// Tool: compare_repos
{
  "name": "compare_repos",
  "description": "Compare and rank repositories by developer momentum.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "repos": { "type": "array", "items": { "type": "string" } }
    },
    "required": ["repos"]
  }
}

// Tool: repo_health_check
{
  "name": "repo_health_check",
  "description": "Run a health check on a repository via its GitHub URL.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "repo_url": { "type": "string" }
    },
    "required": ["repo_url"]
  }
}

Example prompts

These prompts work with any AI tool connected to GitX MCP.

  • Which Solana repos are gaining developer momentum this week?
  • Analyze solana-labs/solana and tell me if it's still actively developed.
  • Compare these three repos by developer activity: solana-labs/solana, near/nearcore, aptos-labs/aptos-core
  • Find early alpha AI agent repos that are gaining traction.
  • Is modelcontextprotocol/servers a safe dependency to take on?
  • Show me the top 5 trending TypeScript repos right now.
  • Which devtools repos have had the most commit activity in the last 30 days?
  • Run a health check on https://github.com/vercel/next.js

REST API routes

GitX MCP exposes a REST API via Next.js Route Handlers. All routes are available at your deployment URL.

POST /api/analyze

Analyze a single repository. Accepts either owner + repo or a repo_url.

shell
curl -X POST https://your-deployment.vercel.app/api/analyze \
  -H "Content-Type: application/json" \
  -d '{
    "owner": "solana-labs",
    "repo": "solana"
  }'
shell (URL variant)
curl -X POST https://your-deployment.vercel.app/api/analyze \
  -H "Content-Type: application/json" \
  -d '{
    "repo_url": "https://github.com/modelcontextprotocol/servers"
  }'

GET /api/trending

Fetch trending repos by topic. Supported topics: solana, mcp, ai-agents, devtools, crypto-infra, rust, typescript.

shell
curl "https://your-deployment.vercel.app/api/trending?topic=mcp&limit=5"

POST /api/compare

Compare 2–10 repositories and receive them ranked by momentum.

shell
curl -X POST https://your-deployment.vercel.app/api/compare \
  -H "Content-Type: application/json" \
  -d '{
    "repos": [
      "solana-labs/solana",
      "near/nearcore",
      "aptos-labs/aptos-core"
    ]
  }'

Response shape

RepoAnalysis
{
  "repo": "solana-labs/solana",
  "url": "https://github.com/solana-labs/solana",
  "description": "Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.",
  "status": "active",
  "momentum_score": 78,
  "risk_level": "low",
  "summary": "solana-labs/solana (Rust) is an actively developed project...",
  "signals": {
    "stars": 13200,
    "forks": 4100,
    "open_issues": 580,
    "language": "Rust",
    "license": "Apache-2.0",
    "archived": false,
    "recent_commits_7d": 24,
    "recent_commits_30d": 98,
    "recent_prs_30d": 67,
    "recent_issues_30d": 43,
    "contributors_estimate": 100,
    "created_at": "2018-11-11T00:00:00Z",
    "updated_at": "2024-01-15T12:00:00Z",
    "pushed_at": "2024-01-15T10:30:00Z"
  },
  "verdict": "Healthy, actively maintained repository.",
  "warnings": [],
  "analyzed_at": "2024-01-15T12:05:00Z"
}

Environment variables

GitX MCP requires one optional environment variable and works with zero configuration, but rate limits will be much more restricted without a token.

.env.local
# .env.local
GITHUB_TOKEN=ghp_your_personal_access_token
NEXT_PUBLIC_APP_URL=http://localhost:3000
GITHUB_TOKEN

A GitHub Personal Access Token. Without it, the GitHub public API allows 60 requests/hour. With a token, this increases to 5,000 requests/hour. Create one in your GitHub account under Settings → Developer settings → Personal access tokens. Only public_repo read access is required.

NEXT_PUBLIC_APP_URL

The public URL of your deployment. Used for MCP endpoint references in documentation and generated configs. Defaults to http://localhost:3000.