Skip to main content
Glama
jmars

Unified History MCP

by jmars

Unified History MCP

Config-driven MCP server for cross-domain full-text search across agent session logs, meeting transcripts, and notification files.

Quick Start

# Install from source (PyPI package coming soon)
pip install git+https://github.com/jmars/unified-history-mcp.git

# Create a config file at ~/.config/unified-history-mcp/config.toml
# or use the example as a starting point:
cp config.example.toml ~/.config/unified-history-mcp/config.toml

# Start the server
unified-history-mcp

Add to your MCP client configuration:

{
  "mcpServers": {
    "unified-history": {
      "command": "unified-history-mcp"
    }
  }
}

Related MCP server: Unified History MCP

Configuration

Configuration is loaded from the first existing location:

  1. $UNIFIED_HISTORY_CONFIG environment variable

  2. ~/.config/unified-history-mcp/config.toml

  3. ./unified-history.toml (current working directory)

Domain Configuration

Each [domains.X] section defines a searchable domain:

Field

Type

Default

Description

dir

string

required

Root directory for this domain's files

pattern

string

"*"

Glob pattern for file discovery

type

string

"files"

"files" or "dirs"

extensions

string[]

[]

Allowed extensions (e.g. [".txt", ".docx"])

extractor

string

"jsonl"

Extractor: jsonl, txt, transcript, notification

renderer

string

(extractor)

Renderer override

label

string

"file"

Human label: "session", "transcript", etc.

fst_binary

string

"fst-indexer"

Path or name of the FST indexer binary

fst_index_dir

string

(dir)

Override for index directory

date_field

string

JSON field for date extraction (jsonl only)

filters

string[]

[]

Supported filters: role, speaker

Global Configuration

Section

Field

Description

[history]

file

Path to command history file

[log]

file

Path to runtime log file

MCP Tools

search(domain, query, ...)

Full-text search with FST fast path and regex fallback.

Parameter

Type

Default

Description

domain

string

"all"

Domain or "all" for cross-domain

query

string

""

Search text or regex pattern

max_results

int

20

Maximum total matches

date_from

string

Start date (YYYY-MM-DD)

date_to

string

End date (YYYY-MM-DD, inclusive)

regex

bool

false

Treat query as regex

context_lines

int

2

Surrounding context lines per match

case_sensitive

bool

false

Case-sensitive matching

max_matches_per_file

int

5

Max matches from any single file

role

string

[sessions] Filter by role: user, assistant, tool

speaker

string

[transcripts] Filter by speaker name

list_domain(domain, date_from, date_to, max_results)

List available files in a domain with metadata.

Parameter

Type

Default

Description

domain

string

Domain to list

date_from

string

Start date (YYYY-MM-DD)

date_to

string

End date (YYYY-MM-DD, inclusive)

max_results

int

50

Maximum entries to show

read(domain, id, max_entries, role, speaker)

Read entries from a domain file.

Parameter

Type

Default

Description

domain

string

Domain

id

string

File/directory name or unique prefix

max_entries

int

50

Maximum entries (newest first)

role

string

[sessions] Filter by role

speaker

string

[transcripts] Filter by speaker name

summary(domain, id)

Get the AI-generated summary for a domain entry.

Parameter

Type

Description

domain

string

Domain (sessions, transcripts)

id

string

File/directory name or unique prefix

rebuild(domain)

Rebuild FST indexes for configured domains.

Parameter

Type

Default

Description

domain

string

"all"

Domain or "all" for all

search_history(query, max_results, regex, case_sensitive)

Search the command history file.

Parameter

Type

Default

Description

query

string

Search text or regex pattern

max_results

int

30

Maximum matches

regex

bool

false

Treat query as regex

case_sensitive

bool

false

Case-sensitive matching

search_log(query, max_results, regex, case_sensitive, level)

Search the runtime log file.

Parameter

Type

Default

Description

query

string

Search text or regex pattern

