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-mcpknowledge graph — either as a single combined project (default) or as separate independent projects - Registers the
codebase-memory-mcpMCP server with your IDE (Amazon Q, Claude, Cursor) - Copies agent rules and
.cbmignorefiles into the correct IDE config locations - Provides a generic CLI builder so consumers expose a consistent
init/indexinterface
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a3fb07f19e4a3f8cc1517b0d36a8a3849652def23caa74be5cbb786844dd7f9
|
|
| MD5 |
a37ed7432a80f8f108efc4136f161326
|
|
| BLAKE2b-256 |
6230b6504dd5dc8933258689444d6cc800d73330d4e8b4451797c65136665e6e
|
Provenance
The following attestation bundles were made for mcp_setup_assist-0.7.0.tar.gz:
Publisher:
publish.yml on Eki23/mcp-setup-assistant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_setup_assist-0.7.0.tar.gz -
Subject digest:
6a3fb07f19e4a3f8cc1517b0d36a8a3849652def23caa74be5cbb786844dd7f9 - Sigstore transparency entry: 1966698450
- Sigstore integration time:
-
Permalink:
Eki23/mcp-setup-assistant@dd0ab9a94eb63aa18c144fe23865db30dec0b2dd -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Eki23
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dd0ab9a94eb63aa18c144fe23865db30dec0b2dd -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mcp_setup_assist-0.7.0-py3-none-any.whl.
File metadata
- Download URL: mcp_setup_assist-0.7.0-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2948930c50bb31f817677c9dd0bb0ba822c6243cbe1b08826e3da9bfc2c8b6f4
|
|
| MD5 |
56e91ce07bcf7ebd150841e1d367f27b
|
|
| BLAKE2b-256 |
0f3028b0bb6729c590e63efc6d52e4efc3d8c97397d34d4ca1a737b241b9ce2d
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_setup_assist-0.7.0-py3-none-any.whl -
Subject digest:
2948930c50bb31f817677c9dd0bb0ba822c6243cbe1b08826e3da9bfc2c8b6f4 - Sigstore transparency entry: 1966698549
- Sigstore integration time:
-
Permalink:
Eki23/mcp-setup-assistant@dd0ab9a94eb63aa18c144fe23865db30dec0b2dd -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Eki23
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dd0ab9a94eb63aa18c144fe23865db30dec0b2dd -
Trigger Event:
workflow_dispatch
-
Statement type: