# SteamGPT for AI Agents

> Structured Steam identity and gaming context API. No key, no signup, no cookies, no tracking. Every endpoint returns `.md`, `.json` or `.ai` (flat text, cheapest).

9 API endpoints | 9 MCP tools | 8 recommended agent workflows below.

## 8 common agent calls

1. Profile: `GET https://steamgpt.net/profile/{id}.md` - Steam summary only, cheapest (~200 tokens, .ai ~80)
2. Competitive context: `GET https://steamgpt.net/summary/{id}.md?preset=competitive` - FACEIT + bans, no friends (~350 tokens)
3. Bans: `GET https://steamgpt.net/bans/{id}.md` - VAC / game / community / economy (~100 tokens)
4. Friends: `GET https://steamgpt.net/friends/{id}.md?detail=short` - short = bare id array (~5 tokens/friend), medium = id + nickname, full = id + raw Steam object
5. Compare: `GET https://steamgpt.net/compare/{id1}/{id2}.md` - two players + shared friends
6. Batch: `GET https://steamgpt.net/batch/{id1,...,id100}.md` - up to 100 profiles in ONE request. Always batch instead of per-player calls
7. Everything: `GET https://steamgpt.net/summary/{id}.md` - all blocks; trim with `?include=` or `?preset=` (~0.5-1.5k tokens)
8. Convert: `GET https://steamgpt.net/converter/{id}.md` - SteamID converter: all formats of one account, instant (vanity names need /identity)

`{id}` accepts any SteamID form, a steamcommunity.com link or a vanity name.

## Trust the data

- JSON carries `provenance` per source: `retrieved_at`, `age_seconds`, `fresh` (age within TTL), `cache_ttl`
- `/summary` carries `sources` (`ok` | `empty` | `unavailable` | `excluded`) and `partial` - branch on them, not on nulls: `empty` = no account, `unavailable` = upstream down, `excluded` = you did not ask

## MCP (9 read-only tools)

Listed in the official MCP Registry as `net.steamgpt/steamgpt` (https://registry.modelcontextprotocol.io/v0.1/servers/net.steamgpt%2Fsteamgpt/versions/latest) and verified on Glama (connector: https://glama.ai/mcp/connectors/net.steamgpt/steamgpt, server: https://glama.ai/mcp/servers/SteamGPTnet/steamgpt-mcp). Context7 users: pull the docs as `/steamgptnet/steamgpt-js` (SDK) or `/steamgptnet/steamgpt-mcp`.

- Stdio-only clients: `{"mcpServers": {"steamgpt": {"command": "npx", "args": ["-y", "steamgpt-mcp"]}}}` (npm proxy to this server)
- Claude Code, current project: `claude mcp add --transport http steamgpt https://steamgpt.net/mcp`
- Claude Code, GLOBALLY for all projects: `claude mcp add --scope user --transport http steamgpt https://steamgpt.net/mcp`
- Cursor, one project: add to `.cursor/mcp.json`; globally for all projects: `~/.cursor/mcp.json`:
```json
{"mcpServers": {"steamgpt": {"url": "https://steamgpt.net/mcp"}}}
```
- VS Code (Copilot), globally: add to your user `mcp.json` (Command Palette -> "MCP: Open User Configuration"):
```json
{"servers": {"steamgpt": {"type": "http", "url": "https://steamgpt.net/mcp"}}}
```
- ChatGPT / OpenAI: create a Custom GPT Action and import `https://steamgpt.net/openapi.json` (no auth)

## Plain HTTP from code

Python:
```python
import requests
r = requests.get("https://steamgpt.net/summary/76561197960287930.json", params={"preset": "competitive"})
data = r.json()["data"]  # data["steam_bans"], data["faceit"], data["provenance"]
```

Node.js:
```js
const r = await fetch("https://steamgpt.net/summary/76561197960287930.json?preset=competitive")
const { data } = await r.json()
```

LangChain (as a tool):
```python
from langchain_core.tools import tool
import requests

@tool
def steam_player(query: str) -> str:
    """Steam profile, bans and FACEIT for any SteamID, link or vanity name."""
    return requests.get(f"https://steamgpt.net/summary/{query}.ai").text
```

## Token economy

- `.ai` is the cheapest format, `.md` the most readable, `.json` the most structured
- `?preset=identity|competitive` or `?include=` trims `/summary`
- `/friends`: `detail=short` returns bare steamid64 list
- Many players -> one `/batch` call (up to 100), never a loop of `/profile`
- Soft limit 120 req/min per IP; responses are cached, repeats are cheap

More: [full guide](https://steamgpt.net/docs.md) | [llms.txt](https://steamgpt.net/llms.txt) | [OpenAPI](https://steamgpt.net/openapi.json) | [types](https://steamgpt.net/types.d.ts)
