Quickstart
1. Create queries.json
ToolStorePy expects an array of objects with a tool_description field:
[
{ "tool_description": "evaluate a mathematical arithmetic expression securely" },
{ "tool_description": "convert between different units of measurement" },
{ "tool_description": "calculate cryptographic hash of a file" }
]
2. Run a build
Using a built-in named index:
toolstorepy build --queries queries.json --index core-tools
Using a direct downloadable index:
toolstorepy build --queries queries.json --index-url https://example.com/core-tools-v1.zip
3. Configure host and port
By default the generated server binds to 0.0.0.0:8000. Override with --host and --port:
toolstorepy build --queries queries.json --index core-tools --port 9090
toolstorepy build --queries queries.json --index core-tools --host 127.0.0.1 --port 8080
The values are baked into the generated mcp_unified_server.py at build time.
4. Choose a security scan mode
Default — AST scan with human approval
The AST scanner runs on every build. If a repo has HIGH findings, ToolStorePy pauses and asks you to include or skip it before proceeding.
Automated — LLM scan (no human prompt)
Pass --llm-scan to have an LLM review each repo and make the include/skip decision automatically. No human prompt fires. Set the API key for your chosen provider:
# Claude (default model)
export ANTHROPIC_API_KEY=sk-...
toolstorepy build --queries queries.json --index core-tools --llm-scan
# GPT-4o
export OPENAI_API_KEY=sk-...
toolstorepy build --queries queries.json --index core-tools --llm-scan --llm-model gpt-4o
Install the matching integration package first:
pip install langchain-anthropic # for Claude
pip install langchain-openai # for GPT
pip install langchain-google-genai # for Gemini
5. Review the build output
The build writes:
toolstorepy_workspace/
├── mcp_unified_server.py
├── security_report.txt
├── .env.example
└── .venv/
security_report.txt contains findings from all scanners that ran. LLM findings are tagged [LLM].
6. Run the generated server
cd toolstorepy_workspace
python mcp_unified_server.py
7. Use it from Python code
from toolstorepy.orchestrator import ToolStorePy
toolstore = ToolStorePy(
workspace="toolstorepy_workspace",
port=9090,
llm_scan=True,
llm_model="claude-sonnet-4-6",
)
toolstore.build(
queries="queries.json",
index="core-tools",
)
8. Bring your own index
The quickstart uses a prebuilt index, but ToolStorePy is not limited to that. You can author your own semantic tool index from JSON metadata and publish it for later builds. See Creating Custom Tool Indexes.