Open protocols

Build on forgein.
No lock-in, ever.

forgein is built on open standards — MCP, REST, webhooks, and a public npm SDK. Any tool can read your context. Any developer can extend it. Your memory is yours.

Get started →API reference

How other tools connect

MCP serverJSON-RPC 2.0

Model Context Protocol server — any MCP-compatible tool connects natively.

Implements 6 methods: initialize, resources/list, resources/read, prompts/list, prompts/get, ping. Auto-discovered via /.well-known/mcp.

https://api.forgein.ai/api/adapters/mcp
REST APIOpenAPI 3.1

Full HTTP API — read memory, list projects, search across files, manage contexts.

Every endpoint is authenticated with a Bearer token (fg_…). The full OpenAPI 3.1 schema is available publicly — import it directly into Postman, Insomnia, or any Custom GPT.

https://api.forgein.ai/api/adapters/chatgpt/action-schema
Adapter SDKnpm

Build your own adapter for any AI tool, IDE, or internal system.

@forgein/adapter-sdk ships typed methods for fetching context, resolving project scope, and formatting output for any target. Publish to the forgein adapter registry or keep it private.

npm install @forgein/adapter-sdk
WebhooksHTTPS POST

Push events to any endpoint when memory files are created or updated.

HMAC-SHA256 signed payloads. Per-endpoint event filtering. Delivery log with status, duration, and response body for every fire — visible in the dashboard.

X-Forgein-Signature: sha256=<hmac>

Auto-discovery

MCP-compatible tools that support auto-discovery can find the forgein server without any manual config. The /.well-known/mcp endpoint publishes the server URL, auth instructions, and supported capabilities.

Claude Code reads this endpoint when you run /forgein auth — no manual server URL required.

{
  "mcp_servers": [{
    "url": "https://api.forgein.ai/api/adapters/mcp",
    "auth": {
      "type": "bearer",
      "instructions": "Create an API token at app.forgein.ai/tokens"
    }
  }]
}

Response from GET api.forgein.ai/.well-known/mcp

@forgein/adapter-sdk

Build your own adapter for any AI tool, IDE, or internal system. Typed methods, zero config. Publish to the forgein adapter registry or ship privately.

SDK methods
getContext(projectPath?)
Full merged context — personal + project notes.
Promise<string>
listProjects()
All memory projects for the authenticated user.
Promise<Project[]>
getFile(project, file)
Raw content of a single memory file.
Promise<MemoryFile>
putFile(project, file, content)
Create or update a memory file.
Promise<void>
search(q, projectPath?)
Full-text search across all memory files.
Promise<SearchResult[]>
import { ForgeinClient } from '@forgein/adapter-sdk';

const client = new ForgeinClient({ token: process.env.FORGEIN_TOKEN });

// Get full context for the current project
const ctx = await client.getContext(process.cwd());

// Inject as system prompt
const messages = [
  { role: 'system', content: ctx },
  { role: 'user',   content: userMessage },
];

Webhooks

Register an HTTPS endpoint and forgein will POST a signed JSON payload whenever memory files change. HMAC-SHA256 signatures on every delivery. Per-webhook event filtering. Delivery log with status and response visible in the dashboard.

memory.updated
A memory file was created or replaced.
memory.deleted
A memory file was removed.
context.switched
The active context changed.
Configure webhooks in dashboard →
Ready to connect your tool?
Get an API token in under a minute. The free tier is free forever.
Quickstart →API reference