# SmartGate

SmartGate is an MCP server for Claude Code that searches and fetches pages, compresses context, and caps token spend before it reaches the model.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 3 repo stars
- Author: smartgate-network
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/smartgate-network/smartgate-workflows
- Updated: 2026-10-28
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/smartgate

## What it does

SmartGate sits between an agent and the outside web: it searches for pages, pulls them in as Markdown, strips overlapping results, and shrinks the text before it lands in a model's context. It also tracks token usage against a budget and keeps a cross-session memory of facts a team wants recalled later.

The server exposes seven `smart_*` tools — `smart_search`, `smart_fetch`, `smart_dedup`, `smart_context_gate`, `smart_budget_guard`, `smart_memory`, `smart_pipe` — and each one hands back a JSON string that the agent has to parse. `smart_pipe` chains several of these steps under templates named `research`, `read` and `remember`, and isn't meant for running just one step. Bundled skills cover routing (`smartgate-workflows`), multi-source research, reading a single known page, team memory, and usage reporting.

Connecting requires an `SMARTGATE_API_KEY` from the dashboard; without it the MCP handshake never completes. All platforms point at the same address, `https://smartgate.network/api/mcp`.

## Requirements
- Remote server: `https://smartgate.network/api/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http smartgate https://smartgate.network/api/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add smartgate --url https://smartgate.network/api/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "smartgate": {
            "url": "https://smartgate.network/api/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "smartgate": {
            "type": "http",
            "url": "https://smartgate.network/api/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http smartgate https://smartgate.network/api/mcp
```

## When to use it
- locate sources online and pull them in as Markdown
- drop near-duplicate hits from overlapping search results
- shrink a long document before it enters a model's context
- track and cap how many tokens tool calls are burning
- store team facts and pull them back up in later sessions

## Example prompts
- Check my SmartGate token allowance with smart_budget_guard action=check
- Run smart_fetch on https://smartgate.network/docs/tools and walk me through what it says about budget limits, page fetching, and compliance logging
- Remember that our staging API rate limit is 100 requests per minute

## Similar
- [context-engine](https://affpapa.org/en/nevibecode/skills/borghei-context-engine.md) — skill · 112 installs
- [codearia-sieve](https://affpapa.org/en/nevibecode/mcp/codearia-sieve.md) — MCP server · ★ 5 repo stars
- [Context Engine](https://affpapa.org/en/nevibecode/mcp/context-engine.md) — MCP server · ★ 324 repo stars
- [Sophon](https://affpapa.org/en/nevibecode/mcp/sophon.md) — MCP server · ★ 9 repo stars
- [densely](https://affpapa.org/en/nevibecode/mcp/densely.md) — MCP server · ★ 8 repo stars
- [token-budget-advisor](https://affpapa.org/en/nevibecode/skills/token-budget-advisor.md) — skill · 6500 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
