Skip to main content
Glama
DriftOS MCP Server

DriftOS MCP Server

Official
by DriftOS

DriftOS MCP Server

MCP server for semantic conversation routing with DriftOS.

What is this?

An MCP (Model Context Protocol) server that lets any MCP-compatible client (Claude Desktop, Cursor, etc.) use DriftOS for intelligent conversation routing.

Instead of dumping entire conversation histories into LLM context, DriftOS:

  • Branches when new topics appear

  • Stays when the topic continues

  • Routes back when you return to a previous topic

Related MCP server: MCP Server + Document Memory System

DriftOS Backend

This MCP server requires a running DriftOS Core backend.

DriftOS Core is the semantic conversation routing engine that:

  • Analyzes messages to detect topic shifts and returns

  • Maintains a graph of conversation branches

  • Extracts and tracks facts across topics

  • Assembles relevant context for LLM calls

See the driftos-core repository for setup instructions.

Tools

Tool

Description

driftos_route_message

Route a message to the appropriate branch

driftos_get_context

Get assembled context for LLM calls

driftos_list_branches

List all branches in a conversation

driftos_get_branch

Get details about a specific branch

Setup

Prerequisites

  • Node.js 18+

  • A running DriftOS backend (default: http://localhost:3000)

Installation

npm install
npm run build

Configuration

Set the DriftOS API URL:

export DRIFTOS_API_URL=http://localhost:3000

Running

stdio mode (for Claude Desktop, etc.):

npm start

HTTP mode (for remote access):

TRANSPORT=http npm start

Claude Desktop Configuration

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "driftos": {
      "command": "node",
      "args": ["/path/to/driftos-mcp-server/dist/index.js"],
      "env": {
        "DRIFTOS_API_URL": "http://localhost:3000"
      }
    }
  }
}

License

MIT

Available Tools

6 tools
driftos_build_promptBuild LLM PromptA
Read-onlyIdempotent

Build a ready-to-use prompt for LLM calls with context and facts.

Args:

  • branch_id (string): The branch ID to build prompt for

  • system_prompt (string, optional): Custom system prompt prefix

Returns: { "system": string, // Full system prompt with topic and facts "messages": [{ "role": string, "content": string }] // Conversation messages }

Use this to get a complete prompt ready for OpenAI/Anthropic/etc API calls.

Inputs: branch_id (required), system_prompt.

driftos_extract_factsExtract Facts from BranchA
Idempotent

Trigger fact extraction for a branch. Use when you want to explicitly extract facts from the current conversation state.

Args:

  • branch_id (string): The branch ID to extract facts from

Returns: { "facts": [{ "key": string, "value": string }] }

Inputs: branch_id (required).

driftos_get_contextGet Conversation ContextA
Read-onlyIdempotent

Get assembled context for a conversation branch, including messages and facts from related branches.

This is what you pass to an LLM instead of the entire conversation history. Returns only the relevant messages from the current branch plus accumulated facts.

Args:

  • branch_id (string): The branch ID to get context for (returned from route_message)

Returns: { "branchId": string, "branchTopic": string, "messages": [ { "role": "user" | "assistant", "content": string } ], "allFacts": [ { "branchTopic": string, "isCurrent": boolean, "facts": [{ "key": string, "value": string, "confidence": number }] } ] }

Use this to build focused LLM context windows instead of dumping entire conversation history.

Inputs: branch_id (required).

driftos_get_factsGet Branch FactsB
Read-onlyIdempotent

Get extracted facts from a specific branch.

Args:

  • branch_id (string): The branch ID to get facts for

Returns: [{ "key": string, "value": string, "confidence": number }]

Inputs: branch_id (required).

driftos_list_branchesList Conversation BranchesA
Read-onlyIdempotent

List all branches in a conversation with their topics and message counts.

Use this to understand the structure of a conversation and see what topics have been discussed.

Args:

  • conversation_id (string): Unique identifier for the conversation

Returns: [ { "id": string, "topic": string, "messageCount": number, "isActive": boolean } ]

Inputs: conversation_id (required).

driftos_route_messageRoute MessageA

Route a message to the appropriate conversation branch using semantic drift detection.

Returns one of three actions:

  • BRANCH: New topic detected, creates a new branch

  • STAY: Message continues the current topic

  • ROUTE: Returns to a previously discussed topic

Args:

  • conversation_id (string): Unique identifier for the conversation

  • content (string): The message content to route

  • role ('user' | 'assistant'): Who sent the message (default: 'user')

Returns: { "action": "BRANCH" | "STAY" | "ROUTE", "branchId": string, "branchTopic": string, "confidence": number, "isNewBranch": boolean }

Example:

  • "I want to buy a house in London" -> BRANCH (new topic)

  • "What areas have good schools?" -> STAY (same topic)

  • "Back to houses - what about mortgage rates?" -> ROUTE (returns to previous branch)

Inputs: conversation_id (required), content (required), role.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: route_message handles message routing, list_branches lists branches, get_context assembles context, build_prompt constructs prompts, get_facts retrieves facts, and extract_facts triggers fact extraction. The descriptions clearly differentiate their functions, making tool selection unambiguous.

    Naming Consistency5/5

    All tools follow a consistent verb_noun naming pattern with the 'driftos_' prefix (e.g., driftos_route_message, driftos_list_branches). The structure is uniform throughout, using snake_case consistently without any deviations or mixed conventions.

    Tool Count5/5

    With 6 tools, this server is well-scoped for managing conversation branches, context, and facts in a drift detection system. Each tool serves a specific, necessary function (routing, listing, context assembly, prompt building, fact retrieval, and fact extraction), and none feel redundant or missing for the domain.

    Completeness5/5

    The tool set provides complete coverage for the conversation drift management domain: routing messages, listing branches, getting context, building prompts, and handling facts (both retrieval and extraction). There are no obvious gaps; agents can perform all core operations from routing to LLM integration without dead ends.

    Related MCP Connectors

    Related MCP Servers