Skip to main content
Glama

domain-glossary-mcp

MCP server that serves the business definition of a domain term on demand. The coding agent asks for one term and receives 2 or 3 lines, instead of loading a javadoc or a README into the context window.

The data lives in one central SQLite file shared by every project. Each entry has a project, a term, a description, an optional reference to the source and the time of the last update.

How the gap tracking works

When the agent asks for a term that has no definition, the server creates the entry with description = NULL and reports the term as undocumented. The gap stays recorded, so list_missing_terms shows what the team still needs to write.

Related MCP server: MCP Documentation Server

Requirements

Node 22.13 or later. The server uses the built-in node:sqlite module, so npm install never compiles native code.

Install

From a private registry:

npm install domain-glossary-mcp

From a git repository:

npm install git+ssh://git@your-host/your-org/domain-glossary-mcp.git

The package exposes the domain-glossary-mcp binary.

Register in an MCP client

Add an entry to the client config, for example .mcp.json in the target repository. For Kiro, use .kiro/settings/mcp.json with the same shape.

Only command and args are required. Every parameter below is optional and has a default, so the shortest config runs the server against the global glossary:

{
  "mcpServers": {
    "domain-glossary": {
      "command": "npx",
      "args": ["-y", "domain-glossary-mcp"]
    }
  }
}

This full config sets every parameter. Use it as a template, then remove the lines you do not need:

{
  "mcpServers": {
    "domain-glossary": {
      "command": "npx",
      "args": [
        "-y",
        "domain-glossary-mcp",
        "--db", "/absolute/path/to/glossary.db",
        "--stale-days", "180"
      ],
      "env": {
        "GLOSSARY_DB_PATH": "/absolute/path/to/glossary.db",
        "GLOSSARY_STALE_DAYS": "180",
        "GLOSSARY_LOG_LEVEL": "info"
      },
      "disabled": false,
      "autoApprove": ["lookup_term", "list_missing_terms"]
    }
  }
}

Parameters

Parameter

Required

Default

Purpose

command

yes

the runner, for example npx or node

args

yes

the package name plus the flags below

--db <path>

no

per-user data directory

path of the SQLite file

--stale-days <n>

no

180

age in days before lookup_term marks a definition stale

GLOSSARY_DB_PATH

no

per-user data directory

path of the SQLite file, below --db in precedence

GLOSSARY_STALE_DAYS

no

180

staleness threshold, below --stale-days in precedence

GLOSSARY_LOG_LEVEL

no

info

debug, info, warn or error

disabled

no

false

turns the server off without removing the entry

autoApprove

no

[]

tool names the client runs without a prompt

A flag wins over the matching environment variable. Set the path or the threshold once, in the args or in the env, not in both.

Keep save_term and refresh_term out of autoApprove. A write to a shared glossary deserves one confirmation.

Leave out --db to use the global glossary in the per-user data directory.

Database location

The server resolves the path in this order:

  1. The --db <path> argument in the args array

  2. GLOSSARY_DB_PATH in the env block

  3. The per-user data directory, the global glossary:

    • macOS: ~/Library/Application Support/domain-glossary-nodejs/glossary.db

    • Linux: $XDG_DATA_HOME/domain-glossary-nodejs/glossary.db or ~/.local/share/domain-glossary-nodejs/glossary.db

    • Windows: %LOCALAPPDATA%\domain-glossary-nodejs\Data\glossary.db

The server creates the directory when it is absent and enables WAL mode. Never point the path inside node_modules, because npm deletes that content on each reinstall.

The --db-path spelling works as an alias of --db, and --db=<path> in one token works too. A leading ~ becomes the home directory, and a relative path becomes absolute against the working directory. A JSON config cannot rely on shell expansion, so the server does it.

The startup log line reports the chosen path and its origin:

{"level":"info","message":"domain-glossary MCP server ready","dbPath":"/tmp/team/glossary.db","dbPathSource":"argument","staleAfterDays":180,"staleAfterDaysSource":"default"}

The value of dbPathSource is argument, environment or default. The staleAfterDays field reports the threshold, and staleAfterDaysSource reports its origin with the same 3 values.

WAL files and version control

WAL mode is active. While the server runs, a glossary.db-wal and a glossary.db-shm file sit next to glossary.db. The server checkpoints the WAL after every write, so glossary.db holds each new row at once. A separate reader, such as a git commit, sees the row without a wait; there is no need to disconnect the server or run a manual PRAGMA wal_checkpoint. A clean shutdown also empties the side files, so only glossary.db remains. A crash may leave the side files in place; the next start reads the data from them, so no data is lost.

Do not commit any of the 3 files when the path sits inside a repository. The -wal and the -shm files are transient. The .db file is a live database, and a commit of it causes merge conflicts and races between writers. Add these lines to the .gitignore of the consuming repository:

