Skip to main content
Glama
Altus Commonware Research MCP

Altus Commonware Research MCP

Official
by altuslabsxyz

Altus Commonware Research MCP

A stdio MCP server that queries Commonware blockchain research via NotebookLM. Each teammate runs it locally — NotebookLM workspace access controls who can query.

Prerequisites

  1. Google Chrome must be installed (used for the built-in login flow via Chrome DevTools Protocol).

  2. (Optional) Create a GitHub personal access token (for search_implementation / suggestion / factcheck tools):

  3. Clone and build:

    git clone <repo-url>
    cd altus-commonware-research-mcp
    npm install
    cp .env_example .env

    Then build:

    npm run build
  4. Build the local code search index (requires GITHUB_TOKEN and REFERENCE_REPOS in .env):

    npm run setup-index

    This fetches file trees and content from all REFERENCE_REPOS and stores them in a local SQLite FTS5 database (data/index.db) for fast code search. To re-index later (e.g. after upstream changes), run with --force:

    npm run setup-index -- --force

    You can also re-index at runtime via the setup_db MCP tool.

  5. Authenticate with NotebookLM by calling the login tool. This launches Chrome, lets you sign in to your Google account, and extracts auth cookies automatically.

Related MCP server: notebooklm-mcp-2026

Configuration

Edit .env to configure the server:

NOTEBOOK_ID=<your-notebook-id>
REFERENCE_REPOS=commonwarexyz/alto,commonwarexyz/monorepo,tempoxyz/tempo,paradigmxyz/reth
GITHUB_TOKEN=ghp_...

Variable

Required

Description

NOTEBOOK_ID

Yes

NotebookLM notebook ID (from the notebook URL)

REFERENCE_REPOS

Yes

Comma-separated list of GitHub repos (owner/name). These are the repos that suggestion, search_implementation, and factcheck search against.

GITHUB_TOKEN

No

GitHub personal access token. No scopes needed for public repos, but recommended to avoid rate limits.

SQLITE_DB_PATH

No

Path to SQLite database file. Default: data/index.db in the project root.

The REFERENCE_REPOS list determines which repositories the tools can search. Tools like suggestion and factcheck auto-select the most relevant repos from this list per query, or you can override with the repos argument.

Connect to MCP

Claude Code

Add to your Claude Code MCP settings (~/.claude/settings.json or project .mcp.json):

{
  "mcpServers": {
    "altus-research": {
      "command": "node",
      "args": ["/absolute/path/to/altus-commonware-research-mcp/dist/index.js"]
    }
  }
}

Gemini CLI

Add to ~/.gemini/settings.json:

{
  "mcpServers": {
    "altus-research": {
      "command": "node",
      "args": ["/absolute/path/to/altus-commonware-research-mcp/dist/index.js"]
    }
  }
}

Codex CLI

Add to ~/.codex/config.toml:

[mcp_servers.altus-research]
command = "node"
args = ["/absolute/path/to/altus-commonware-research-mcp/dist/index.js"]

Tools

login

Authenticate with NotebookLM. Launches Chrome, waits for you to sign in to your Google account, and extracts auth cookies via CDP.


refresh_auth

Reload NotebookLM auth tokens from disk. Use this after re-running login in another session, or if tokens were updated externally.


query

Ask a question about Altus Commonware Research directly to NotebookLM — useful for quick lookups on concepts, design rationale, or protocol details.

  • Arguments:

    • question: The research question to ask.

Example:

Q: "What is the actor pattern in Commonware and why is it preferred over mutexes?"

A: The actor pattern in Commonware uses mailbox-based async message passing where each actor owns its state exclusively. This avoids mutex contention and deadlocks — actors communicate by sending messages rather than sharing memory. The one-writer/many-readers model ensures each piece of state has a single owner, which simplifies reasoning about concurrency and improves throughput under high parallelism…


suggestion

Get an architectural implementation suggestion that combines NotebookLM research with actual code snippets from reference repos. This is a two-stage flow:

Example:

Q: "How would I implement a mempool in Commonware?"

A:

Summary

  • Mempools in Commonware buffer pending payloads at the primitive level, partitioned by namespace.

  • The Alto reference client implements this as an actor that owns a BTreeMap of pending containers, drained by the proposer on each build cycle.

  • Key design decision: the mempool actor uses one-writer ownership — only the mempool actor mutates the pending set; the proposer reads a snapshot via async request.

(followed by reasoning, code examples from reference repos, and a suggested search_implementation query)


search_implementation

Search reference repository and return source code snippets explaining how the feature is actually implemented.

Example:

Q: "How Tempo implemented Automaton trait that connect Commonware Simplex consensus engine"

