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.7.tar.gz (16.7 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.7-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_setup_assist-0.8.7.tar.gz
  • Upload date:
  • Size: 16.7 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.7.tar.gz
Algorithm Hash digest
SHA256 f8c15346695156d1d95bbb86fcd9d0d40962b2b9a008b8b4db77bde1ff3bab6e
MD5 f0d30ce7e34ab5b510d0d0cdd5f897b8
BLAKE2b-256 2025c242672db3b5265b8f3d6a96b0fc5de7f16700d3f595f614f38e4ee5a357

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_setup_assist-0.8.7.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.7-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_setup_assist-0.8.7-py3-none-any.whl
Algorithm Hash digest
SHA256 64257a97362f1f3016d86e7da4bc3ac431597db5811c37d2863372214e8a8c6c
MD5 c76204956d42d1afec016267b1048cde
BLAKE2b-256 c703a90bcf2617db9b9773c494335ece99f0cf6ab9a742615d1ec52b32fe607d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_setup_assist-0.8.7-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

This release

0.8.7 This release

2 files

0.8.6

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