This guide explains how to set up your development environment for the Seq MCP Server.
Use the provided setup scripts to automatically configure everything:
PowerShell (Windows):
.\scripts\setup-dev.ps1Bash (Linux/Mac):
./scripts/setup-dev.shThe setup script will:
- Start a Seq container on non-standard ports (15341 for API, 18081 for UI)
- Configure Seq with development credentials
- Automatically handle the initial password change requirement
- Create a development API key
- Set environment variables for your session
- Create a
.envfile that the application automatically loads - Display the Seq UI URL and connection details
After setup, you can run the MCP server from anywhere:
# From command line
dotnet run --project SeqMcpServer
# Or from Visual Studio - just hit F5The application automatically loads the .env file created by the setup script.
To stop and remove the development environment:
PowerShell (Windows):
.\scripts\teardown-dev.ps1Bash (Linux/Mac):
./scripts/teardown-dev.shIf you prefer to set up manually:
- Start Seq container:
docker run -d \
--name seq-mcp-dev \
-p 15341:5341 \
-p 18081:80 \
-e ACCEPT_EULA=Y \
datalust/seq:latest- Create
.envfile in the project root:
SEQ_SERVER_URL=http://localhost:18081
SEQ_API_KEY=your-api-key-here
- Create an API key via Seq UI at http://localhost:18081
The application uses environment variables for configuration. These can be set via:
.envfile (recommended for development) - Automatically loaded by the application- System environment variables - Set by the setup script for persistence
- Manual export/set - For temporary use
SEQ_SERVER_URL: URL of your Seq server (e.g.,http://localhost:18081)SEQ_API_KEY: API key for accessing Seq
You can configure different API keys for different workspaces:
SEQ_API_KEY=default-key
SEQ_API_KEY_PRODUCTION=production-key
SEQ_API_KEY_STAGING=staging-key
This means the application can't find the API key. The setup script should handle this automatically, but if you see this error:
- Ensure you ran the setup script:
.\scripts\setup-dev.ps1 - Check that
.envfile exists in the project root - If running from Visual Studio, restart it to pick up new environment variables
- Verify the
.envfile contains validSEQ_API_KEYandSEQ_SERVER_URLvalues
The setup scripts use non-standard ports to avoid conflicts:
- API: 15341 (instead of 5341)
- UI: 18081 (instead of 8081)
If these ports are in use, modify the scripts to use different ports.
If you see "container name already in use", run the teardown script first:
.\scripts\teardown-dev.ps1The setup script automatically handles the initial password change. If doing manual setup, you'll need to:
- Login with initial credentials
- Change the password when prompted
- Use the new password to create API keys
For production:
- Use strong, unique passwords
- Store credentials securely (e.g., Azure Key Vault, environment variables)
- Enable proper authentication and authorization
- Use HTTPS for all connections