Skip to content

MCP Server

The Schift MCP server exposes your Schift knowledge layer to any MCP-compatible client such as Claude Code, Cursor, ChatGPT, and Gemini. It is a thin wrapper around the Schift Cloud REST API that translates MCP tool calls into bucket search, document upload, memory search, and workflow operations.

Install the package globally from npm:

Terminal window
npm install -g @schift-io/mcp

The installed binary is schift-mcp. It requires Node.js 18 or later.

You can also run it directly with npx:

Terminal window
npx -y @schift-io/mcp

All MCP tools call the Schift Cloud API on your behalf, so the server needs a Schift API key.

VariableRequiredDefaultDescription
SCHIFT_API_KEYYes for stdio and self-hosted static modeSchift API key used to call {apiUrl}.
SCHIFT_API_BASE_URLNo{apiUrl}Schift API origin.
SCHIFT_USER_IDNoInferred from API keyExplicit user ID for source listing.
SCHIFT_DEFAULT_BUCKETNoDefault bucket for search and schift_search.
SCHIFT_MEMORY_BUCKETSNoAuthenticated user’s memory layerComma-separated bucket list to force for memory search.
SCHIFT_MCP_AUTH_MODENostatic locally, upstream-bearer in hosted deploysHow remote clients authenticate.
SCHIFT_MCP_BEARER_TOKENHTTP static modeToken clients use to authenticate to your self-hosted HTTP server.
SCHIFT_MCP_ALLOW_UNAUTHENTICATEDNoSet to 1 for local-only unauthenticated HTTP testing.

Note: For the Schift-hosted endpoint at {mcpUrl}/mcp, send your Schift API key or OAuth access token as the MCP client bearer token. The server does not use a shared SCHIFT_API_KEY in that mode.

Run schift-mcp without arguments to start the stdio MCP server:

Terminal window
SCHIFT_API_KEY=sk_... SCHIFT_DEFAULT_BUCKET=docs schift-mcp

Start a Streamable HTTP server at /mcp:

Terminal window
SCHIFT_API_KEY=sk_... \
SCHIFT_DEFAULT_BUCKET=docs \
SCHIFT_MCP_BEARER_TOKEN=your-mcp-client-token \
schift-mcp --http

The default port is 8787. Set PORT or SCHIFT_MCP_PORT to change it. A health check is available at GET /healthz.

In hosted multi-user mode, run:

Terminal window
SCHIFT_MCP_AUTH_MODE=upstream-bearer schift-mcp --http

In that mode each MCP client sends the user’s Schift token as Authorization: Bearer ..., and the server calls the Schift API with that token.

Generate a random bearer token for self-hosted HTTP mode:

Terminal window
schift-mcp token

Print configuration for a specific MCP client. Supported targets are claude, cursor, remote, and chatgpt.

Terminal window
schift-mcp init --client cursor --bucket docs
schift-mcp init --client claude --bucket docs
schift-mcp init --client remote --bucket docs --server-url https://mcp.your-domain.com/mcp

Add to ~/.claude/mcp_servers.json:

{
"schift": {
"command": "schift-mcp",
"env": {
"SCHIFT_API_KEY": "sk_...",
"SCHIFT_DEFAULT_BUCKET": "docs"
}
}
}

Add to ~/.cursor/mcp.json:

{
"mcpServers": {
"schift": {
"command": "schift-mcp",
"env": {
"SCHIFT_API_KEY": "sk_...",
"SCHIFT_DEFAULT_BUCKET": "docs"
}
}
}
}

Use the Schift-hosted endpoint ({mcpUrl}/mcp):

<your-mcp-host>/mcp
Authorization: Bearer <your-schift-api-key>

For OpenAI’s Responses API style configuration:

{
"type": "mcp",
"server_label": "schift",
"server_url": "<your-mcp-host>/mcp",
"headers": {
"Authorization": "Bearer <your-schift-api-key>"
},
"allowed_tools": ["search", "fetch", "schift_search", "schift_memory_search"],
"require_approval": "never"
}

For a self-hosted remote server, use the URL you deployed and the SCHIFT_MCP_BEARER_TOKEN value:

https://mcp.your-domain.com/mcp
Authorization: Bearer <your-mcp-client-token>

ChatGPT-compatible search alias. Searches SCHIFT_DEFAULT_BUCKET or the user’s default bucket and returns result IDs, titles, and URLs. This searches your Schift knowledge, not the public web.

ChatGPT-compatible fetch alias. Returns cached content for an ID previously returned by search in the same MCP session.

Schift-native bucket search through POST /v2/buckets/{bucket}/search.

ParameterTypeRequiredDescription
querystringYesSearch query.
bucketstringNoBucket ID or name. Defaults to SCHIFT_DEFAULT_BUCKET, then default.
collectionstringNoDeprecated alias for bucket.
top_knumberNoNumber of results. Default 10.
filterobjectNoMetadata filters passed to Schift search.
taskstringNoSearch instruction preset such as question_answering.
rerankbooleanNoEnable reranking.
rerank_top_knumberNoRerank result limit.

