Skip to main content
Glama

threadline-mcp

MCP server for Threadline — the memory governance layer for AI agents.

Use Threadline's persistent, user-consented memory in any MCP-compatible client: Cursor, Claude Desktop, or your own agent.

Install

npm install -g threadline-mcp

Related MCP server: Lorekeeper

Setup

Get your API key at threadline.to/dashboard.

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "threadline": {
      "command": "threadline-mcp",
      "env": {
        "THREADLINE_API_KEY": "tl_live_your_key_here"
      }
    }
  }
}

Cursor

Add to your MCP config in Cursor settings:

{
  "threadline": {
    "command": "threadline-mcp",
    "env": {
      "THREADLINE_API_KEY": "tl_live_your_key_here"
    }
  }
}

Any MCP client

THREADLINE_API_KEY=tl_live_your_key_here threadline-mcp

Tools

inject

Inject user context into a base system prompt before an LLM call.

{
  "userId": "user-uuid",
  "basePrompt": "You are a helpful assistant."
}

Returns an enriched prompt with relevant facts about the user automatically inserted.

update

Update a user's context after an LLM interaction. Extracts and stores structured facts for future sessions.

{
  "userId": "user-uuid",
  "userMessage": "I prefer concise answers and I'm building in TypeScript.",
  "agentResponse": "Got it, keeping it brief."
}

How it works

Your MCP client (Cursor / Claude Desktop)
        │
        ▼
threadline-mcp (this package)
        │
        ▼
api.threadline.to
        │
   ┌────┴────┐
   ▼         ▼
Supabase   Redis
(context)  (<50ms)
  • inject() — fetches stored context, scores by recency + relevance, returns enriched prompt

  • update() — two-stage extraction pipeline classifies and stores new facts across 7 scopes

Available Tools

2 tools
injectC

Inject user context into a base system prompt before an LLM call. Returns an enriched prompt with relevant facts about the user inserted automatically.

ParametersJSON Schema
NameRequiredDescriptionDefault
userIdYesThe unique identifier for the user (UUID).
basePromptYesYour base system prompt for the agent.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavioral traits. It states the tool returns an 'enriched prompt with relevant facts about the user inserted automatically,' which implies a read-only or transformative operation. However, it lacks details on potential side effects (e.g., whether it modifies stored data), authentication needs, rate limits, or error handling, leaving significant gaps in behavioral understanding.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, consisting of two sentences that directly state the tool's function and output. It is front-loaded with the core purpose, and every sentence contributes essential information without redundancy. However, it could be slightly more structured by explicitly separating purpose from output details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (involving user context injection and LLM integration), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'relevant facts' entail, how the enrichment process works, potential limitations, or the format of the returned prompt. This leaves critical gaps for an agent to understand the tool's full behavior and output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both parameters (userId and basePrompt). The description adds minimal semantic value beyond the schema, only implying that userId is used to fetch 'relevant facts about the user' and basePrompt is the input to be enriched. This meets the baseline for high schema coverage but doesn't provide extra insights like format examples or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Inject user context into a base system prompt before an LLM call.' It specifies the verb ('inject'), resource ('user context'), and target ('base system prompt'), making the function evident. However, it doesn't explicitly differentiate from the sibling tool 'update', which could be related to modifying prompts or user data, leaving room for ambiguity in sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions the action but doesn't specify prerequisites, constraints, or compare it to the sibling tool 'update'. Without such context, an agent might struggle to choose between tools in a given scenario.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

updateC

Update a user's context after an LLM interaction. Threadline extracts structured facts from the conversation and stores them for future sessions.

ParametersJSON Schema
NameRequiredDescriptionDefault
userIdYesThe unique identifier for the user (UUID).
userMessageYesThe message sent by the user.
agentResponseYesThe response returned by the agent.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool 'extracts structured facts' and 'stores them for future sessions,' which implies data persistence and processing, but doesn't address critical behavioral aspects like whether this is a read-only or mutating operation, what permissions are required, whether it's idempotent, what happens on failure, or any rate limits. For a tool that appears to update persistent user context, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured in two sentences that directly explain the tool's purpose and mechanism. The first sentence states the action and timing, while the second explains the processing and storage. There's no wasted text, though it could be slightly more front-loaded with key usage information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that updates user context with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what 'structured facts' are extracted, how they're stored, what the return value or success indicators are, or any error conditions. The description leaves too many behavioral questions unanswered for a tool that appears to perform persistent data updates.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, providing clear documentation for all three parameters (userId, userMessage, agentResponse). The description adds no additional parameter semantics beyond what's in the schema, such as format expectations for the messages or how they're processed. With complete schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Update a user's context after an LLM interaction' with the specific action 'extracts structured facts from the conversation and stores them for future sessions.' It distinguishes itself from the sibling 'inject' tool by focusing on post-interaction context updates rather than data injection. However, it doesn't explicitly contrast with 'inject' in the description text itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal usage guidance, stating it's used 'after an LLM interaction' but offers no explicit when-to-use rules, prerequisites, or alternatives. It doesn't specify when to choose this tool over the sibling 'inject' tool or any other potential context management approaches. The guidance is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 2 tool updatesv1.0.0
    • First observedinject
    • First observedupdate

TDQS

B3.2/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: 'inject' handles pre-LLM call context insertion, while 'update' handles post-interaction context extraction and storage. There is no overlap in functionality, making them easily distinguishable for an agent.

Naming Consistency5/5

Both tools use simple, imperative verb names ('inject' and 'update') that are consistent in style and length. This follows a predictable pattern without any deviations or mixed conventions.

Tool Count2/5

With only 2 tools, the server feels thin for its apparent purpose of managing user context across LLM interactions. A typical context management system might benefit from additional operations like retrieving or deleting context, making this set under-scoped.

Completeness3/5

The tools cover the core workflow of injecting and updating user context, but there are notable gaps. For example, there is no tool to retrieve stored context for review or delete outdated context, which could limit agent functionality in multi-session scenarios.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server providing managed persistent memory for AI agents. Read and write structured state across sessions, tools, and restarts at 1000+ requests per second, with no infrastructure to self-host or operate.
    2
    Apache 2.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server providing persistent AI memory with four-tier retrieval (SQLite FTS5, graph, vector, LLM agent) to give AI assistants structured, long-term memory without RAG.
    1
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    MCP server for Statewave, an open-source memory runtime for AI agents. Provides persistent memory, context retrieval, and memory compilation through the Model Context Protocol.
    6
    17 npm
    4
    Apache 2.0