|
Download docs/FIX_GUIDE.md from polyHedra/PolyHedra: direct link, hf CLI and curl.
- Browser
- Download file 3.44 kB
-
https://huggingface.co/spaces/polyHedra/PolyHedra/resolve/main/docs/FIX_GUIDE.md
- Command line
-
hf download hf://spaces/polyHedra/PolyHedra/docs/FIX_GUIDE.md
-
curl -L -o FIX_GUIDE.md https://huggingface.co/spaces/polyHedra/PolyHedra/resolve/main/docs/FIX_GUIDE.md
3.44 kB
Polyhedra Fix Guide
Problem Diagnosis
Your project encountered MCP server configuration issues. Main reasons:
- Incorrect command configuration: Used
uvx --from polyhedraattempting to install from PyPI, but the package is not yet published - VS Code MCP interception: MCP server is intercepting terminal output preventing normal command execution
Fix Steps
1. Reload VS Code
Important: First reload VS Code to stop the current MCP server.
- Press
Ctrl+Shift+PorCmd+Shift+P - Type "Reload Window" and execute
- Or simply close and reopen VS Code
2. Update IDE Configuration (Development Mode)
Update configuration based on your IDE:
VS Code (Already Updated)
.vscode/settings.json has been updated to use local Python environment.
Cursor
Update ~/.cursor/mcp.json or project's ide-integration/cursor/mcp.json:
{
"mcpServers": {
"polyhedra": {
"command": "C:\\Users\\OMEN\\Desktop\\poly\\.venv\\Scripts\\python.exe",
"args": ["-m", "polyhedra.server"],
"env": {}
}
}
}
Windsurf
Update ~/.windsurf/mcp.json or project's ide-integration/windsurf/mcp.json:
{
"mcpServers": {
"polyhedra": {
"command": "C:\\Users\\OMEN\\Desktop\\poly\\.venv\\Scripts\\python.exe",
"args": ["-m", "polyhedra.server"],
"env": {}
}
}
}
3. Test Basic Functionality
After reloading, test in a new PowerShell terminal:
# Activate virtual environment
cd C:\Users\OMEN\Desktop\poly
.\.venv\Scripts\Activate.ps1
# Test import
python -c "from polyhedra.services.semantic_scholar import SemanticScholarService; print('✅ Import successful')"
# Run demo
python demo_search.py
4. Test MCP Tools
Test in VS Code Copilot chat:
Search for papers about transformer architecture
If configured correctly, Copilot should be able to call Polyhedra's MCP tools.
Production Environment Configuration
After publishing the package to PyPI, you can use:
{
"mcpServers": {
"polyhedra": {
"command": "uvx",
"args": ["--from", "polyhedra", "polyhedra"],
"env": {}
}
}
}
Common Issues
Q: Terminal commands still being intercepted?
A: Completely quit VS Code (not reload), then reopen.
Q: MCP tools not callable?
A:
- Check VS Code Output panel's "MCP" channel for error logs
- Ensure Python path is correct
- Try saying "reload MCP server" in chat
Q: Wrong Python path?
A:
- Get correct path:
(Get-Command python).Source(after activating virtual environment) - Update configuration file with that path
Q: How to check MCP server status?
A:
# Test server startup
.\.venv\Scripts\python.exe -m polyhedra.server
# Then press Ctrl+C to stop (if it starts normally, configuration is correct)
Project Status
✅ Fixed:
- VS Code configuration file updated to use local Python
- Removed deprecated Copilot instructions configuration
⚠️ Manual Action Required:
- Reload VS Code
- Update Cursor/Windsurf configuration (if using)
Next Steps
After completing fixes, you can:
- Run demo:
python demo_search.py - Run tests:
python -m pytest tests/ - Use MCP tools: Use Polyhedra features in IDE's AI chat
Need Help?
Check documentation:
- Complete setup guide:
docs/SETUP.md - API documentation:
docs/API.md - User guide:
docs/USER_GUIDE.md