max_results

int

30

Maximum matches

regex

bool

false

Treat query as regex

case_sensitive

bool

false

Case-sensitive matching

level

string

Filter by log level

How It Works

  1. Configuration — TOML file defines domains, their directories, extractors, and renderers.

  2. Domain Discovery — Files are discovered via glob patterns with extension filtering.

  3. Fast Path (FST) — If the optional fst-indexer binary is installed and indexes are built (via the rebuild tool), searches use the blazing-fast FST index.

  4. Slow Path (Regex) — Falls back to line-by-line regex scanning across files when FST is unavailable.

  5. Extractors — Produce text entries for FST indexing from different file formats (JSONL, TXT, Tactiq transcripts, notifications).

  6. Renderers — Format entries for human-readable display in search results, listings, and read output.

Development

git clone https://github.com/jmars/unified-history-mcp.git
cd unified-history-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines on setting up the dev environment, running tests, and submitting pull requests.

License

MIT — see LICENSE.

Available Tools

7 tools
list_domainB

List available files in a domain with metadata and summaries.

Args: domain: Domain to list (sessions, transcripts, notifications) date_from: Optional start of date range (YYYY-MM-DD) date_to: Optional end of date range (YYYY-MM-DD, inclusive) max_results: Maximum entries to show (default 50)

ParametersJSON Schema
NameRequiredDescriptionDefault
domainYes
date_toNo
date_fromNo
max_resultsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It implies a read-only operation (listing files) but does not disclose behavioral traits such as whether data is sorted, paginated, or if any side effects occur. No mention of authentication, permissions, or rate limits.

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 front-loaded with the purpose and includes a clean arg list. Every sentence adds value with no redundancy. Could be slightly more concise by omitting 'Args:' label, but overall efficient.

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

Completeness4/5

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

Given that an output schema exists, the description does not need to detail return values. It covers parameter semantics adequately and implies the tool is for enumeration. However, it lacks context on sorting, pagination, or how to handle large result sets, which is reasonable for a listing tool.

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

Parameters4/5

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

Schema description coverage is 0%, so the description compensates well by explaining the domain parameter with explicit allowed values, date parameters with format hints, and max_results with a default. This adds significant meaning beyond the raw schema.

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 lists files in a domain with metadata and summaries, using the specific verb 'List'. It mentions allowed domain values (sessions, transcripts, notifications), which clarifies scope. However, it does not explicitly differentiate from sibling tools like 'search' or 'summary', leaving some ambiguity.

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 notes that date parameters are optional and max_results has a default, but provides no guidance on when to use this tool versus alternatives (e.g., 'search' or 'read'). It does not specify prerequisites or conditions for use.

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

readA

Read entries from a domain file.

Args: domain: Domain (sessions, transcripts, notifications) id: File/directory name or unique prefix max_entries: Maximum entries to return, newest first (default 50) role: [sessions] Filter by role: user, assistant, tool speaker: [transcripts] Filter by speaker name

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
roleNo
domainYes
speakerNo
max_entriesNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

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

The description discloses behavioral details: returns entries 'newest first' with default max_entries=50, and domain-specific filters for role and speaker. However, it does not mention whether the tool is read-only or has side effects, nor does it describe error handling or output format. Without annotations, more transparency would be beneficial.

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

Conciseness5/5

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

The description is very concise, front-loaded with the main purpose, and uses a clear bullet-like format for parameters. Each line serves a purpose with no extraneous text, making it efficient for an AI agent to parse.

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

Completeness4/5

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

The description covers core functionality and parameter usage adequately for a read tool with 5 parameters. It explains ordering and defaults. However, it could be more complete by clarifying how the output is structured (though an output schema exists) and the exact semantics of the 'id' parameter (e.g., unique prefix matching). Overall, it is sufficient but not exhaustive.

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

Parameters5/5

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

