Skip to main content
Glama
Jama MCP Server
by yyy188

Jama MCP Server

A production-grade Model Context Protocol (MCP) server for the Jama requirements management system, combining high-precision RAG retrieval with native REST API filtering. An LLM client (Claude Desktop, etc.) can autonomously choose between semantic search and structured metadata queries.

Architecture

            ┌──────────────────────── MCP (stdio) ────────────────────────┐
            │                                                              │
  LLM ──────┤  init_jama_project      get_sync_progress                   │
  Client    │  search_jama_semantics  query_jama_native_metadata           │
            │                                                              │
            │   server.py  (FastMCP + APScheduler + thread pool)          │
            │      │                                                       │
            │      ├── rag_pipeline.py  (Multi-Query + Hybrid + RRF +     │
            │      │                       cross-encoder reranker)         │
            │      ├── jama_client.py   (OAuth2 + pagination + HTML clean)│
            │      └── db_setup.py      (SQLite + FTS5 + sqlite-vec)      │
            │                                                              │
            └──────────────────────────────────────────────────────────────┘
                         │                        │
                  Jama REST API            Local CPU embeddings (default:
                  (read-only GET)          bge-small-en-v1.5) + Azure OpenAI
                                           (optional, text-embedding-3-small)

Related MCP server: Oracle MCP

