swiftlys2/docs/api/ai/
AI Tools

Give your AI live access to SwiftlyS2 data

SwiftlyS2 exposes its schema, entity, protobuf, game event, convar, and API docs data to AI agents - so your coding assistant can look up the exact field, flag, or method it needs instead of guessing.

Connect an MCP client

SwiftlyS2 runs a Model Context Protocol server over Streamable HTTP. Add it to Claude Code, Claude Desktop, Cursor, or any other MCP-compatible client.

Endpoint
https://swiftlys2.net/api/mcp
mcpServers config
{
    "mcpServers": {
        "swiftlys2": {
            "url": "https://swiftlys2.net/api/mcp"
        }
    }
}

Available tools

Every domain gets the same three shapes: *_lookup for an exact name, *_list to browse without knowing a name yet, and *_search - the same engine behind that domain's search bar, filters and all.

site_searchsearches everything

One call across schema, entities, protobuf, game events, convars, and docs at once - exactly like the site: prefix in the site's own search bar. Start here when you don't know which domain to reach for.

Schema
schema_lookup

Exact class/enum by name -> fields + link.

schema_list

Browse projects, or list a project's classes/enums.

schema_search

Search fields by name, type, offset, networked.

Entities
entity_lookup

Exact entity class by name -> datamap + link.

entity_list

List entity class names, optionally by prefix.

entity_search

Search classes and input/output/member fields.

Protobuf
protobuf_lookup

Exact message/enum by name -> fields + link.

protobuf_list

Browse modules/files, or list one's contents.

protobuf_search

Search by name, net message id, kind, file.

Game events
gameevent_lookup

Exact event by name -> fields + link.

gameevent_list

Browse gameevents files, or list one's events.

gameevent_search

Search by name, field name, or hex hash.

ConVars
convar_lookup

Exact convar/concommand by name -> flags + link.

convar_list

Browse modules, or list one's entries.

convar_search

Full tag search: kind + include/exclude module, flag, attribute.

API docs
apidocs_lookup

Exact type (or member) by name -> declaration + link.

apidocs_list

Browse categories, or list one's types.

apidocs_search

Search type/member names and summaries.

Docs
docs_list

List every docs page with its title and URL.

docs_search

Search page bodies and headings for a snippet.

Lookups auto-resolve what they can (schema project, protobuf file, convar module) from just a name. List/search results are capped and report a total + truncated flag rather than ever dumping an entire dump into context.

llms.txt

A plain-text index of the docs and API surface, following the llms.txt convention - for agents that ingest context directly instead of calling tools.

/llms.txt

Short index: links to every doc page, the API reference, the data viewers, and this MCP server.

/llms-full.txt

The full index plus the raw markdown of every doc page inlined, for one-shot ingestion.

Structured references in docs

Docs pages can link straight into the viewers with a name - no need to know the project, module, or file it lives in. These render as verified links (or a visible warning if the name doesn't exist), which also makes the docs themselves easier for an LLM to ground against real data.

<SchemaRef name="CBaseEntity" />
<EntityRef name="CCSPlayerPawn" />
<ProtobufRef name="CMsgSayText2" />
<GameEventRef name="player_death" />
<ConvarRef name="sv_cheats" />
<ApiRef name="IPlayerManagerService" member="SendCenterHTML" />