The description adds significant meaning to each parameter beyond the schema, which has 0% description coverage. It explains the purpose of domain, id, max_entries, role, and speaker, including domain-specific constraints (e.g., role only for sessions). This compensation is crucial and well-executed.

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

Purpose5/5

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

The description starts with 'Read entries from a domain file.', clearly stating the action and resource. It specifies domain options (sessions, transcripts, notifications) and the tool name 'read' naturally distinguishes from sibling tools like 'search', 'list_domain', etc., which have different verbs and purposes.

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?

No guidance on when to use 'read' versus alternatives like 'search' or 'list_domain'. The description only explains parameters without contextual advice or exclusions, leaving the agent to infer appropriate usage from tool names alone.

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

rebuildA

Rebuild FST indexes for configured domains.

Args: domain: Domain to rebuild, or "all" for all configured domains

ParametersJSON Schema
NameRequiredDescriptionDefault
domainNoall

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/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 disclose behavioral traits. It only says 'Rebuild', which implies a write/destructive operation, but does not mention idempotency, side effects, or required permissions.

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

Conciseness5/5

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

The description is extremely concise with two lines plus a brief Args section, all front-loaded. Every sentence is necessary and there is no wasted text.

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

Completeness3/5

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

Given the simplicity of one optional parameter and the existence of an output schema, the description covers the basic purpose. However, it lacks any mention of when rebuild is needed or what the output contains, making it minimally complete.

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

Parameters4/5

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

With 0% schema description coverage, the description adds crucial meaning by explaining the 'domain' parameter and the special value 'all'. It could be improved by listing valid domain values or constraints.

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

Purpose5/5

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

The description clearly states the action ('Rebuild') and the resource ('FST indexes'), and it distinguishes itself from sibling tools that are for searching, reading, or summarizing.

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 like 'search' or 'read'. It lacks any context about prerequisites or conditions for rebuilding indexes.

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

search_historyA

Search the Vibe command history (vibehistory file).

Args: query: Search text (or regex pattern if regex=True) max_results: Maximum matches to return (default 30) regex: If True, treat query as a regex pattern case_sensitive: If True, match case-sensitively (default False)

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
regexNo
max_resultsNo
case_sensitiveNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the full burden. It discloses parameter behavior but does not state whether the tool is read-only, what side effects exist, or any permission requirements. The lack of explicit behavioral traits is a 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 concise and front-loaded with the purpose, followed by a clear parameter list. Each sentence adds value, though the structure could be slightly more integrated.

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

Completeness4/5

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

Given the presence of an output schema, the description adequately covers input parameters. However, it lacks context about the scope of the command history (e.g., user-specific or system-wide) and does not mention return format beyond what the schema provides.

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

Parameters5/5

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

The description provides detailed explanations for all four parameters, including default values and the meaning of flags like regex and case_sensitive. Since the schema has 0% description coverage, this adds crucial meaning beyond the parameter names.

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

Purpose5/5

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

The description clearly states the tool searches the Vibe command history file, with a specific verb and resource. This distinguishes it from sibling tools like 'search' and 'search_log' which likely operate on different data.

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

Usage Guidelines3/5

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

The description implies usage for searching command history but provides no explicit guidance on when to use this tool over alternatives like 'search' or 'search_log'. No when-not-to-use or alternative suggestions are given.

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

search_logA

Search the Vibe runtime log (vibe.log).

Args: query: Search text (or regex pattern if regex=True) max_results: Maximum matches to return (default 30) regex: If True, treat query as a regex pattern case_sensitive: If True, match case-sensitively (default False) level: Filter by log level: WARNING, INFO, ERROR, DEBUG

ParametersJSON Schema
NameRequiredDescriptionDefault
levelNo
queryYes
regexNo
max_resultsNo
case_sensitiveNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

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

The description explains key behaviors: regex usage, case sensitivity, level filtering, and max_results limit. It does not explicitly state that the operation is read-only, but with no annotations, the description provides good transparency about the search behavior.

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 well-structured with a clear bullet-like Args list. It is efficient but could be slightly more concise; however, it earns its length by covering all parameters meaningfully.

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

