The PineScript Trading Strategy MCP Server is a comprehensive tool designed for the creation, optimization, and management of PineScript trading strategies. It integrates with TradingView PineScript and provides a robust environment for strategy development, backtesting, and performance analysis.
The project is organized into the following directories:
├── src/ # Core application code
├── ui/ # Next.js web interface
├── dist/ # Compiled JavaScript
├── docs/ # Documentation
├── scripts/ # Utility scripts
│ ├── server/ # Server management scripts
│ ├── network/ # Network diagnostics scripts
│ └── docs/ # Documentation
├── data/ # Data files
├── tests/ # Application tests
├── examples/ # Example scripts and strategies
└── memory-bank/ # Project context and information
Install dependencies:
shell
npm install
Start the UI (choose one method):
```shell
# Standard Next.js development server
npm run ui
# Clean start with port cleanup
npm run ui:clean
# Alternative Express server (if Next.js has issues)
npm run ui:express
# Desktop app (no web server required)
npm run ui:electron
```
http://localhost:3001
The project includes multiple ways to access the UI:
# Standard Next.js dev server
npm run ui
# Clean start (kills any existing processes using the ports)
npm run ui:clean
# Start with administrator privileges (for stubborn processes)
npm run ui:admin
# Simple Express server (more stable alternative)
npm run ui:express
# Basic HTML test page server
npm run ui:test
# Electron desktop application (no web server required)
npm run ui:electron
If you experience connection issues with the UI server:
1. Check your firewall settings
2. Run the firewall exception script: npm run firewall:allow
3. See the scripts/docs/ui-connect-guide.md
for detailed connection troubleshooting
4. Try the desktop app option: npm run ui:electron
The repository includes several utility scripts to help with development and troubleshooting:
run-ui-clean.bat
- Main script to start the UI server (cleans up existing processes)run-ui-admin.bat
- Starts the UI server with administrator privilegesserve-test-page.bat
- Serves a simple HTML test page on port 8000 to test connectivityrun-express-server.bat
- Starts an Express server as an alternative to Next.jsrun-electron-app.bat
- Starts the Electron desktop application (no web server required)check-connectivity.bat
- Comprehensive network connectivity diagnosticscheck-windows-firewall.bat
- Check firewall status and rulesallow-node-firewall.bat
- Add Node.js to Windows Firewall exceptionstest-network-connection.bat
- Test specific network connectionstest-port-3000.bat
- Test if port 3000 is availablekill-port-3000.bat
- Kill any process using port 3000ui-connect-guide.md
- Comprehensive guide to UI connectivity troubleshootingREADME-UI.md
- UI-specific documentationnpm run build
npm test
See the docs/
directory for detailed documentation on:
- API Reference
- User Guide
- Development Guide
This project is proprietary and confidential.
Copyright © 2025. All rights reserved.