List buckets available to the API key. Use this before search when the user has not named a bucket.

List child collections inside a bucket.

ParameterTypeRequiredDescription
bucketstringYesBucket ID or name.

Upload a text or base64-encoded file into a bucket and queue async ingestion.

ParameterTypeRequiredDescription
bucketstringNoBucket ID or name. Defaults to SCHIFT_DEFAULT_BUCKET, then default.
filenamestringYesFile name.
text / contentstringOne requiredUTF-8 text content.
content_base64stringOne requiredBase64-encoded content for binary files.
content_typestringNoMIME type, for example text/plain or application/pdf.
metadataobjectNoDocument metadata.
collection_idstringNoOptional child collection ID.
ocr_strategystringNoOCR strategy passed to Schift upload.
chunk_sizenumberNoChunk size override.
chunk_overlapnumberNoChunk overlap override.

Note: Do not pass both text and content_base64; use one or the other.

Memory tools search the authenticated user’s memory layer, which includes connected sources such as Gmail, Notion, Slack, Linear, GitHub, Calendar, and Drive.

Search across the user’s memory buckets.

ParameterTypeRequiredDescription
querystringYesSearch query.
bucketstringNoOptional bucket override.
sourcesstring[]NoFilter to source types such as gmail, notion, slack.
tagsstring[]Nokey:value tag filters combined with AND.
top_knumberNoNumber of results. Default 20.
temporalstringNoOne of before, after, between, as_of, latest.
temporal_startnumberNoTemporal start timestamp.
temporal_endnumberNoTemporal end timestamp.

By default the tool calls POST /v1/memory/search and lets Schift discover the user’s memory:{user_id}:* buckets. Set SCHIFT_MEMORY_BUCKETS only when you need a fixed bucket list.

List connected memory sources with sync status and indexed document count.

Workflow tools run installed Agent Workflow Protocol (AWP) workflows through the Schift API.

List the organization’s installed workflows. Only workflows with status published can be run; draft workflows must be reviewed and published in the Schift console first.

schift_workflow_dry_run(workflow_id, inputs?)

Section titled “schift_workflow_dry_run(workflow_id, inputs?)”

Dry-run a workflow with the given inputs. This produces no side effects and returns block-level results for review.

Run a published workflow.

ParameterTypeRequiredDescription
workflow_idstringYesWorkflow ID.
inputsobjectNoWorkflow input values keyed by input name.
modestringNosimulate (default) stages side effects; live executes them.
approvalsobjectNoPer-block human approvals such as {"review_issue": true}. Only set after explicit human approval.

If the workflow is still a draft, the tool returns status: "needs_review" and a message explaining that a human must publish it first.

{
"name": "schift_search",
"arguments": {
"query": "Q3 renewal terms",
"top_k": 5
}
}
{
"name": "schift_memory_search",
"arguments": {
"query": "acme renewal",
"sources": ["gmail", "notion"],
"tags": ["account:acme"],
"top_k": 10
}
}
{
"name": "schift_upload_document",
"arguments": {
"bucket": "docs",
"filename": "notes.md",
"text": "# Project notes\n\nKey decision: use v2 buckets.",
"content_type": "text/markdown",
"metadata": { "project": "migration" }
}
}
{
"name": "schift_workflow_run",
"arguments": {
"workflow_id": "wf_abc123",
"inputs": { "query": "Summarize latest Slack threads" },
"mode": "simulate"
}
}
  • Local stdio mode: the MCP client launches schift-mcp with SCHIFT_API_KEY in its environment. No separate MCP bearer token is needed.
  • Self-hosted HTTP static mode: set SCHIFT_MCP_BEARER_TOKEN and have clients send Authorization: Bearer <token>. The server uses the static SCHIFT_API_KEY to call Schift.
  • Hosted upstream-bearer mode: the MCP client sends its own Schift token as bearer. The server forwards that token to the Schift API and does not store a shared SCHIFT_API_KEY.
  • HTTP mode refuses to start without SCHIFT_MCP_BEARER_TOKEN unless SCHIFT_MCP_AUTH_MODE=upstream-bearer or SCHIFT_MCP_ALLOW_UNAUTHENTICATED=1 is set for local testing.
VariableUsed inPurpose
SCHIFT_API_KEYstdio, self-hosted staticSchift API authentication.
SCHIFT_API_BASE_URLAll modesSchift API origin.
SCHIFT_USER_IDAll modesOptional explicit user ID.
SCHIFT_DEFAULT_BUCKETAll modesDefault bucket for search and upload.
SCHIFT_MEMORY_BUCKETSAll modesForce memory search to these buckets.
SCHIFT_MCP_AUTH_MODEHTTPstatic or upstream-bearer.
SCHIFT_MCP_BEARER_TOKENHTTP staticClient-to-server bearer token.
SCHIFT_MCP_ALLOW_UNAUTHENTICATEDHTTP local testingSkip bearer token check.
PORT / SCHIFT_MCP_PORTHTTPServer port. Default 8787.