A:

Summary

  • Tempo connects to Commonware Simplex by using an application actor as the consensus-execution bridge, explicitly documented as implementing commonware_consensus::Automaton.

  • Commonware Simplex is parameterized over A: CertifiableAutomaton, so Tempo plugs its application-side automaton adapter into that slot.

  • Architecturally, the flow is Simplex consensus actors → automaton interface → Tempo application/executor/marshal actors.

Implementation Details

Tempo's consensus engine defines the Automaton bridge point — application is annotated as the component that implements the consensus automaton interface, sitting next to executor/marshal synchronization actors.

// crates/commonware-node/src/consensus/engine.rs (lines 438–454)

/// Acts as the glue between the consensus and execution layers implementing
/// the `[commonware_consensus::Automaton]` trait.
application: application::Actor<TContext>,

/// Responsible for keeping the consensus layer state and execution layer
/// states in sync.
executor: crate::executor::Actor<TContext>,
executor_mailbox: crate::executor::Mailbox,

Simplex requires an automaton type parameter — the engine is generic over A: CertifiableAutomaton, making the automaton the formal interface between consensus and the application/execution domain.

// consensus/src/simplex/engine.rs (lines 19–29)

pub struct Engine<
    E: BufferPooler + Clock + CryptoRngCore + Spawner + Storage + Metrics,
    S: Scheme<D>,
    ...
    A: CertifiableAutomaton<Context = Context<D, S::PublicKey>, Digest = D>,
    ...
