Skip to main content

An MCP setup assistant package

Project description

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.

Project details


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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_setup_assist-0.7.0.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mcp_setup_assist-0.7.0.tar.gz
Algorithm Hash digest
SHA256 6a3fb07f19e4a3f8cc1517b0d36a8a3849652def23caa74be5cbb786844dd7f9
MD5 a37ed7432a80f8f108efc4136f161326
BLAKE2b-256 6230b6504dd5dc8933258689444d6cc800d73330d4e8b4451797c65136665e6e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mcp_setup_assist-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2948930c50bb31f817677c9dd0bb0ba822c6243cbe1b08826e3da9bfc2c8b6f4
MD5 56e91ce07bcf7ebd150841e1d367f27b
BLAKE2b-256 0f3028b0bb6729c590e63efc6d52e4efc3d8c97397d34d4ca1a737b241b9ce2d

See more details on using hashes here.

Provenance

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page