*.db
*.db-wal
*.db-shm

The simplest way to avoid this is to keep the database out of the repository: leave --db unset to use the per-user data directory, or point it at a path outside the working tree.

Tools

Tool

Input

Result

lookup_term

project, term

the definition, its age and a stale flag, or the term marked undocumented and the gap recorded

save_term

project, term, description, reference (optional)

creates or replaces the definition, records the source and sets the update time to now

refresh_term

project, term

moves the update time to now, keeps the text

list_missing_terms

project (optional)

the terms that have no definition

The optional reference on save_term records where a definition came from: a URL, user when a person gave it, or agent when the model wrote it from the code. lookup_term reports the source on a later read.

The comparison of project and term ignores letter case. The server keeps the original spelling of the stored entry.

The server rejects names that end with DTO, Request, Response, Mapper or Config. The glossary holds aggregate roots and entities, not transport objects.

Staleness

The server judges whether a definition is old, so the agent does not do the date math. lookup_term returns 3 extra fields on a documented term:

  • ageDays: the age of the definition in whole days.

  • stale: true when the age reaches the threshold, false otherwise.

  • staleAfterDays: the threshold in effect.

When stale is true, the text of the result carries a warning that the definition may be outdated and suggests the next step: confirm with the dev, then save_term for a change or refresh_term to mark it current.

The threshold is 180 days (about 6 months) by default. Set --stale-days <n> in the args, or GLOSSARY_STALE_DAYS in the env, to change it. A value that is not a positive integer falls through to the next source, so a typo keeps the default.

Environment variables

Variable

Default

Purpose

GLOSSARY_DB_PATH

per-user data directory

path of the SQLite file, below --db in precedence

GLOSSARY_STALE_DAYS

180

staleness threshold in days, below --stale-days in precedence

GLOSSARY_LOG_LEVEL

info

debug, info, warn or error

Command line arguments

Argument

Default

Purpose

--db <path>

per-user data directory

path of the SQLite file. Wins over GLOSSARY_DB_PATH.

--db-path <path>

alias of --db

--stale-days <n>

180

staleness threshold in days. Wins over GLOSSARY_STALE_DAYS.

Logs are JSON lines on stderr. The stdout stream belongs to the MCP transport.

Agent skills

The skills/ folder holds 2 skills for coding agents:

  • domain-glossary-mcp explains how to connect the server and use the tools

  • domain-glossary-mcp-dev explains the conventions of this codebase

Copy the folder you need into <repo>/.kiro/skills/ or ~/.kiro/skills/. See skills/README.md.

Development

npm install
npm run build
npm test

Inspect the database

sqlite3 "$GLOSSARY_DB_PATH" "SELECT project, term, description, reference, updated_at FROM glossary;"
sqlite3 "$GLOSSARY_DB_PATH" "SELECT project, term FROM glossary WHERE description IS NULL;"

Available Tools

3 tools
list_missing_termsList undocumented domain termsA
Read-onlyIdempotent

Lists the domain terms that have no definition yet. These gaps come from earlier lookup_term calls. Pass a project to narrow the list.

ParametersJSON Schema
NameRequiredDescriptionDefault
projectNoName of the project or repository that owns the term, for example production-data-pipeline.

TDQS

A4.5/5.0
Behavior4/5

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

The annotations already declare the tool read-only and idempotent. The description adds meaningful behavior beyond that: missing terms originate from prior lookup_term calls, and the project parameter narrows the result set. This gives the agent useful operational context without contradicting the annotations.

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?

Two sentences deliver the core function, the origin of the data, and the optional filtering behavior. Every sentence earns its place, and the most important fact is front-loaded.

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

Completeness5/5

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

For a simple read-only list tool with one optional parameter, the description fully covers what the tool does, where its data comes from, and how to narrow results. No output schema is present, but the result type is clear from the description.

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 100%, so the parameter's name and example are already documented. The description adds value by stating that passing a project narrows the list, clarifying the parameter's effect rather than just its identity.

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 is precise: it lists domain terms lacking definitions, which clearly distinguishes it from sibling tools lookup_term and save_term. The phrase 'no definition yet' communicates exactly the intended resource and state.

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

Usage Guidelines4/5

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

It explains that the listed gaps come from earlier lookup_term calls, which contextualizes when this tool is useful. It also tells the agent that passing a project narrows the list, offering clear usage guidance. However, it does not explicitly state when to prefer lookup_term or save_term instead.

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

lookup_termLook up a domain termA
Idempotent

Returns the business definition of a domain term in a project, in 2 to 3 lines. Call this instead of reading javadoc or a README when you need the meaning of an aggregate root or entity. When the term has no definition yet, the server records the gap and reports the term as undocumented.

