Integrations

Overview

Connecting Spectron to your stack – SDKs, MCP server, REST API, and framework integrations.

Spectron integrates with agents through HTTP, MCP, official 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. Python, TypeScript, and Swift clients track that spec so request and response shapes stay aligned with the server.

Native MCP at /mcp on the api port — same Authorization: Bearer auth as REST. Prefer this when the client already speaks MCP (Claude Desktop, Cursor, Windsurf, VS Code, Claude Code).

spectron mcp

MCP server install

Spectron ships inside the surrealdb package on PyPI — the same install as the SurrealDB Python driver. Do not install the unrelated spectron package.

pip install surrealdb
from surrealdb import Spectron

Python SDK guide

Separate npm package under the SurrealDB scope:

npm install @surrealdb/spectron

JavaScript SDK guide

The Spectron product ships alongside the SurrealDB Swift driver in surrealdb.swift. Add the Spectron library product to your target, then import it:

import Spectron

let memory = try Spectron(
context: "acme-prod",
endpoint: "https://api.spectron.example",
apiKey: "sk-spec-..."
)

Swift SDK guide

The Spectron client for Kotlin is bundled in the SurrealDB Kotlin SDK (com.surrealdb:kotlin) under the com.surrealdb.kotlin.spectron package — no separate dependency. It is Kotlin Multiplatform (JVM, Android, iOS) with a suspend-based API.

implementation("com.surrealdb:kotlin:0.1.0-SNAPSHOT")

Kotlin SDK guide

Direct HTTP from any language. End-user routes: /api/v1/{context_id}/…. Management: /api/v1/contexts/….

REST integration guide · Full reference

Thin packages that mirror agent runtime traffic into POST /api/v1/{ctx}/facts/batch without changing your prompts:

PlatformPackage
LangChain (Python)spectron-langchain
OpenAI Agents (Python)spectron-openai
Vercel AI SDK (TS)@surrealdb/spectron-vercel-ai
n8nn8n-nodes-spectron
Claude Codenpx install-spectron-hook

LangChain · Vercel AI SDK

  • Semantic Kernel and CrewAI adapters — no packages in the repo; pages are placeholders.

  • Embedded in-process library — use REST or SDK against a deployed instance (Embedded quickstart).

Was this page helpful?