Skip to content

API Reference

SynContext exposes 10 tools via the MCP (Model Context Protocol) over Streamable HTTP, plus a REST API for the web dashboard.

MCP Endpoint

URL: https://syncontext.dev/mcp

Authentication (any one of these):

Method Format Use case
Header X-API-Key: YOUR_KEY Claude Desktop, Claude Code
Bearer Authorization: Bearer SESSION_TOKEN Dashboard sessions
Query ?key=YOUR_KEY ChatGPT (no custom headers)

MCP Tools

Full-text search across all your context entries by keyword.

Parameter Type Required Description
query string yes Search query

Note: Semantic and hybrid search modes are available via the REST API (GET /api/context?q=...&mode=semantic), but the MCP tool uses keyword search only.

Example response:

{
  "results": [
    {
      "id": 1,
      "project_id": "my-app",
      "title": "Tech stack",
      "snippet": "React + Vite frontend, Python backend...",
      "source": "claude",
      "created_at": "2026-03-25T14:30:00Z"
    }
  ]
}

fetch

Get the full content of a context entry by ID.

Parameter Type Required Description
id string yes Entry ID (numeric)

Example response:

{
  "id": 1,
  "project_id": "my-app",
  "title": "Tech stack",
  "content": "Full content of the entry...",
  "category": "note",
  "source": "claude",
  "tags": "[\"frontend\", \"backend\"]",
  "created_at": "2026-03-25T14:30:00Z"
}

hub_list_projects

List all your projects with status and timestamps.

No parameters.

Example response:

{
  "projects": [
    {
      "id": "my-app",
      "name": "My App",
      "status": "active",
      "created_at": "2026-03-25T10:00:00Z",
      "updated_at": "2026-03-25T14:30:00Z"
    }
  ],
  "total": 1
}

hub_get_project

Get full details of a project including the 10 most recent context entries and 5 most recent decisions.

Parameter Type Required Description
project_id string yes Project ID

hub_store_context

Store a new context entry. Auto-creates the project if it doesn't exist.

Parameter Type Required Default Description
project_id string yes Project to store in
title string yes Entry title
content string yes Entry content (max 500KB)
category string no note note, doc, status, code, decision
source string no unknown Who created it (e.g., claude, chatgpt)
tags list no [] List of tag strings

Example response:

{
  "stored": true,
  "entry": {
    "id": 5,
    "project_id": "my-app",
    "title": "API design notes",
    "category": "doc",
    "source": "claude",
    "created_at": "2026-03-25T15:00:00Z"
  }
}

hub_update_context

Update an existing context entry. The previous version is saved in history and can be rolled back.

Parameter Type Required Description
entry_id int yes Entry ID to update
title string no New title
content string no New content (max 500KB)
source string no Who made the change

Example response:

{
  "updated": true,
  "entry": {
    "id": 5,
    "title": "API design notes v2",
    "updated_at": "2026-03-25T16:00:00Z"
  }
}

hub_update_status

Update the status of a project.

Parameter Type Required Description
project_id string yes Project ID
status string yes active, paused, blocked, completed, archived

hub_log_decision

Record a project decision with rationale and alternatives considered.

Parameter Type Required Default Description
project_id string yes Project ID
title string yes Decision title
decision string yes What was decided
rationale string no "" Why this decision was made
alternatives list no [] Alternatives that were considered
decided_by string no unknown Who made the decision

hub_get_decisions

Get the decision history for a project, newest first.

Parameter Type Required Default Description
project_id string yes Project ID
limit int no 20 Max results

hub_export_project

Export a complete project as JSON, including all context entries and decisions.

Parameter Type Required Description
project_id string yes Project ID to export

Returns a JSON object with the project metadata, all context entries (decrypted), and all decisions.


REST API

The REST API is used by the web dashboard and is available for programmatic access.

Base URL: https://syncontext.dev/api

Authentication endpoints (public)

Method Path Description
POST /api/auth/register Create account, returns API key
POST /api/auth/login Login, returns session token
POST /api/auth/logout Invalidate current session

User endpoints

Method Path Description
GET /api/me Current user info + usage stats
POST /api/me/regenerate-key Generate new API key (invalidates old)

Project endpoints

Method Path Description
GET /api/projects List all projects
POST /api/projects Create or update project
GET /api/projects/{id} Get project with recent entries
PATCH /api/projects/{id}/status Update project status
DELETE /api/projects/{id} Delete project and all data

Context endpoints

Method Path Description
GET /api/context?q=...&mode=... Search (keyword/semantic/hybrid)
POST /api/context Store new entry
GET /api/context/{id} Fetch entry by ID
PUT /api/context/{id} Update entry (saves version)
DELETE /api/context/{id} Delete entry
GET /api/context/{id}/versions Version history
POST /api/context/{id}/rollback Rollback to version

Decision endpoints

Method Path Description
GET /api/decisions/{project_id} List decisions
POST /api/decisions Log a decision

Other endpoints

Method Path Description
GET /api/stats Usage statistics
GET /api/audit Audit log (Pro+)
GET /api/export Export all projects
GET /api/export/{id} Export single project
POST /api/import Import project JSON
POST /api/import/chatgpt Import ChatGPT memory
GET /api/webhooks List webhooks
POST /api/webhooks Create webhook
DELETE /api/webhooks/{id} Delete webhook
GET /api/billing/status Billing status
POST /api/billing/checkout Start Stripe checkout
POST /api/billing/portal Stripe customer portal

Health check

GET https://syncontext.dev/health
→ {"status": "ok", "service": "syncontext"}

No authentication required. Use this to verify the service is running.