> {

(truncated — full output includes construction-site evidence and flow analysis)


factcheck

Validate a document (or a set of claims) against actual source code in reference repos.

Example:

Q: "Validate this document: [Alto architecture and Simplex consensus flow documentation...]"

A:

Result

  • Core Alto/Simplex claims are mostly supported.

  • A non-trivial subset came back INSUFFICIENT_EVIDENCE (tool retrieval failed to find enough code proof), not NOT_VERIFIED.

  • No direct NOT_VERIFIED verdicts were returned.

Claims with strong support (Verified)

  • Alto is minimal and omits transaction execution/state logic.

  • Alto block type includes parent, height, timestamp, and precomputed digest.

  • Simplex voter/application interaction (propose/verify) is present.

  • Batcher vote verification/certificate construction behavior is supported.

  • Alto fixed-epoch config (u64::MAX) and timeout constants (~256, ~32) are supported.

  • Tempo has Reth/engine-validator integration evidence.

Claims not fully proven (INSUFFICIENT_EVIDENCE or Partially Verified)

  • Some marshal persistence/dataflow claims (proof incomplete at flow level).

  • verify → marshal.subscribe → return result path (not retrieved with sufficient evidence).

  • Tempo epoch-manager and DKG epoch-transition claims (not sufficiently retrieved).

  • Some conceptual/proof statements (PBFT/Simplex correctness arguments) are only partially verifiable from implementation code.

Practical conclusion

  • Your document is directionally accurate for Alto architecture and Simplex flow.

  • Treat Tempo epoch/DKG sections and some deep flow claims as "needs explicit code citations" before calling it fully validated.

(truncated — full output includes claim-by-claim verdict table, evidence appendix, and fix suggestions)


setup_db

Initialize or re-index the local SQLite FTS5 search index at runtime. Same as npm run setup-index but callable as an MCP tool.

  • Arguments:

    • repos (optional): Subset of REFERENCE_REPOS to index.

    • force (optional): Re-index even if already indexed.

Available Tools

15 tools
factcheckFactCheck — PlanA

Stage 1 of fact-checking: analyzes a document against reference repositories.

Returns the document, repository context (README + source file tree), and instructions for you (the AI) to extract validation items. After analyzing, call factcheck_validate with the items you identified.

IMPORTANT: This is a closed-loop pipeline. Do NOT call query, suggestion, or any NotebookLM-backed tool during fact-checking. Do NOT use web search or fetch external URLs. All evidence must come from factcheck_validate only.

Available repositories: octocat/Hello-World, facebook/react

Inputs: document (required), repos, claims.

factcheck_validateFactCheck — ValidateA

Stage 2 of fact-checking: retrieves actual code evidence for each validation item and returns it for you (the AI) to judge.

Call this after factcheck has helped you identify items to validate. For each item, provide the claim text, target repository, and search keywords or specific file paths. The tool fetches the code and returns it alongside each claim for your assessment.

IMPORTANT: Do NOT call query, suggestion, or any NotebookLM-backed tool. Do NOT use web search or fetch external URLs. Base all verdicts exclusively on the code evidence returned by this tool.

Available repositories: octocat/Hello-World, facebook/react

Inputs: items (required), document.

get_fileB

Get the content of a file from a repository, with optional line range.

Inputs: path (required), repo (required), end_line, start_line.

get_file_treeA

Get an ASCII directory tree for a repository, optionally scoped to a subdirectory.

Inputs: repo (required), path.

list_source_filesB

List files in a repository, optionally filtered by directory prefix.

Inputs: repo (required), path.

list_sourcesA

List all configured reference repositories and their indexing status.

Inputs: no named parameters.

loginLogin to NotebookLMA

Authenticates with NotebookLM by launching Chrome for Google sign-in. A Chrome window will open — the user must complete the Google login. Once logged in, auth tokens are saved automatically.

Inputs: no named parameters.

queryQuery ResearchA

Ask a question about Commonware research via NotebookLM. Run nlm login first if not authenticated. Present the response exactly as received — do not reformat, summarize, or restructure it.

Inputs: question (required).

refresh_authRefresh Auth TokensA

Reloads authentication tokens from disk. Call this after re-authenticating or if queries start failing.

Inputs: no named parameters.

search_codeA

Search indexed code using FTS5 with BM25 ranking. Supports substring (trigram, min 3 chars) and word (prefix) modes. Returns ranked results with code snippets.

Inputs: query (required), mode, repo, file_type, +1 more.

search_fileA

Search within a specific file for a pattern (case-insensitive substring match) and return matching lines with context.

Inputs: path (required), repo (required), pattern (required), context_lines.

search_implementationSearch Implementation CodeA

Search reference repos (octocat/Hello-World, facebook/react) and return source code snippets. ONE call does everything: searches file trees, fetches matching code, returns snippets.

MANDATORY FLOW: suggestion must run first, then search_implementation.

MANDATORY FINALITY: after this tool returns, do not run any other tool or local check; return this output directly.

Usage

  • Call ONCE per question. Do NOT call repeatedly.

  • Use SHORT keyword queries (2-4 words): 'subblock mempool', 'consensus validator'

  • Repository scope is inherited from the latest suggestion call.

  • If no suggestion context exists, this tool returns a precondition response telling the client to call suggestion first.

  • Optional repos must be inside inherited scope.

  • Response includes formatting instructions — follow them exactly.

Inputs: query (required), repos.

select_repositoriesSelect RepositoriesA

Select the most relevant repositories from REFERENCE_REPOS (octocat/Hello-World, facebook/react) for a given document/query using retrieval evidence scores.

Inputs: input (required), repos, keywords, max_repos.

setup_dbC

Initialize the local SQLite FTS5 index and index repositories. Fetches file trees and content from GitHub, stores in local DB for fast search.

Inputs: force, repos.

suggestionImplementation SuggestionA

Get an implementation suggestion combining Commonware research knowledge and actual code from reference repos. Ask any implementation question and get back a structured response with Summary, Reasoning, and Details.

FLOW MODEL: stage 1 is suggestion only; stage 2 (search_implementation) is user-triggered in the same session.

If repos is omitted, the tool auto-selects repos from REFERENCE_REPOS.

Inputs: question (required), repos.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 15 tools

    Disambiguation2/5

    Several tools have overlapping purposes: search_implementation, search_code, and search_file all return code snippets, while query and suggestion both accept questions. The factcheck and factcheck_validate tools are distinct stages, but the many code-search tools create ambiguity and potential misselection.

    Naming Consistency3/5

    Most tools follow a verb_noun pattern (list_sources, get_file, search_code), but login, query, and suggestion deviate, and factcheck_validate is a compound verb. This mixed convention is readable but not fully consistent.

    Tool Count4/5

    15 tools is at the upper limit of a well-scoped set. While some tools could be consolidated, the count is appropriate for the server's multi-workflow scope (authentication, querying, implementation search, fact-checking, repo browsing).

    Completeness3/5

    The server covers authentication, NotebookLM queries, implementation suggestions, fact-checking, and repo browsing/searching. However, there is no way to manage reference repositories (add/remove) or to list available NotebookLM documents, and the factcheck workflow forbids using other tools, limiting flexibility.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      An MCP server that interfaces with Google NotebookLM to enable autonomous academic research and systematic knowledge management. It allows users to perform deep web searches and automatically generate study artifacts like research reports, presentation slides, and audio overviews.
      6
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      Secure MCP server for querying Google NotebookLM notebooks. Enables AI assistants to list notebooks, read sources, and ask the NotebookLM AI questions about your sources.
      34 PyPI
      19
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server for querying Google NotebookLM notebooks, enabling AI assistants to list notebooks, read sources, and ask questions about them.
      MIT