AgentAPIGate
Back to Catalog
GET /v1/github/repo/contextPack: intel·MCP Tool: github_repo_context

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.

API Key Price:$0.0010 / call
x402 Base USDC:$0.0020 / call
Partner Credit:eligible
1. Parameters & Controls
GitHub "owner/repo" slug or full github.com URL (e.g. "modelcontextprotocol/typescript-sdk")
Max repository file paths included in file_tree_sample (10-200)
Max README Markdown characters returned (1000-20000)
Get $0.25 Free Key →
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"
1-Click Agent IDE Install
Add to Cursor (1-Click OAuth)
-92% tokens
# 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
ParameterTypeReqSample / DefaultDescription
repostringrequiredmodelcontextprotocol/typescript-sdkGitHub "owner/repo" slug or full github.com URL (e.g. "modelcontextprotocol/typescript-sdk")
max_tree_filesnumberoptional60Max repository file paths included in file_tree_sample (10-200)
readme_max_charsnumberoptional12000Max README Markdown characters returned (1000-20000)
formatenumoptionaljson | compact | mdResponse format; compact or md cuts LLM tokens.
dry_run0 | 1optional1Returns exact pre-flight price quote & validation at $0.00 cost.
Access Rail / MetricValuePolicy & SLA
API Key (PAYG)$0.0010 / call$0/mo · Balance never expires
Remote MCP Toolgithub_repo_contextOAuth 2.1 Hub & /mcp/intel
x402 Base USDC$0.0020 / callZero-signup USDC enabled
P50 Latency321 ms$0 billed on empty or 4xx/5xx
Token Economy5986t → 459t (-92%)Partner credit: eligible

More github.repo Sibling Endpoints

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.