Retrieval pipeline (search_jama_semantics)

  1. Multi-Query — the query is expanded into 3-5 sub-queries. The MCP LLM client performs the expansion and passes the variants via the sub_queries parameter; when none are supplied, the server falls back to deterministic lexical variants (stopword-stripped + truncated) so RRF fusion still benefits from multiple recall angles. No server-side chat LLM is configured or called.

  2. Hybrid recall — for each sub-query: vector recall (sqlite-vec, cosine)

    • keyword recall (FTS5, BM25), each capped at candidate_k.

  3. RRF fusion — Reciprocal Rank Fusion merges all ranked lists into one candidate pool of ≤ candidate_k unique chunks.

  4. Rerank — a local cross-encoder (cross-encoder/ms-marco-MiniLM-L-6-v2, ~80MB, CPU, ONNX via fastembed/onnxruntime) scores (query, chunk) pairs via a sequence-classification head; top top_k returned. It runs on the SAME onnxruntime as the bge embedding model — no torch/transformers dependency, so the Windows c10.dll/WinError 1114 load failure is eliminated. If the model is unavailable, the pipeline gracefully falls back to RRF scores. Model weights are fetched from the HuggingFace China mirror (HF_ENDPOINT=https://hf-mirror.com) on first use, then served from cache.

Reliability & crash recovery

The server is designed to survive crashes without losing data and to come back up consistent on restart:

  • Atomic per-item indexing — each item's chunks (text + FTS5 + sqlite-vec) are replaced in a single write_txn (BEGIN IMMEDIATE), so a crash mid-sync never leaves a half-written item. done/progress only advance after the commit, so the DB is consistent up to the last flushed batch.

  • Idempotent re-sync — upserts overwrite (never duplicate), so re-processing already-indexed items on resume is harmless.

  • Startup recovery — _resume_interrupted_syncs re-queues any project left INITIALIZING by a prior crash, so the server self-heals without manual action.

  • Concurrency guard — init_jama_project refuses a duplicate concurrent sync for a project that already has a job in flight, returning the existing job_id instead of spawning a racing second worker.

  • Bounded HTTP retries — 429 rate-limit handling is a bounded loop (not recursion), so a persistent rate-limit fails cleanly instead of overflowing the stack; Retry-After parsing tolerates non-numeric values; a 401 mid-sync refreshes the token and retries the page; malformed JSON bodies are retried.

  • WAL mode + write lock — SQLite runs in WAL with a process-wide write lock, so the scheduler's writer and MCP reader threads coexist without SQLITE_BUSY failures.

Chunking (LlamaIndex)

Jama rich-text (Description / Test Case Steps) is cleaned to plain text with BeautifulSoup before being wrapped in LlamaIndex Document objects. The documents are split into TextNode chunks by LlamaIndex's SentenceSplitter (recursive, sentence-aware; chunk_size=512, chunk_overlap=80 to preserve context for the ~30% long-form items). The item name is prepended to each chunk so the title is always retrievable.

Native API (query_jama_native_metadata)

Bypasses the vector store for exact-match questions (specific document key, status, item type). Uses /abstractitems which honours itemType, contains and documentKey server-side; status is refined client-side. Handles pagination internally, returns up to 20 core metadata records.

Incremental sync

On startup, APScheduler registers a job (every 2h by default) that reads the projects table for projects in READY status (INITIALIZING is deliberately excluded — those are handled by crash recovery) along with their last_sync_time, then walks Jama items whose modifiedDate > last_sync_time, re-cleans/re-chunks them and updates the FTS5 + sqlite-vec indexes. New items are added; modified items have their old chunks replaced atomically. A project that already has an in-flight job is skipped so a scheduled sync never races a user-initiated one.

Setup

Get the code

# Direct (if GitHub is reachable)
git clone https://github.com/yyy188/jama-mcp-server.git jama
cd jama

# China mirror (if github.com is slow/blocked)
git clone https://gh-proxy.com/https://github.com/yyy188/jama-mcp-server.git jama
cd jama

uv is a single-binary Python package manager (~20 MB). Its lockfile (uv.lock) pins the entire dependency tree — every package and its transitive deps — so uv sync on a new machine produces the exact same environment, with no version-resolution surprises.

# 1. Install uv (one-time, ~20 MB single binary)
#    Windows:  winget install astral-sh.uv
#    macOS/Linux:  curl -LsSf https://astral.sh/uv/install.sh | sh
#    (or: pip install uv)

# 2. Sync dependencies from the lockfile (creates .venv, installs 116 packages)
uv sync

# 3. Configure
cp .env.example .env        # then edit: fill in JAMA_URL / JAMA_CLIENT_ID / JAMA_CLIENT_SECRET
#    Or run the interactive wizard (also lets you choose the DB storage directory):
#    uv run python setup_wizard.py

# 4. Pre-download models (~150 MB ONNX, one-time)
uv run python bootstrap.py

# 5. Run
uv run python server.py     # stdio (default) — local MCP client spawns it

Alternative: pip

pip install -r requirements.txt
cp .env.example .env        # fill in Jama credentials
python bootstrap.py
python server.py

Transports: stdio vs HTTP

The server supports three transports, selected by JAMA_MCP_TRANSPORT:

Transport

Use case

Client connects via

stdio (default)

Local MCP client (Claude Desktop) spawns server as subprocess

stdin/stdout

streamable-http

Remote client / Docker / shared server

http://host:8000/mcp

sse

Older MCP clients that only support SSE

http://host:8000/sse

For HTTP/SSE mode, set JAMA_MCP_HOST (0.0.0.0 for remote access) and JAMA_MCP_PORT (default 8000):

# streamable-http (MCP new standard), listening on all interfaces
JAMA_MCP_TRANSPORT=streamable-http JAMA_MCP_HOST=0.0.0.0 uv run python server.py
# SSE (older clients)
JAMA_MCP_TRANSPORT=sse JAMA_MCP_HOST=0.0.0.0 uv run python server.py

MCP client config (stdio, Claude Desktop example)

{
  "mcpServers": {
    "jama-mcp": {
      "command": "uv",
      "args": ["run", "--directory", "/abs/path/to/jama", "python", "server.py"]
    }
  }
}

MCP client config (streamable-http)

Point your MCP client at http://localhost:8000/mcp (or the remote host:port).

To (re)download just the models later without re-running the wizard:

uv run python bootstrap.py     # or: python bootstrap.py

The models live in user/huggingface/ (project-local, ~150 MB: a ~130 MB ONNX embedding + ~80 MB ONNX cross-encoder reranker). Both run on onnxruntime via fastembed — CPU-only, no torch/transformers. The model files are plain data — portable across machines, so you can copy that folder from another machine to skip the download entirely.

Why pinned onnxruntime / Python 3.12

onnxruntime is pinned to 1.20.1 and Python 3.13+ is not supported (requires-python = ">=3.10,<3.13"). On Windows, onnxruntime ≥1.21 (which Python 3.13 forces, because fastembed requires >1.21 there) depends on the new VC++ Runtime (vcruntime140_1.dll) absent on many machines, causing WinError 1114 DLL load failures. 1.20.1 loads cleanly on Python 3.10–3.12 and satisfies fastembed's constraint. uv sync automatically picks Python 3.12 (the verified stable target) from the lockfile. If you upgrade onnxruntime, re-test on a clean Windows machine without the latest VC++ Redistributable.

Windows: VC++ Runtime (vcruntime140.dll)

onnxruntime is a C++ binary that needs vcruntime140.dll — part of the Microsoft VC++ Redistributable. Most Windows machines already have it (anything with Chrome / Java / VS Code installed does), but a clean Windows install may not.

The server auto-detects this: preflight probes for the DLL and, if missing, reports a clear blocking error with the fix. setup_wizard.py offers to auto-install it (downloads the 24 MB installer from https://aka.ms/vs/16/release/vc_redist.x64.exe — reachable from mainland China at ~420 KB/s — and runs it silently). You can also install it manually:

# From the project directory (after uv sync):
uv run python -c "from preflight import install_vcruntime; install_vcruntime()"
# Or download + run the installer yourself:
#   https://aka.ms/vs/16/release/vc_redist.x64.exe

This is a system-level install (writes vcruntime140.dll to C:\Windows\System32, requires admin/UAC) — it's the one thing this project installs outside its own folder, because the DLL must be in the system path for onnxruntime to find it. Linux/macOS don't need it (onnxruntime bundles the system libs in its wheels there).

After the server starts, the LLM client should call bootstrap_models (and poll get_bootstrap_progress every ~2 min) to pre-download the embedding + reranker models BEFORE the first init_jama_project — see Model bootstrap. On startup the server logs a hint if the models aren't cached yet.

First-run configuration guard

Every MCP tool runs an offline pre-flight check before doing any work: Python dependencies, required env vars (JAMA_URL / JAMA_CLIENT_ID / JAMA_CLIENT_SECRET — plus EMBEDDING_BASE_URL / EMBEDDING_API_KEY only when EMBEDDING_PROVIDER=azure; the default local CPU provider needs no embedding credentials) and the SQLite store. If anything is missing the tool returns a clear error dict with a hint instead of failing midway through a Jama API call. Configure via the wizard, or call the configure_jama / validate_setup tools at runtime.

MCP client config (Claude Desktop example)

{
  "mcpServers": {
    "jama-mcp": {
      "command": "python",
      "args": ["/absolute/path/to/jama-mcp-server/server.py"],
      "env": { "JAMA_MCP_DB_PATH": "/absolute/path/to/jama-mcp-server/jama_mcp.db" }
      // ↑ DB directory is selectable at install time via setup_wizard; filename is fixed.
    }
  }
}

Usage flow (for the LLM)

  1. bootstrap_models() → pre-download embedding + reranker models (first run only). Returns job_id immediately; poll get_bootstrap_progress(job_id) every ~2 min until DONE. Skip if models are already cached (re-running is a fast no-op).

  2. init_jama_project("20571") → returns job_id immediately (non-blocking).

  3. get_sync_progress(job_id) → poll until status == "DONE", roughly every 2 minutes (syncs index many items and take minutes — don't busy-poll).

  4. search_jama_semantics("20571", "how does volume sync work", top_k=5) → RAG.

  5. query_jama_native_metadata("20314", document_key="SA-TC-7") → exact match.

To re-index a project that is already initialized, use reinit_jama_project("20571") (full re-sync) and poll the same way. Scheduled incremental syncs run automatically (~every 2h); check any project's in-flight job plus its last init/reinit/sync run at any time with get_sync_status("20571").

Model bootstrap

The embedding model (~130MB ONNX, bge-small-en-v1.5) and the cross-encoder reranker (~80MB) are not bundled — they download on first use. To keep the first sync from stalling on a model download, call bootstrap_models right after the server is configured. It downloads BOTH models asynchronously (a kind="bootstrap" job in sync_jobs, run on the same thread pool as syncs) and returns a job_id immediately.

  • bootstrap_models() — start the async pre-download (no-op per model if already cached). Reentrancy-guarded: a second call while one is RUNNING returns the existing job_id.

  • get_bootstrap_progress(job_id) — poll every ~2 min. Progress is phase-based, not live bytes: the reranker downloads via snapshot_download and the embedding via fastembed, neither of which gives a per-chunk byte callback, so message reports phase transitions (e.g. "Downloading reranker model (...)" → "Reranker model ready") rather than byte counts. status → DONE (both cached) or ERROR.

On startup, if either model isn't cached, the server logs a hint to call bootstrap_models. The sync-time ensure_downloaded calls remain as a fallback so a skipped bootstrap still works (the first sync downloads the models inline).

Monitoring

get_sync_status(project_id) is the one-call monitor for a project's sync operations. All three operations — init_jama_project, reinit_jama_project and the scheduled incremental sync — run asynchronously as background jobs (recorded in the sync_jobs table with kind = init / reinit / sync), so each is pollable. The tool returns:

  • active_job — the in-flight job for this project (or null if idle);

  • recent.{init,reinit,sync} — the most recent job of each kind, terminal or running, so you can see the last result even when nothing is running now;

  • project_status / last_sync_time / item_count / chunk_count — current project state;

  • process — lightweight live metrics (RSS, threads, DB size, chunk count) for the server process; null if psutil is unavailable.

After starting an init or reinit, poll get_sync_progress(job_id) (or get_sync_status(project_id)) roughly every 2 minutes, reporting each sample to the user, until the job reaches DONE/ERROR. On startup, any job left RUNNING by a prior crash is reconciled to ERROR (interrupted by restart) so the monitor never shows a phantom in-flight job.

Resilience

  • Jama API: OAuth token auto-refresh on expiry + 401 retry; urllib3 Retry with exponential backoff on 429/5xx; explicit Retry-After handling; SSL connection-reset tolerated (transient on this network).

  • Embeddings: same retry/backoff session on the embedding endpoint.

  • SQLite concurrency: WAL mode + busy timeout + a process-level write lock so the APScheduler writer and MCP reader threads coexist without SQLITE_BUSY errors; chunk replacement is atomic per item.

  • Reranker: lazy-loaded singleton; failure degrades to RRF-only scoring instead of crashing the search.

  • Read-only: JamaClient only issues GET requests — it cannot create, modify or delete data on the Jama instance.

Files

File

Purpose

requirements.txt

deps + Aliyun mirror config

config.py

env-driven settings (dataclasses) + validation/persistence/reload

db_setup.py

SQLite schema, FTS5 + sqlite-vec loading, CRUD

jama_client.py

OAuth, paginated fetch, HTML cleaning, native query, browse API

rag_pipeline.py

chunking, embeddings, Multi-Query, hybrid recall, RRF, rerank

server.py

MCP tools, async jobs, APScheduler incremental sync, pre-flight guards

preflight.py

offline dependency + config + storage validation

net_guard.py

pre-download bandwidth speed test (NetworkTooSlowError)

bootstrap.py

foreground model pre-download CLI (python bootstrap.py)

setup_wizard.py

interactive configuration wizard (python setup_wizard.py)

selftest.py

end-to-end self-test suite (python selftest.py)

.env.example

template for environment configuration

Tools

Configuration & validation

  • validate_setup(live=False) — offline pre-flight (+ optional live Jama/embedding probe).

  • configure_jama(values) — apply config at runtime, persist to .env, reload.

Jama browse (read-only, gated by pre-flight)

  • list_jama_projects() — all visible projects.

  • find_jama_project_by_name(name, exact?) — find projects by name → get id + info.

  • get_jama_item(item_id) — full single item (cleaned text).

  • get_jama_item_children(item_id) — decomposition children.

  • get_jama_item_relationships(item_id) / list_jama_project_relationships(project_id, item_id?) — relationships (cursor-paginated /relationships).

  • get_jama_item_comments(item_id) — item comments (cleaned body).

  • get_jama_item_attachments(item_id) — attachment metadata (no binary).

  • list_jama_releases(project_id) — project releases/versions.

  • list_jama_test_runs(project_id?, test_cycle_id?) — test runs.

  • list_jama_item_types() — tenant item types (id → name).

  • find_jama_item_type_by_name(name, exact?) — find item types by display name → get the id needed by item_type filters.

  • query_jama_endpoint(path, params?, all_pages?) — generic read-only GET escape hatch.

RAG / retrieval / sync monitoring

  • bootstrap_models() — async pre-download of embedding + reranker models (returns job_id).

  • get_bootstrap_progress(job_id) — poll a bootstrap job (every ~2 min) until DONE/ERROR.

  • init_jama_project(project_id) — async background init (returns job_id).

  • reinit_jama_project(project_id) — async full re-sync of an already-initialized project.

  • get_sync_progress(job_id) — poll one init/reinit/sync job's progress.

  • get_sync_status(project_id) — project monitor: in-flight job + last init/reinit/sync run + process metrics.

  • search_jama_semantics(project_id, query, ...) — Multi-Query + hybrid + RRF + cross-encoder rerank.

  • query_jama_native_metadata(project_id, ...) — exact-match metadata via /abstractitems.

Verified

All components self-tested against the live Jama instance and the local CPU embedding backend: OAuth + paginated fetch, HTML→text cleaning, Test Case step rendering, item-type mapping, DB schema (FTS5 + vec0), full RAG search, async init with progress polling, incremental sync (0 new items), concurrent download + batched embed, crash recovery (INITIALIZING → auto-resynced READY), native metadata filters (item_type / status / keyword / document_key), APScheduler startup, MCP stdio handshake, and error paths (bad project id, unknown job, nonexistent project, missing args).

The cross-encoder reranker (ms-marco-MiniLM-L-6-v2, ONNX port via fastembed) was downloaded from the HuggingFace China mirror (hf-mirror.com) and loaded on onnxruntime (no torch); verified it produces non-zero relevance scores with correct ordering (a related document scores significantly higher than an unrelated one) and that the end-to-end RAG search returns strategy=rerank results. Scores are the model's raw logits (may be negative) — only the relative order is meaningful for re-ranking. LlamaIndex is the primary RAG framework: SentenceSplitter + Document/TextNode for chunking. Multi-Query expansion is performed by the MCP LLM client and passed to the pipeline via search(sub_queries=...); when omitted, deterministic lexical variants are used.

Available Tools

23 tools
bootstrap_modelsA

Pre-download the embedding model (and optionally the reranker) so syncs never wait on them.

Downloads the local embedding model (bge-small-en-v1.5, ~130MB ONNX) into
the project-local cache, ASYNCHRONOUSLY, via onnxruntime/fastembed (no
torch/transformers dependency). Returns a job_id immediately. This is the
recommended first step after installing/configuring the server — call it
BEFORE init_jama_project so the first sync isn't slowed by a model
download. Models already cached are skipped. Poll progress with
get_bootstrap_progress roughly every 2 minutes, reporting each sample to
the user, until status is DONE or ERROR.

The cross-encoder reranker (ms-marco-MiniLM-L-6-v2, ~80MB ONNX) is only
downloaded when explicitly enabled via RERANKER_ENABLED=1. The default
search path is pure RRF ordering (benchmarking showed it outperforms
rerank), so a default install needs NO reranker weights and bootstrap
completes after the embedding model alone.

Returns:
    {"job_id": "...", "status": "RUNNING"} or, if a bootstrap is already
    running, {"job_id": "...", "status": "RUNNING", "note": "..."}.

Inputs: no named parameters.

configure_jamaA

Apply configuration values at runtime and persist them to .env.

Accepts a mapping of env-var names to values (e.g.
``{"JAMA_URL":"...","JAMA_CLIENT_SECRET":"..."}`). Writes a complete
``.env`` (merging with existing values), reloads settings in-process, and
resets the Jama/RAG/DB singletons so subsequent calls use the new config.
Secrets are written to ``.env`` on disk only; they are never echoed back.

Args:
    values: dict of {ENV_VAR: value}. Recognized keys: JAMA_URL,
            JAMA_CLIENT_ID, JAMA_CLIENT_SECRET, EMBEDDING_BASE_URL,
            EMBEDDING_API_KEY, JAMA_MCP_DB_PATH,
            and any other key in the .env template.

Returns:
    {"ok": true, "written": <abs .env path>, "applied_keys": [...]}
    or {"error": ...}

Inputs: values (required).

find_jama_item_type_by_nameA

Find Jama item types by display name (case-insensitive) and return info.

Returns the type id (needed by search_jama_semantics / query_jama_native_metadata
item_type filters) plus category, display plural and description. Matching is
substring by default; pass exact=True for full case-insensitive equality.

Args:
    name: type name or fragment (e.g. "test" matches "Test Case", "Test Plan").
    exact: if True, require full case-insensitive name equality.
    limit: max matches to return (default 20).

Returns:
    {"count","results":[{id,display,display_plural,category,category_name,
    description}, ...]}

Inputs: name (required), exact, limit.

find_jama_project_by_nameA

Find Jama projects by name (case-insensitive) and return their info.

Useful when you only know a project's name (or a fragment of it) and need
its numeric id to feed into other tools (init_jama_project,
list_jama_releases, list_jama_test_runs, …). Matching is substring by
default; pass exact=True for full case-insensitive equality.

Args:
    name: project name or fragment (e.g. "acre" matches "Acrelec").
    exact: if True, require full case-insensitive name equality.
    limit: max matches to return (default 20).

Returns:
    {"count","results":[{id,project_key,name,status,description}, ...]}

Inputs: name (required), exact, limit.

get_bootstrap_progressA

Poll the progress of a bootstrap_models job.

After calling bootstrap_models, poll this roughly every 2 minutes, reporting
each sample (status, progress %, message) to the user, until status is DONE
or ERROR. Progress is phase-based, not live bytes: the embedding
(~130MB ONNX, via fastembed) lacks per-chunk byte callbacks, so `message`
reports phase transitions rather than byte counts. When the reranker is
enabled (RERANKER_ENABLED=1) a second phase downloads the ~80MB reranker;
otherwise bootstrap completes after the embedding model alone.

Returns:
    {"job_id","project_id","kind","status","progress","total","done",
     "message","started_at","finished_at"} (project_id is 0 for a
    bootstrap job — it has no project). status is one of
    PENDING | RUNNING | DONE | ERROR.

Inputs: job_id (required).

get_jama_itemA

Fetch a single Jama item by id (full metadata + cleaned text).

Args:
    item_id: numeric string Jama item id.

Returns:
    {"item":{item_id,document_key,item_type_name,name,status,
    description,test_steps,modified_date,...}}

Inputs: item_id (required).

get_jama_item_attachmentsA

List attachment metadata for an item (no binary download).

Args:
    item_id: numeric string Jama item id.
    limit: max attachments to return (default 50).

Returns:
    {"item_id","count","results":[{id,name,file_type,file_size,
    mime_type,created_date,modified_date}, ...]}

Inputs: item_id (required), limit.

get_jama_item_childrenA

List decomposition children of an item.

Args:
    item_id: numeric string Jama item id.
    limit: max children to return (default 50).

Returns:
    {"item_id","count","results":[{item_id,document_key,item_type_name,
    name,status,modified_date}, ...]}

Inputs: item_id (required), limit.

get_jama_item_commentsA

List comments threaded on an item.

Args:
    item_id: numeric string Jama item id.
    limit: max comments to return (default 50).

Returns:
    {"item_id","count","results":[{id,body,created_by,created_date,
    modified_date}, ...]}

Inputs: item_id (required), limit.

get_jama_item_relationshipsA

List relationships (source/target) for an item.

Args:
    item_id: numeric string Jama item id.
    limit: max relationships to return (default 50).

Returns:
    {"item_id","count","results":[{id,relationship_type,source_item,
    target_item,name,modified_date}, ...]}

Inputs: item_id (required), limit.

get_sync_progressA

Poll the progress of an init, reinit or sync job.

After calling init_jama_project or reinit_jama_project, poll this roughly
every 2 minutes until status is DONE or ERROR, reporting each sample to the
user. For a project-wide view of all operations and their last runs, use
get_sync_status instead.

Returns:
    {"job_id","project_id","kind","status","progress","total","done",
     "message","started_at","finished_at"}
    status is one of PENDING | RUNNING | DONE | ERROR.

Inputs: job_id (required).

get_sync_statusA

Monitor a project's sync operations: current run + last run of each kind.

Use this to check on init_jama_project / reinit_jama_project / scheduled
sync for one project. It returns the in-flight job (if any), the most recent
init / reinit / sync job (terminal or running), the project's current state,
and lightweight process metrics. After starting an init or reinit, you may
poll this roughly every 2 minutes (reporting each sample to the user) until
active_job is null and the relevant recent.* entry is DONE/ERROR.

Args:
    project_id: Jama project id (numeric string, e.g. "20571").

Returns:
    {"project_id","project_status","last_sync_time","item_count",
     "chunk_count","active_job": {...}|null,
     "recent": {"init": {...}|null, "reinit": {...}|null,
                "sync": {...}|null},
     "process": {"rss_mb","threads","db_mb","chunks"}|null}
    Returns {"error": ...} if the project_id is not numeric or the server
    is not ready.

Inputs: project_id (required).

init_jama_projectA

Initialize a Jama project: download, clean, vectorize and index its items.

Runs as an async background task and returns a job_id immediately so the
caller (LLM) is never blocked. Poll progress with get_sync_progress roughly
every 2 minutes until status is DONE or ERROR, reporting each sample to the
user. To re-index a project that is already initialized, prefer
reinit_jama_project.

Args:
    project_id: Jama project id (numeric string, e.g. "20571").

Returns:
    {"job_id": "...", "project_id": ..., "status": "RUNNING"}

Inputs: project_id (required).

list_jama_item_typesA

List all Jama item types (id -> display name) for the tenant.

Returns:
    {"count","results":[{id,name}, ...]}

Inputs: no named parameters.

list_jama_project_relationshipsA

List relationships for a project (cursor-paginated Jama endpoint).

Jama's ``/relationships`` endpoint requires a ``project`` filter and uses
``lastId`` cursor pagination. Optionally filter to relationships involving
a specific item (client-side on fromItem/toItem).

Args:
    project_id: numeric string Jama project id.
    item_id: optional numeric string item id to filter on.
    limit: max relationships to return (default 50).

Returns:
    {"project_id","count","results":[{id,relationship_type,source_item,
    target_item,suspect,name,modified_date}, ...]}

Inputs: project_id (required), limit, item_id.

list_jama_projectsA

List all Jama projects visible to the OAuth client.

Returns:
    {"count","results":[{id,project_key,name,status,description}, ...]}

Inputs: no named parameters.

list_jama_releasesA

List releases / versions for a project.

Args:
    project_id: numeric string Jama project id.
    limit: max releases to return (default 50).

Returns:
    {"project_id","count","results":[{id,name,release_date,status,
    description,modified_date}, ...]}

Inputs: project_id (required), limit.

list_jama_test_runsA

List test runs for a project and/or test cycle.

At least one of ``project_id`` / ``test_cycle_id`` must be provided.

Args:
    project_id: optional numeric string Jama project id.
    test_cycle_id: optional numeric string Jama test cycle id.
    limit: max test runs to return (default 50).

Returns:
    {"count","results":[{id,name,status,test_cycle,item,assigned_to,
    modified_date}, ...]}

Inputs: limit, project_id, test_cycle_id.

query_jama_endpointA

Power-user escape hatch: GET any Jama REST endpoint (read-only).

``path`` is appended to ``{JAMA_URL}{API_PREFIX}`` (e.g. ``"/projects"``).
Only GET is ever issued; the client is read-only by design.

Args:
    path: REST path beginning with '/', e.g. "/items/12345".
    params: optional 'k1=v1&k2=v2' query string.
    all_pages: if True, walk all pages and return a flat list of ``data``;
               if False (default), return only the first page.

Returns:
    {"path","data": <first-page data or flat list>}

Inputs: path (required), params, all_pages.

query_jama_native_metadataA

Query Jama's native REST API directly for exact metadata filtering.

Use ONLY for precise lookups (exact document key, exact status, exact
item_type) — it returns empty on any misspelling. For topical, fuzzy or
natural-language questions, prefer `search_jama_semantics` instead.

Bypasses the vector store to answer precise questions (exact document key,
specific status, specific item type). Handles pagination internally and
returns up to 20 core metadata records.

Args:
    project_id: numeric string Jama project id.
    document_key: exact Jama document key (e.g. "SA-TC-7").
    item_type: Jama item-type id as a numeric string (e.g. "89011" for Test
               Case). Pass None for all types. Kept as a string (not int)
               to match `search_jama_semantics` and the other MCP tools,
               which all take ids as numeric strings.
    status: exact status string (e.g. "BLOCKED", "APPROVED").
    keyword: full-text 'contains' filter delegated to Jama.

Returns:
    {"project_id","count","results":[{document_key,name,item_type_name,
    status,modified_date,description}, ...]}

Inputs: project_id (required), status, keyword, item_type, +1 more.

reinit_jama_projectA

Re-initialize an already-initialized Jama project (full re-sync).

Behaves like init_jama_project but is the explicit verb for re-fetching and
re-indexing a project that has already reached READY/ERROR — e.g. after a
config change, corrupted index, or to pull a fresh full copy. Runs as an
async background task and returns a job_id immediately. Poll progress with
get_sync_progress roughly every 2 minutes until status is DONE or ERROR,
reporting each sample to the user.

Args:
    project_id: Jama project id (numeric string, e.g. "20571").

Returns:
    {"job_id": "...", "project_id": ..., "status": "RUNNING"}

Inputs: project_id (required).

search_jama_semanticsA

Semantic search over an initialized Jama project using high-precision RAG.

This is the DEFAULT tool for any non-precise question. It fuses keyword
(FTS5/BM25), vector (sqlite-vec cosine) and RRF in one call — so "like",
"keyword" and "semantic" queries are all best answered here. Prefer it over
native metadata unless the user gives an exact document key / status / item id.

Pipeline: client Multi-Query expansion -> hybrid recall (sqlite-vec +
FTS5) -> RRF fusion (with item-level dedup) -> top_k results. Ranking is
pure RRF by default: the cross-encoder reranker is DISABLED
(``RERANKER_ENABLED=0``) because benchmarking on the Lyra corpus showed it
HURT precision (Recall@50 73.3% RRF-only vs Recall@5 33.3% with rerank).
The reranker code path remains available for re-enablement.

Args:
    project_id: numeric string Jama project id (must be initialized first).
    query: the ORIGINAL natural-language search query, verbatim. It is
           always kept as the primary recall/rerank reference, so even
           when `sub_queries` is supplied you MUST pass the original user
           query here too.
    sub_queries: RECOMMENDED. Rewrite `query` into 3-5 diverse search
                 sub-queries capturing different semantic angles
                 (synonyms, broader/narrower scope, related concepts) to
                 maximize recall for RRF fusion. Pass as a JSON array of
                 strings. The server normalizes them (forces `query` to the
                 front, de-duplicates, caps at 5). If omitted, the server
                 falls back to deterministic lexical variants.
                 Example for query "how does login timeout work":
                   ["login session expiration",
                    "authentication timeout policy",
                    "user inactivity logout"]
    item_type: optional Jama item-type id to filter (e.g. "89011" for Test
               Cases, "89009" for Requirements). Pass None for all.
    top_k: final results to return (default 50). The BEIR sweep showed
           top_k=50 + candidate_k=100 is the optimal combination (highest
           Recall@50 = 73.3%). Range 1-50; must be <= candidate_k.
    candidate_k: candidate pool size after RRF fusion + item dedup
                 (default 100). A larger pool improves recall (vector+FTS
                 recall is capped by this): measured vecR@25=7%, @50=13%,
                 @100=21%, @200=34%. Note: candidate_k=200 DILUTES RRF
                 rankings and actually lowers Recall@50 to 64.4%, so 100
                 is the measured sweet spot. Range 1-500; must be >= top_k.
    modified_after: optional ISO-8601 lower bound on item modified date
                    (inclusive). Naive timestamps are assumed UTC.
                    e.g. "2024-01-01" or "2024-06-01T00:00:00Z".
    modified_before: optional ISO-8601 upper bound on item modified date
                     (inclusive). Naive timestamps are assumed UTC.

Returns:
    {"project_id","query","sub_queries_used","results":
    [{document_key,name,item_type_name,section,modified_date,text,
    score,strategy}, ...]}

Inputs: query (required), project_id (required), top_k, item_type, +4 more.

validate_setupA

Validate all dependencies, configuration and storage.

Runs the offline pre-flight (packages + env vars + SQLite). When
``live=True`` it also probes the Jama OAuth token and the embedding
endpoint with a real request, so credentials can be verified without
running a full project init.

Args:
    live: if True, perform live connectivity probes against Jama and the
          embedding endpoint (slower; uses one Jama + one embedding call).

Returns:
    {"blocking","issues":[...],"dependencies","config_issues","storage",
     "live": {"jama","embedding"} | null, "hint"}

Inputs: live.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 23 tools

    Disambiguation4/5

    Tools have mostly distinct purposes. Pairings like query_jama_native_metadata vs query_jama_endpoint are clarified by descriptions, and get_sync_progress vs get_sync_status serve different monitoring needs. Only minor potential confusion between list_jama_project_relationships and get_jama_item_relationships.

    Naming Consistency3/5

    Naming is somewhat inconsistent: some tools use verb_jama_noun (e.g., list_jama_projects) while others use verb_noun without jama (e.g., bootstrap_models). There are also variations like configure_jama and validate_setup. The pattern is not uniformly applied but remains readable.

    Tool Count4/5

    23 tools is slightly high but well-scoped for a server that handles configuration, project initialization, lookup, detail retrieval, search, and monitoring. Each tool serves a distinct function, though some consolidation might be possible.

    Completeness4/5

    The tool set covers the lifecycle of retrieving Jama data: finding projects, initializing them, searching semantically or via metadata, and fetching details. Missing create/update/delete operations, but the server is read-only by design. Minor gaps like attachment download are not critical for the intended use case.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI-powered document analysis and querying for project documentation using vector embeddings stored in Redis. Supports document upload, context-aware Q\&A, automatic test case generation, and requirements traceability through OpenAI integration.
      547 npm
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables semantic search and knowledge management for storing and querying principles, patterns, and learnings using hybrid keyword and vector search.
      1
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language queries on technical specifications and automated code compliance checks using local RAG with vector search, integrated via MCP.
      -
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to interact with IBM Engineering Lifecycle Management (ELM), including DOORS Next Generation, EWM, and ETM, for managing requirements, work items, tests, and project builds through natural language.
      MIT