ParametersJSON Schema
NameRequiredDescriptionDefault
termYesName of the domain term. Use aggregate roots and entities, for example Order or Shipment. Do not use DTOs, requests, responses, mappers or internal value objects.
projectYesName of the project or repository that owns the term, for example production-data-pipeline.

TDQS

A4.3/5.0
Behavior5/5

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

This is a strong disclosure of behavior beyond the annotations. It reveals that when a term has no definition, the server records the gap and reports the term as undocumented. This explains the readOnlyHint:false annotation even though the primary action is a lookup. It also states the output length as 2 to 3 lines, which is useful and not visible elsewhere.

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 three tight sentences with no filler. The core purpose is front-loaded, the alternative context is given next, and the behavioral caveat is last. Every sentence earns its place.

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

Completeness5/5

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

For a two-parameter lookup tool with no output schema, this description is complete: it states what is returned, the output length, when to use it, and the side-effect behavior for undocumented terms. The annotations provide idempotency, and the description explains the non-read-only aspect. Nothing essential is missing.

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 schema already documents both parameters with 100% coverage, so the baseline is 3. The description reinforces the concept of 'domain term' and 'aggregate root or entity', but adds little beyond what the parameter descriptions already state. It does not clarify project semantics beyond the 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 identifies a specific verb and resource: 'Returns the business definition of a domain term in a project'. It is easy to tell this is a read/lookup operation. It does not explicitly contrast itself with the sibling tools save_term and list_missing_terms, so it falls just short of full sibling differentiation.

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

Usage Guidelines4/5

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

The description gives explicit usage context: use it when you need the meaning of an aggregate root or entity, and call it instead of reading javadoc or a README. It does not explicitly mention when to prefer save_term or list_missing_terms, but it clearly scopes the intended use case and even warns against using DTOs or internal value objects via the schema.

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

save_termSave a domain termA
Idempotent

Stores or replaces the business definition of a domain term in a project. Keep the text to 2 or 3 lines and describe the business meaning, not the code structure.

ParametersJSON Schema
NameRequiredDescriptionDefault
termYesName of the domain term. Use aggregate roots and entities, for example Order or Shipment. Do not use DTOs, requests, responses, mappers or internal value objects.
projectYesName of the project or repository that owns the term, for example production-data-pipeline.
descriptionYesBusiness definition of the term, 2 to 3 lines.

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already communicate that this is a write operation (readOnlyHint=false) and idempotent (idempotentHint=true). The description adds useful content guidance about keeping text to 2-3 lines and describing business meaning, but it does not disclose additional behavioral traits such as authentication needs or side effects beyond 'replaces.' No contradiction with annotations.

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 two sentences with no wasted words. It front-loads the action and resource, then gives a concise, actionable instruction about how to write the definition.

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?

For a simple three-parameter write tool with full schema coverage and annotations, the description plus schema is sufficient for an agent to call it correctly. The only notable gap is explicit routing guidance against sibling tools, but that is not essential for successful invocation.

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% coverage for all three parameters, so the schema already documents their meaning. The description repeats the 2-3 line constraint already present in the description parameter's schema and does not add new parameter-level semantics.

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 states the specific action 'Stores or replaces' and the resource 'business definition of a domain term in a project.' This clearly distinguishes it from the read-oriented sibling tools lookup_term and list_missing_terms.

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 this tool is for creating or updating term definitions, but it does not explicitly mention when to prefer it over lookup_term or list_missing_terms. The sibling names make the contrast inferable, but no explicit guidance or exclusion criteria are provided.

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. 3 tool updatesv0.1.0
    • First observedlist_missing_terms
    • First observedlookup_term
    • First observedsave_term

TDQS

A4.2/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: looking up a definition, saving or replacing one, and listing missing definitions. There is no meaningful overlap or ambiguity between them.

Naming Consistency5/5

All tool names follow a consistent lowercase snake_case verb_noun pattern: lookup_term, save_term, list_missing_terms. The naming style is uniform and predictable.

Tool Count5/5

Three tools is well-scoped for a domain glossary server. Each tool covers a necessary core action without redundancy or unnecessary surface area.

Completeness4/5

The glossary lifecycle is largely covered with lookup, save/replace, and gap identification. A delete_term tool and a way to list all defined terms would make it fully complete, but these are minor gaps that do not block the primary workflow.

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables the management of a technical terminology glossary within an Obsidian vault by providing tools to add, search, and retrieve term definitions. It supports structured Markdown entries featuring both developer-focused and simplified explanations for efficient knowledge management.
    4
    3
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides long-lived, cross-project technical memory for AI agents via markdown cards stored in git and indexed by SQLite, enabling search, retrieval, and human-reviewed knowledge management.
    ISC