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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_setup_assist-0.8.6.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_setup_assist-0.8.6-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_setup_assist-0.8.6.tar.gz.

File metadata

  • Download URL: mcp_setup_assist-0.8.6.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mcp_setup_assist-0.8.6.tar.gz
Algorithm Hash digest
SHA256 bc623b84b7129fc40186416d52c694c7d030d68aec24265745f568b0d0371cd0
MD5 8111e8d51fae0c666df9cc3dd57082fa
BLAKE2b-256 5f7ae3bb9b9de409e26881198eb595b46b1c04c723fa10827856ebd3a8e5a4e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_setup_assist-0.8.6.tar.gz:

Publisher: publish.yml on Eki23/mcp-setup-assistant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_setup_assist-0.8.6-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_setup_assist-0.8.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d6b6c9059d9cce7d31f3220018ab60f0be402403df568982ea988ffd8a1b13d4
MD5 8f11a6f29dc51d4b68465814dc9462ef
BLAKE2b-256 ae6b0e097a3083610671b434ac893c2406ba11220cc136f8b21fd6129d3d3a66

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_setup_assist-0.8.6-py3-none-any.whl:

Publisher: publish.yml on Eki23/mcp-setup-assistant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.9.0

2 files

0.8.7

2 files

This release

0.8.6 This release

2 files

0.8.5

2 files

0.8.4

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

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