GitHub Repository README, File Tree & Latest Release Context
One-call GitHub repository context for AI coding agents: clean README Markdown, top-level & recursive file tree, stars, forks, license, topics, and latest release.
curl -sG "https://api.agentapigate.ai/v1/github/repo/context" \ --data-urlencode "repo=modelcontextprotocol/typescript-sdk" \ --data-urlencode "max_tree_files=60" \ --data-urlencode "format=md" \ -H "Authorization: Bearer aag_live_YOUR_KEY" \ -H "X-AAG-Max-Cost: 0.0100"
# GitHub Repository README, File Tree & Latest Release Context (`github.repo.context`) **full_name**: modelcontextprotocol/typescript-sdk · **description**: The official TypeScript SDK for Model Context Protocol servers and clients · **stars**: 13831 · **language**: TypeScript · **license**: NOASSERTION · **readme_markdown**: # MCP TypeScript SDK <!-- prettier-ignore --> > [!IMPORTANT] > **This is the `main` branch: v2 of the SDK** (`@modelcontextprotocol/server`, `@modelcontextprotocol/client`), the stable release line, implementing the [2026-07-28 MCP spec](https://modelcontextprotocol.io/specification/2026-07-28). Start with the [v2 documentation](https://ts.sdk.modelcontextprotocol.io/v2/); coming from v1, see the [migration guide](https://ts.sdk.modelcontextprotocol.io/v2/migration/upgrade-to-v2). > > **v1.x** (`@modelcontextprotocol/sdk`) lives on the [`v1.x` branch](https://github.com/modelcontextprotocol/t… ## latest_release - **tag_name**: v2.4.0 - **name**: 2.4.0 - **published_at**: 2026-10-23T18:32:25Z - **url**: https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/v2.4.0 ## file_tree_sample - [1] .changeset/README.md - [2] .changeset/bundled-fast-uri-3-1-9.md - [3] .changeset/config.json - [4] .changeset/injectable-sdk-logger.md - [5] .changeset/mcp-param-header-non-primitive-body.md - [6] .changeset/protocol-instrumentation.md - [7] .changeset/register-tool-output-typing.md - [8] .changeset/server-extensions.md - [9] .changeset/skip-offline-access-consent-prompt.md - [10] .changeset/tool-structured-content-text.md - [11] .git-blame-ignore-revs - [12] .github/CODEOWNERS - [13] .github/ISSUE_TEMPLATE/v2-feedback.yml - [14] .github/dependabot.yml - [15] .github/workflows/claude.yml
Endpoint Parameters, Cost & Token Economy Reference
Endpoint ID:github.repo.context · Method: GET| Parameter | Type | Req | Sample / Default | Description |
|---|---|---|---|---|
| repo | string | required | modelcontextprotocol/typescript-sdk | GitHub "owner/repo" slug or full github.com URL (e.g. "modelcontextprotocol/typescript-sdk") |
| max_tree_files | number | optional | 60 | Max repository file paths included in file_tree_sample (10-200) |
| readme_max_chars | number | optional | 12000 | Max README Markdown characters returned (1000-20000) |
| format | enum | optional | json | compact | md | Response format; compact or md cuts LLM tokens. |
| dry_run | 0 | 1 | optional | 1 | Returns exact pre-flight price quote & validation at $0.00 cost. |
| Access Rail / Metric | Value | Policy & SLA |
|---|---|---|
| API Key (PAYG) | $0.0010 / call | $0/mo · Balance never expires |
| Remote MCP Tool | github_repo_context | OAuth 2.1 Hub & /mcp/intel |
| x402 Base USDC | $0.0020 / call | Zero-signup USDC enabled |
| P50 Latency | 321 ms | $0 billed on empty or 4xx/5xx |
| Token Economy | 5986t → 459t (-92%) | Partner credit: eligible |
More github.repo Sibling Endpoints
Measure real GitHub repository star velocity (stars_24h, stars_7d, stars_30d, lifetime_avg_stars_per_day), star_acceleration_score (0-100), latest releases.atom tag, and 30-day Hacker News discussions.
Fetch latest tagged releases, publish timestamps, authors, and release notes for any public GitHub repository.
Fetch clean Markdown README content directly from public GitHub repositories via raw CDN without requiring any API token.
Query public GitHub repository pull requests, commit logs, and file commit history with keyless REST and Atom fallback.
Frequently Asked Questions
How do I call GitHub Repository README, File Tree & Latest Release Context (github.repo.context) over REST and Remote MCP?
Send GET requests to https://api.agentapigate.ai/v1/github/repo/context with an aag_live_* / aag_agent_* Bearer key, pay per call via x402 USDC, or call MCP tool github_repo_context on https://mcp.agentapigate.ai/mcp.
What does github.repo.context cost per call and are failed calls billed?
Each successful HTTP 200 response costs $0.001 USD from a non-expiring PAYG balance ($0/month minimum). Upstream errors, empty responses, and ?dry_run=1 pre-flight quotes always bill $0.00.
How does ?format=md or ?format=compact optimize AI agent token usage on github.repo.context?
Passing ?format=md transforms the response into normalized Markdown (~459 tokens vs ~5986 raw tokens, saving 92% of LLM context budget) while preserving structured JSON via ?format=json.
Can I restrict an AI agent key to only intel endpoints with a daily USD cap?
Yes. Create a scoped aag_agent_* sub-key via POST /v1/keys with allowed_packs: ["intel"], optional allowed_endpoints: ["github.repo.context"], read_only: true, and a hard daily_cap_usd enforced atomically in Redis.