Completeness4/5

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

Given that an output schema exists, the description need not explain return values. It fully covers input parameters and operation context. Could mention the log file location or that it's read-only, but overall complete.

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

Parameters5/5

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

Every parameter (query, max_results, regex, case_sensitive, level) is described with its purpose, default value, and behavior. This fully compensates for the 0% schema description coverage.

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

Purpose5/5

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

The description clearly states the tool searches the Vibe runtime log (vibe.log), with specific verb 'Search' and explicit resource. It distinguishes itself from siblings like 'search' by targeting a specific log file.

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

Usage Guidelines3/5

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

The description explains what the tool does but does not explicitly state when to use it over alternatives (e.g., generic 'search' tool). It implies usage for log filtering but lacks explicit when-not or alternative references.

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

summaryB

Get the AI-generated summary for a domain entry.

Args: domain: Domain (sessions, transcripts) id: File/directory name or unique prefix

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
domainYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description must fully convey behavioral traits. It mentions the summary is 'AI-generated' but does not disclose whether the tool is read-only, has latency, requires authentication, or may fail for missing IDs. This omission leaves the agent uncertain about side effects or performance characteristics.

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

Conciseness5/5

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

The description is extremely concise with two short sentences plus an argument list. It is front-loaded, no redundant information, and every word adds value. Ideal length for a simple parameterized tool.

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

Completeness4/5

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

Given the tool's simplicity (two parameters, no annotations, output schema exists), the description covers the core usage. It could benefit from noting that the domain must be supported (e.g., sessions or transcripts) and that the id should correspond to an existing entry. Nonetheless, it is nearly complete for a basic retrieval.

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 0% description coverage, so the description must compensate. It adds meaning by explaining 'domain' can be 'sessions, transcripts' and 'id' is a 'file/directory name or unique prefix'. However, these explanations are somewhat vague (e.g., what constitutes a 'unique prefix'?) and do not provide full parameter semantics.

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 retrieves an AI-generated summary for a domain entry, specifying domain and id as parameters. It distinguishes from siblings like read (full entry) and list_domain (listing entries) by its focus on summaries, but does not explicitly contrast them.

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 does not indicate prerequisites, such as needing to list domains first or that the summary might be generated on demand. This lack of usage context reduces the tool's usability for selecting between siblings.

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. Dates show when Glama detected each change.

  1. 7 tool updatesv0.1.0
    • First observedlist_domain
    • First observedread
    • First observedrebuild
    • First observedsearch
    • First observedsearch_history
    • First observedsearch_log
    • First observedsummary

TDQS

A3.8/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a distinct purpose: search for full-text search, list_domain for listing files, read for reading entries, summary for AI summaries, rebuild for index rebuilding, search_history for command history, and search_log for runtime log. No overlap exists.

Naming Consistency3/5

Names use lowercase underscores, but the pattern is inconsistent: some are simple verbs (search, read, rebuild), one is a noun (summary), and three are verb_noun (list_domain, search_history, search_log). A more uniform verb_noun pattern would improve consistency.

Tool Count5/5

With 7 tools, the server is well-scoped for its purpose of managing and querying history domains, command history, and logs. Each tool contributes meaningfully without redundancy.

Completeness4/5

The tool surface covers essential operations: search, list, read, and summarize across domains, plus separate search for history and log. Minor gaps like missing delete or create operations are acceptable for a viewer-oriented server.

Maintenance

ActivitySlowing
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Read-only MCP server for Elasticsearch log querying. Enables natural language search, filtering, context retrieval, and aggregation of logs.
    -
  • F
    license
    Not graded
    quality
    B
    maintenance
    MCP server that indexes local Claude Code transcripts and provides keyword, phrase, semantic, and date-range search, plus full context/session recall.
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jmars/unified-history-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server