### Install and Import ExampleLib Parser Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/benchmarks/replay/corpus/rst/index.rst Install ExampleLib using pip and import the parse function. This is the basic setup for parsing log files. ```python pip install examplelib ``` ```python from examplelib import parse result = parse(open("server.log")) ``` -------------------------------- ### Clone and Setup jDocMunch-MCP Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/CONTRIBUTING.md Use these commands to clone the repository, install the package in editable mode with test dependencies, and run the test suite. ```bash git clone https://github.com/jgravelle/jdocmunch-mcp cd jdocmunch-mcp pip install -e ".[test]" pytest tests/ -q ``` -------------------------------- ### Initialize jDocMunch MCP with Hooks Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md One-command setup for jDocMunch MCP, including client detection, configuration patching, policy installation, enforcement hooks, and directory indexing. Use --dry-run to preview or --yes for non-interactive mode. ```bash jdocmunch-mcp init ``` -------------------------------- ### Verify mypackage Installation Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/tests/fixtures/docs/sample.adoc Run this command to confirm that mypackage has been installed correctly. This command checks the installed version. ```bash mypackage --version ``` -------------------------------- ### Install Package from Source Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/benchmarks/replay/corpus/markdown/install.md Clone the repository and install the package in editable mode, including development dependencies. ```bash git clone https://github.com/example/repo.git cd repo pip install -e .[dev] ``` -------------------------------- ### Install Package with Pip Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/benchmarks/replay/corpus/markdown/install.md Use this command for a quick installation of the package from PyPI. ```bash pip install example-package ``` -------------------------------- ### Install mypackage Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/tests/fixtures/docs/sample.adoc Use this command to install the package via pip. Ensure Python 3.10 or later is installed. ```bash pip install mypackage ``` -------------------------------- ### Verify Package Installation Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/benchmarks/replay/corpus/markdown/install.md Run this command to confirm that the package has been installed correctly and check its version. ```bash example-cli --version ``` -------------------------------- ### Initialize jDocMunch MCP Hooks Only Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md Command to install only the jDocMunch MCP enforcement hooks without performing other setup steps. ```bash jdocmunch-mcp init --hooks ``` -------------------------------- ### Install jdocmunch-mcp Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/USER_GUIDE.md Installation methods for the jdocmunch-mcp package. ```bash pip install jdocmunch-mcp ``` ```bash uvx jdocmunch-mcp --help ``` ```bash git clone https://github.com/jgravelle/jdocmunch-mcp.git cd jdocmunch-mcp pip install -e . ``` -------------------------------- ### Configure Claude Desktop MCP Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/USER_GUIDE.md Configuration examples for integrating jdocmunch-mcp with Claude Desktop. ```json { "mcpServers": { "jdocmunch": { "command": "uvx", "args": ["jdocmunch-mcp"] } } } ``` ```json { "mcpServers": { "jdocmunch": { "command": "uvx", "args": ["jdocmunch-mcp"], "env": { "GITHUB_TOKEN": "ghp_...", "ANTHROPIC_API_KEY": "sk-ant-..." } } } } ``` ```json { "mcpServers": { "jdocmunch": { "command": "uvx", "args": ["--with", "openai", "jdocmunch-mcp"], "env": { "MINIMAX_API_KEY": "mx-...", "JDOCMUNCH_SUMMARIZER_PROVIDER": "minimax" } } } } ``` -------------------------------- ### Example TOML Configuration Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/benchmarks/replay/corpus/markdown/configuration.md This TOML snippet shows the structure for configuring the application, including required and optional fields. ```toml [default] api_key = "..." endpoint = "https://api.example.com" timeout_seconds = 60 retry_count = 5 log_level = "DEBUG" ``` -------------------------------- ### Import Libraries and Configure Environment Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/tests/fixtures/docs/sample.ipynb Imports necessary libraries like pandas and numpy. Ensure these libraries are installed before running. ```python import pandas as pd import numpy as np print('Libraries loaded') ``` -------------------------------- ### Tool Response Metadata Example Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md This example shows the '_meta' envelope included in jDocMunch tool responses, detailing latency, token savings, and estimated costs avoided for the call. ```json "_meta": { "latency_ms": 12, "sections_returned": 5, "tokens_saved": 1840, "total_tokens_saved": 94320, "cost_avoided": { "claude_opus": 0.0276, "gpt5_latest": 0.0184 }, "total_cost_avoided": { "claude_opus": 1.4148, "gpt5_latest": 0.9432 } } ``` -------------------------------- ### Import and Parse Log File Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/benchmarks/replay/corpus/notebook/quickstart.ipynb Installs the library via pip and imports the parser. Use this for basic parsing of files that fit into memory. ```python from examplelib import parse result = parse(open('server.log')) print(len(result), 'events') ``` -------------------------------- ### Verify jDocMunch MCP Installation Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md Command to verify that jDocMunch MCP has been installed correctly by checking its help message. ```bash jdocmunch-mcp --help ``` -------------------------------- ### Install jDocMunch MCP Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md Command to install the jDocMunch MCP package using pip. This is a prerequisite for using the tool. ```bash pip install jdocmunch-mcp ``` -------------------------------- ### Upgrade Pip and Wheel Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/benchmarks/replay/corpus/markdown/install.md If pip installation fails with a build error related to 'wheel', upgrade pip and wheel first. ```bash pip install --upgrade pip wheel ``` -------------------------------- ### Local Repository Indexing and Retrieval Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/USER_GUIDE.md Example usage for indexing a local folder and retrieving its table of contents using the bare folder name. ```json index_local: { "path": "/home/user/docs" } get_toc: { "repo": "docs" } ``` -------------------------------- ### Get Pods with Wide Output Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/benchmarks/jDocMunch_Benchmark_Kubernetes.md This command retrieves a list of running Pods and displays detailed information, including their IP addresses and the nodes they are scheduled on. This is useful for verifying Pod placement after applying configurations. ```bash kubectl get pods --output=wide ``` -------------------------------- ### Import and run mypackage Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/tests/fixtures/docs/sample.html Basic implementation for initializing and executing the library. ```python import mypackage mypackage.run() ``` -------------------------------- ### Configure ExampleLib Parser with ParserConfig Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/benchmarks/replay/corpus/rst/index.rst Configure the parser by passing a ParserConfig instance. Use strict=True to raise ParseError for malformed lines. ```python from examplelib import parse, ParserConfig cfg = ParserConfig(strict=True, encoding="utf-8") result = parse(open("server.log"), cfg) ``` -------------------------------- ### Section ID Format Examples Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/USER_GUIDE.md Examples of the hierarchical section ID format used for identifying documentation segments. ```text owner/repo::README.md::installation#1 owner/repo::docs/config.md::installation/prerequisites#3 owner/repo::docs/config.md::usage/configuration/advanced-configuration#4 local/myproject::guide.md::quick-start#1 ``` -------------------------------- ### Index and Browse Documentation Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/USER_GUIDE.md Commands for indexing local folders and repositories. ```text index_local: { "path": "/path/to/docs" } get_toc: { "repo": "docs" } get_document_outline: { "repo": "docs", "doc_path": "README.md" } ``` ```text index_repo: { "url": "owner/repo" } get_toc_tree: { "repo": "owner/repo" } ``` -------------------------------- ### Example Stable Section IDs Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md Provides concrete examples of stable section IDs generated by jDocMunch for different document structures and locations. ```text owner/repo::docs/install.md::installation#1 ``` ```text owner/repo::docs/install.md::installation/prerequisites#3 ``` ```text owner/repo::README.md::usage/configuration/advanced-configuration#4 ``` ```text local/myproject::guide.md::configuration#2 ``` -------------------------------- ### Index Local Documentation Folder Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md Use this command to index a local directory containing documentation files. ```json index_local: { "path": "/path/to/docs" } ``` -------------------------------- ### Initialize jCodeMunch and jDocMunch Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md Commands to run initialization for both jCodeMunch and jDocMunch, ensuring all necessary components and hooks are set up for both tools. ```bash jcodemunch-mcp init jdocmunch-mcp init ``` -------------------------------- ### Index GitHub Repository Documentation Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md Use this command to index documentation from a GitHub repository. ```json index_repo: { "url": "owner/repo" } ``` -------------------------------- ### Get Document Outline Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md Retrieves the section hierarchy for a specific document within a GitHub repository. ```json get_document_outline: { "repo": "owner/repo", "doc_path": "docs/config.md" } ``` -------------------------------- ### Get Specific Section Content Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md Retrieves the full content of a specific section using its unique ID. ```json get_section: { "repo": "owner/repo", "section_id": "owner/repo::docs/config.md::authentication#1" } ``` -------------------------------- ### Configure Local Documentation Indexing Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/SPEC.md Use this JSON configuration to index a local documentation folder. Set `incremental` to `false` to force a full re-index. ```json { "path": "/path/to/docs", "use_ai_summaries": true, "extra_ignore_patterns": ["drafts/**"], "follow_symlinks": false, "incremental": true } ``` -------------------------------- ### client-go Credential Plugins Documentation Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/benchmarks/jDocMunch_Benchmark_Kubernetes.md Explains the purpose and usage of client-go credential plugins for external authentication protocols in Kubernetes tools. ```markdown ## client-go credential plugins [stable since v1.22] `k8s.io/client-go` and tools using it such as `kubectl` and `kubelet` are able to execute an external command to receive user credentials. This feature is intended for client side integrations with authentication protocols not natively supported by `k8s.io/client-go` (LDAP, Kerberos, OAuth2, SAML, etc.). The plugin implements the protocol specific logic, then returns opaque credentials to use. Almost all credential plugin use cases require a server side component with support for the webhook token authenticator to interpret the credential format produced by the client plugin. Note: Earlier versions of `kubectl` included built-in support for authenticating to AKS and GKE, but this is no longer present. ``` -------------------------------- ### Get Table of Contents (Flat List) Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md Retrieves a flat list of sections in document order from a GitHub repository. ```json get_toc: { "repo": "owner/repo" } ``` -------------------------------- ### Get Table of Contents (Tree Structure) Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md Retrieves a nested tree structure of sections per document from a GitHub repository. ```json get_toc_tree: { "repo": "owner/repo" } ``` -------------------------------- ### Configure OpenClaw MCP Server with AI Summaries Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md This configuration includes optional AI summary settings and an Anthropic API key. ```json { "mcpServers": { "jdocmunch": { "command": "uvx", "args": ["jdocmunch-mcp"], "transport": "stdio", "env": { "ANTHROPIC_API_KEY": "${ANTHROPIC_API_KEY}" } } } } ``` -------------------------------- ### Run Replay Benchmark Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/todo.md Execute the replay benchmark against a specified baseline. The gate parameter controls the acceptable deviation. ```bash run_replay --baseline --gate 0.02 ``` -------------------------------- ### Get Section Hierarchy for a Document Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/SPEC.md Obtain the heading hierarchy for a single document within an indexed repository. This is lighter than `get_toc` if the document is already known. ```json { "repo": "owner/repo", "doc_path": "docs/configuration.md" } ``` -------------------------------- ### Configure OpenClaw MCP Server Directly Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md Add this JSON entry to `~/.openclaw/openclaw.json` to configure jDocMunch-MCP. ```json { "mcpServers": { "jdocmunch": { "command": "uvx", "args": ["jdocmunch-mcp"], "transport": "stdio" } } } ``` -------------------------------- ### Section ID Format Example Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/SPEC.md Illustrates the structure of section IDs used for referencing content. These IDs are hierarchical and include repository, document path, slug, and heading level. ```text {repo}::{doc_path}::{slug}#{level} ``` ```text owner/repo::README.md::installation#1 ``` ```text owner/repo::docs/config.md::authentication-options#2 ``` ```text local/myproject::guide.md::quick-start#1 ``` -------------------------------- ### Configure Agent System Prompt File in OpenClaw Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/README.md Point your OpenClaw agent to its system prompt file in `~/.openclaw/openclaw.json`. ```json { "agents": { "named": { "researcher": { "systemPromptFile": "~/.openclaw/agents/researcher.md" } } } } ``` -------------------------------- ### Configure jdocmunch tool profile via environment variables Source: https://github.com/jgravelle/jdocmunch-mcp/blob/master/CHANGELOG.md Set the JDOCMUNCH_TOOL_PROFILE environment variable to 'core' to limit the number of tools to 13, fitting under the 50-tool cap imposed by Google Antigravity. ```json // per-server env vars "jdocmunch": { "env": { "JDOCMUNCH_TOOL_PROFILE": "core" } } ```