MCP stdio server for indexing venvs and searching from those or preexisting indexes
Project description
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:
# 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.
{
"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:
#py_search <my_search_query>
Example:
With #pysearch
How do i use function xyz
Project details
Release history Release notifications | RSS feed
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 pysearch_mcp-0.1.0.tar.gz.
File metadata
- Download URL: pysearch_mcp-0.1.0.tar.gz
- Upload date:
- Size: 119.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69fd1c157a985128912693f0d4fb8ec1a9e6e4a9727967a9392d991c5fcee02f
|
|
| MD5 |
d9be08676cb5879dfd80ca0d03e92710
|
|
| BLAKE2b-256 |
8300dd8c510b639dd35a8c6ba149244df0dc414853fc5fed1a51ed74c592d34e
|
File details
Details for the file pysearch_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pysearch_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbf32e892727f1eddb58851b98bedc73f5fe6032a6442f58eac729e940fcddaf
|
|
| MD5 |
0193270bd21cc9a75da309d99836e6f4
|
|
| BLAKE2b-256 |
8bd828e8efc2ef5b53e237e4e1215d42c62a84125b88f8fad8539ab0f8793114
|