Skip to content

Conversation

marksolly
Copy link

@marksolly marksolly commented Aug 8, 2025

Interact directly with the indexer's services. Each invocation of this tool behaves as a fresh start of the MCP server. Good for performing quick verification tests during development and also aids automated testing.

Running the CLI:

# Index a project
python src/code_index_mcp/cli.py index --path /path/to/your/project

# Call a specific tool with parameters
python src/code_index_mcp/cli.py call <tool_name> --params '{"param1": "value1"}' --path /path/to/your/project

Available CLI Commands:

  • index: Initializes and runs the indexing process for a specified project path.
  • call: Invokes a specific tool method with JSON parameters.

Example call Usage:

# Search for code
uv run python src/code_index_mcp/cli.py call search_code_advanced --params '{"pattern": "class.*", "file_pattern": "*.py"}' --path /path/to/your/project

# Get file summary
uv run python src/code_index_mcp/cli.py call get_file_summary --params '{"file_path": "src/module.py"}' --path /path/to/your/project

# Refresh index
uv run python src/code_index_mcp/cli.py call refresh_index --params '{}' --path /path/to/your/project

@jacksenechal
Copy link

Do you know about @modelcontextprotocol/inspector? I'm not sure if that fills the same use-case as this.

npx -y @modelcontextprotocol/inspector uvx code-index-mcp
Screenshot From 2025-08-08 14-05-02

@marksolly
Copy link
Author

marksolly commented Aug 8, 2025 via email

@marksolly
Copy link
Author

Closing this PR as it is no longer compatible with main in this repo

@marksolly marksolly closed this Aug 11, 2025
@johnhuang316
Copy link
Owner

Hi @marksolly,

Thanks so much for taking the time to put this PR together! I really appreciate the effort and the idea of having a CLI tool to interact with the indexer.

I'm currently in the middle of reorganizing and refactoring some other parts of the project, so I can't merge this in at the moment.

This is a great feature, though, and I definitely plan to implement it once I've finished the current cleanup.

Thanks again for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants