Skip to main content

mcp-setup-assist

Generic utilities for configuring codebase-memory-mcp in any Python project. Designed as a foundation for project-specific setup tools — handle the mechanics here, keep only project-specific defaults in the consumer package.

What It Does

  • Resolves installed packages to their source directories via pip show (supports regular, editable, and system-wide installs)
  • Indexes one or more source trees into a codebase-memory-mcp knowledge graph — either as a single combined project (default) or as separate independent projects
  • Registers the codebase-memory-mcp MCP server with your IDE (Amazon Q, Claude, Cursor)
  • Copies agent rules and .cbmignore files into the correct IDE config locations
  • Provides a generic CLI builder so consumers expose a consistent init / index interface

Installation

pip install mcp-setup-assist

Building on top of this package

mcp-setup-assist is a library, not an end-user tool. The typical pattern is to create a thin project-specific package that defines defaults and delegates to the generic functions:

# myproject_mcp/index.py
from mcp_setup_assist.indexing import run_index as _run_index
from myproject_mcp.templates import get_template_path

PACKAGES = ["my-lib", "my-other-lib"]
PROJECT_FOLDERS = ["src", "custom"]
STAGING_DIR = ".myproject-index"

def run_index(venv_path, extra_packages=None, extra_folders=None,
              include_system_packages=True, separate_packages=False):
    _run_index(
        venv_path=venv_path,
        packages=PACKAGES + (extra_packages or []),
        project_folders=PROJECT_FOLDERS + (extra_folders or []),
        cbmignore_file=get_template_path(".cbmignore"),
        include_system_packages=include_system_packages,
        separate_packages=separate_packages,
        staging_dir_name=STAGING_DIR,
    )
# myproject_mcp/cli.py
from mcp_setup_assist.cli import run_cli
from myproject_mcp.init import run_init
from myproject_mcp.index import run_index

def main():
    run_cli("myproject-mcp", "Configure codebase-memory-mcp for My Project",
            init_fn=run_init, index_fn=run_index)

Modules

mcp_setup_assist.indexing

Symbol Description
run_index(venv_path, packages, project_folders, cbmignore_file, *, include_system_packages=True, separate_packages=False, staging_dir_name=".cbm-index") Resolve packages, deduplicate, and index — combined by default
index_combined(named_folders, project_root, cbmignore_file, staging_dir_name=".cbm-index") Stage multiple source trees via directory junctions/symlinks and index as one project
ensure_gitignore(project_root, entry) Append an entry to .gitignore, creating it if needed
apply_cbmignore(target_path, cbmignore_file) Copy a .cbmignore into a directory
index_path(path) Run codebase-memory-mcp index_repository on a path; returns True on success
STAGING_DIR Default staging directory name: ".cbm-index"

Package resolution uses pip show — the venv Python is tried first, system Python second (when include_system_packages=True). Editable installs return their source tree; regular installs return the correct subdirectory inside site-packages via top_level.txt.

Combined indexing creates a staging directory containing directory junctions (Windows) or symlinks (Unix) for each source tree, then indexes that single directory. This makes the full inheritance chain visible as one graph. The staging directory is added to .gitignore automatically.

mcp_setup_assist.agents

Symbol Description
run_init(agents, rules_file, cbmignore_file) Register the MCP server and copy rules for each agent
write_mcp_config(project_root, agent) Write (or merge) mcp.json / settings.json
write_rules(project_root, agent, rules_file) Copy rules file to the agent's rules directory
write_cbmignore(project_root, cbmignore_file) Copy .cbmignore to the project root
AGENT_CONFIGS Config paths for amazonq, claude, cursor
MCP_SERVER_CONFIG The codebase-memory-mcp server JSON block

mcp_setup_assist.cli

Symbol Description
run_cli(prog, description, init_fn, index_fn) Build and run the standard init / index CLI

The index subcommand exposes:

Flag Default Description
--venv PATH .venv Path to the virtual environment
--package NAME — Extra package(s) to index (comma-separated or repeatable)
--folder PATH — Extra folder(s) to index (comma-separated or repeatable)
--include-system-packages / --no-… enabled Fall back to system Python for packages not found in the venv
--index-as-separate-packages disabled Index each source tree independently instead of combining

License

Apache 2.0 — see LICENSE.

Metadata

Release files for mcp-setup-assist 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-setup-assist 0.9.0
File Size Uploaded Provenance Actions
mcp_setup_assist-0.9.0.tar.gz 16.8 kB With provenance Details for mcp_setup_assist-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-setup-assist 0.9.0
File Interpreter ABI Platform Actions
mcp_setup_assist-0.9.0-py3-none-any.whl Python 3 none any Details for mcp_setup_assist-0.9.0-py3-none-any.whl

Total release size: 30.1 kB

Release files / mcp_setup_assist-0.9.0.tar.gz

Download URL mcp_setup_assist-0.9.0.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2d67703d74487896462294353eb970b6a0e8d24c59bbee6b38011ae5f816764c
BLAKE2b-256 checksum
How to use checksums
2d81424741a5ad0d071d674f0882076ee82db9e5d86c392c63b339b3c67463a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / mcp_setup_assist-0.9.0-py3-none-any.whl

Download URL mcp_setup_assist-0.9.0-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47084dbce4b0464785641a0d062fe576b388d8ddb4f11ca0f14db2304c3cb921
BLAKE2b-256 checksum
How to use checksums
8d9b14c244090a77b32a6e73deca2cf91d5913f829bea8af52e264a468a9077e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Security for mcp-setup-assist 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcp_setup_assist-0.9.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page