Download docs/START_GUIDE.md from polyHedra/PolyHedra: direct link, hf CLI and curl.
- Browser
- Download file 5.25 kB
-
https://huggingface.co/spaces/polyHedra/PolyHedra/resolve/main/docs/START_GUIDE.md
- Command line
-
hf download hf://spaces/polyHedra/PolyHedra/docs/START_GUIDE.md
-
curl -L -o START_GUIDE.md https://huggingface.co/spaces/polyHedra/PolyHedra/resolve/main/docs/START_GUIDE.md
Polyhedra Startup Guide
π Quick Start (Recommended)
Polyhedra as an MCP server is automatically launched by your IDE. No manual startup needed!
Step 1: Reload VS Code
Must do this first!
- Press
Ctrl+Shift+P(orF1) - Type and select: "Developer: Reload Window"
- Or simply close and reopen VS Code
Step 2: Verify MCP Server Started
Open VS Code's Output panel:
- Press
Ctrl+Shift+Uto open Output panel - Select "MCP" from dropdown menu
- Should see logs like:
[polyhedra] Starting MCP server... [polyhedra] Server ready
Step 3: Test Functionality
Test in GitHub Copilot Chat:
Search for papers about transformer architecture
Copilot should automatically call Polyhedra's MCP tools!
π§ͺ Testing and Verification
Quick Diagnostic Test
Windows PowerShell:
.\test_quick.ps1
Or use batch file:
test_quick.bat
This verifies:
- β Python environment is correct
- β All dependencies installed
- β Services can be imported normally
Run Demo (No IDE Needed)
PowerShell:
.\run_demo.ps1
Batch:
run_demo.bat
Or directly with Python:
.\.venv\Scripts\python.exe demo_search.py
π οΈ Manual Startup Methods
Method 1: Via VS Code (Recommended)
MCP server automatically starts when VS Code launches. Configuration is in:
mcp.serverssection of.vscode/settings.json
Method 2: Command Line Testing (Development/Debug)
Only for testing if server can start, press Ctrl+C to stop:
# Activate virtual environment
.\.venv\Scripts\Activate.ps1
# Start MCP server
python -m polyhedra.server
Note: Server will wait for JSON-RPC input, this is normal. Press Ctrl+C to stop.
Method 3: Using Python API (In Scripts)
# demo_search.py is an example
import asyncio
from polyhedra.services.semantic_scholar import SemanticScholarService
async def main():
service = SemanticScholarService()
papers = await service.search("transformer", limit=5)
print(f"Found {len(papers)} papers")
asyncio.run(main())
π Check if MCP Tools Are Available
In VS Code Copilot
- Open Copilot Chat (sidebar icon or
Ctrl+Alt+I) - Type
@workspacethen press space - Should see command prompts like
/ - Or directly ask: "Search for papers"
View Available Tools
Ask in Copilot chat:
What tools are available in Polyhedra?
Or check documentation:
cat docs\API.md
β Common Issues
Q: How to know if MCP server is running?
A: Check VS Code Output panel (MCP channel):
- Has logs = Running β
- Errors = Configuration problem β
- No output = Not started or not configured β οΈ
Q: Need to restart after code changes?
A: Yes. After modifying code:
- Press
Ctrl+Shift+P - Select "Developer: Reload Window"
Q: MCP tools not available?
A: Check in order:
- β
Run
.\test_quick.ps1to ensure basic functionality works - β Check MCP output panel for error messages
- β
Confirm
.vscode/settings.jsonconfiguration is correct - β Reload VS Code
- β
See
FIX_GUIDE.mdfor detailed troubleshooting
Q: Want to test specific functionality?
A: Use test scripts:
# Run all tests
.\.venv\Scripts\python.exe -m pytest tests/
# Test specific functionality
.\.venv\Scripts\python.exe -m pytest tests/test_services/test_semantic_scholar.py
# Run demo
.\.venv\Scripts\python.exe demo_search.py
Q: How to debug MCP server?
A:
- Check MCP output panel logs
- Add logging to code:
import logging logging.basicConfig(level=logging.DEBUG) - Manually run server to see full output:
.\.venv\Scripts\python.exe -m polyhedra.server
π Startup Checklist
After completing all steps, verify:
- Virtual environment created:
.venvfolder exists - Dependencies installed:
pip listshows polyhedra - Configuration updated:
.vscode/settings.jsonuses local Python - VS Code reloaded
- MCP output panel shows server startup
- Diagnostic test passes:
.\test_quick.ps1 - Copilot can call Polyhedra tools
π― Recommended Workflow
First Time Use
# 1. Verify installation
.\test_quick.ps1
# 2. Run demo to understand features
.\run_demo.ps1
# 3. Reload VS Code
# Ctrl+Shift+P -> "Reload Window"
# 4. Test in Copilot
# "Search for transformer papers"
Daily Development
# After modifying code
# Ctrl+Shift+P -> "Reload Window"
# Run tests
.\.venv\Scripts\python.exe -m pytest
# Use Copilot to interact with Polyhedra
π Related Documentation
- API Documentation:
docs/API.md- Detailed description of all 10 tools - Fix Guide:
FIX_GUIDE.md- Troubleshooting - User Guide:
docs/USER_GUIDE.md- Usage examples - IDE Configuration:
ide-integration/SETUP_GUIDE.md- Detailed configuration instructions
Tip: Polyhedra is an MCP tool server that extends AI assistant capabilities. You don't need to "run" it directly, but use its features through AI chat in your IDE!