Metadata-Version: 2.4
Name: pysearch_mcp
Version: 0.1.0
Summary: MCP stdio server for indexing venvs and searching from those or preexisting indexes
Project-URL: Homepage, https://github.com/mn-90/pysearch_mcp
Project-URL: Repository, https://github.com/mn-90/pysearch_mcp
Project-URL: Issues, https://github.com/mn-90/pysearch_mcp/issues
Author: Michael Neumeier
License: MIT License
        
        Copyright (c) 2025 Michael Neumeier
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: documentation,lunr,mcp,model-context-protocol,python,search
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: fastmcp>=2.14.0
Requires-Dist: lunr==0.8.0
Description-Content-Type: text/markdown

# pysearch_mcp

This repo contains a mcp server that should improve the search of python code and examples.

For this, it creates a search index based on **lunr**, and a mcp server based on **fastmcp**.

To retrieve input, it can read from:
- existing lunr search indexes, e.g. from existing **mkdocs** documentation
- code of virtual environments (narrow the package search with search patterns)

## Usage

### Terminal

To call the mcp server, you can use:

```sh
# module call
uv pip install pysearch_mcp
python -m pysearch_mcp

# script call
uv pip install pysearch_mcp
pysearch_mcp

# uvx tool
uvx pysearch_mcp@0.1.0
```

### VS Code

Use one of the methods mentioned above with the given args in mcp.json of vscode.

```json
{
  "servers": {
      "pysearch_mcp": {
        "type": "stdio",
        "command": "uvx",
        "args": [
          " pysearch_mcp@0.1.0", // pin the version in production
          "--venv-paths", ".venv",  // list one or more venvs
          "--venv-search-patterns", "pysearch*", // limit to a list of patterns to avoid loading all packages to the index
          "--search-index-paths", "tests/repo/search/search_index.json" // add additional search indexes
        ],
      }
  },
  "inputs": []
}
```

In Agent mode, use:

```promt
#py_search <my_search_query>

Example:
With #pysearch

How do i use function xyz
```

