Getting Started with Scansca¶
This guide will help you set up and run Scansca on your local machine.
Installation¶
Prerequisites¶
- Go 1.22+: Install Go
- Docker (optional): Install Docker
- Docker Compose (optional): Install Docker Compose
Clone the Repository¶
1 2 | |
Install Dependencies¶
1 | |
Running Scansca¶
Start a Database (Optional)¶
Scansca includes a Docker Compose file to start a PostgreSQL database for testing:
1 | |
This command starts a PostgreSQL instance with:
- Username: scansca_user
- Password: scansca_password
- Database: scansca
- Port: 5432
Build and Run the Server¶
1 2 | |
The server will start on http://localhost:8080 by default.
Basic Operations¶
Register a Database¶
Register your database with the Scansca server:
1 2 3 4 5 6 7 | |
List Available Databases¶
Check your registered databases:
1 | |
Explore Database Schema¶
List schemas:
1 | |
List tables in a schema:
1 | |
Get table information:
1 | |
Execute a Query¶
Run a SQL query against your database:
1 2 3 4 5 6 | |
Configuration¶
Scansca uses a configuration file located at config/scansca.yaml. You can modify this file to change server settings:
1 2 3 4 5 | |
You can also use environment variables to override these settings:
1 | |
Using with LLM Clients¶
Scansca implements the Model Context Protocol (MCP), making it compatible with MCP-enabled LLM clients. For LLM integration, use the MCP endpoints:
1 2 3 4 5 6 7 8 9 10 | |
Next Steps¶
- Check the API documentation for detailed API information
- Explore the project structure to understand components
- Connect multiple databases to test cross-database functionality
- Try connecting an MCP-compatible LLM client
Troubleshooting¶
Common Issues¶
- Connection Refused: Ensure your database server is running and accessible.
- Authentication Failed: Check your database connection string credentials.
- Missing Dependencies: Run
make depsto ensure all dependencies are installed.
Logs¶
Scansca logs to standard output. Increase verbosity by setting the log level in the configuration.
Getting Help¶
For more help, please open an issue on the GitHub repository.