# MCP Builder Pagination

> Sub-skill of mcp-builder: Pagination (+2).

- Skill: `vamseeachanta/mcp-builder-pagination` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/mcp-builder-pagination`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/mcp-builder-pagination/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/mcp-builder-pagination

---


# Pagination (+2)

## Pagination


```typescript
async function listAllItems(apiClient: Client): Promise<Item[]> {
  const items: Item[] = [];
  let cursor: string | undefined;

  do {
    const response = await apiClient.list({ cursor, limit: 100 });
    items.push(...response.items);
    cursor = response.nextCursor;
  } while (cursor);

  return items;
}
```

## Rate Limiting


```typescript
import Bottleneck from "bottleneck";

const limiter = new Bottleneck({
  maxConcurrent: 1,
  minTime: 100  // 10 requests per second
});

const rateLimitedFetch = limiter.wrap(fetch);
```

## Authentication


```typescript
const API_KEY = process.env.MY_API_KEY;

if (!API_KEY) {
  throw new Error(
    "MY_API_KEY environment variable is required. " +
    "Get your API key from https://example.com/settings"
  );
}
```

