Spectron integrates with agents through HTTP, MCP, OpenAPI-backed SDKs, and harness adapters that batch conversation turns into /facts/batch, using the same provenance and trust model as the server.
The REST surface is described by an OpenAPI specification. Official Python and TypeScript clients are generated from that spec so request and response types stay aligned with the server — you do not need to hand-maintain DTOs when Spectron adds fields or enums.
MCP server (coding assistants)
Native MCP at /mcp on the api port — same API-KEY as REST. Prefer this when the client already speaks MCP (Claude Desktop, Cursor, Windsurf, VS Code, Claude Code).
Python SDK
Generated client plus ergonomic façade:
JavaScript and TypeScript SDK
REST API
Direct HTTP from any language. End-user routes: /api/v1/{context_id}/.... Management: /api/v1/contexts/....
→ REST integration guide · Full reference
Harness adapters (automatic turn capture)
Thin packages that mirror agent runtime traffic into POST /api/v1/{ctx}/facts/batch without changing your prompts:
| Platform | Package |
|---|---|
| LangChain (Python) | spectron-langchain |
| OpenAI Agents (Python) | spectron-openai |
| Vercel AI SDK (TS) | @surrealdb/spectron-vercel-ai |
| n8n | n8n-nodes-spectron |
| Claude Code | npx install-spectron-hook |
Not shipped yet
Semantic Kernel and CrewAI adapters — no packages in the repo; pages are placeholders.
Kotlin / Swift SDKs — cut from plan-5; Python and TypeScript only.
Embedded in-process library — use REST or SDK against a deployed instance (Embedded quickstart).