Opencode AI
Opencode AI is an AI-powered coding assistant with MCP support.
Prerequisites
Section titled “Prerequisites”- Opencode AI installed
- Probo API token (see Authentication)
- Your Probo instance URL
Configuration
Section titled “Configuration”1. Open Opencode Settings
Section titled “1. Open Opencode Settings”Open Opencode settings or configuration file.
2. Add MCP Server
Section titled “2. Add MCP Server”Add the Probo MCP Server configuration:
{ "mcpServers": { "probo": { "url": "https://your-probo-instance.com/api/mcp/v1", "headers": { "Authorization": "Bearer your_api_token_here" } } }}3. Replace Placeholders
Section titled “3. Replace Placeholders”Update these values:
your-probo-instance.com→ Your Probo instance URLyour_api_token_here→ Your API token from Probo
4. Restart Opencode
Section titled “4. Restart Opencode”Restart Opencode to apply the configuration.
Once configured, you can use Probo tools through Opencode’s AI assistant:
Example queries:
"List all pending obligations in my organization""Add a new risk for data breach with high impact""Show me all vendors that need review"Opencode will automatically invoke the appropriate Probo MCP tools.
Environment Variables
Section titled “Environment Variables”For security, use environment variables for your API token:
{ "mcpServers": { "probo": { "url": "https://your-probo-instance.com/api/mcp/v1", "headers": { "Authorization": "Bearer ${PROBO_API_TOKEN}" } } }}Set the environment variable:
macOS/Linux:
export PROBO_API_TOKEN="your_api_token_here"Windows:
$env:PROBO_API_TOKEN = "your_api_token_here"Multiple Environments
Section titled “Multiple Environments”Configure different Probo instances:
{ "mcpServers": { "probo-dev": { "url": "http://localhost:8080/api/mcp/v1", "headers": { "Authorization": "Bearer ${PROBO_DEV_TOKEN}" } }, "probo-prod": { "url": "https://probo.company.com/api/mcp/v1", "headers": { "Authorization": "Bearer ${PROBO_PROD_TOKEN}" } } }}Troubleshooting
Section titled “Troubleshooting”Tools Not Available
Section titled “Tools Not Available”Problem: Probo tools aren’t showing up in Opencode
Solutions:
- Verify the MCP configuration is correct
- Restart Opencode completely
- Check Opencode logs for connection errors
- Test the connection with curl:
Terminal window curl -H "Authorization: Bearer YOUR_TOKEN" \https://your-probo-instance.com/api/mcp/v1/health
Authentication Errors
Section titled “Authentication Errors”Problem: 401 Unauthorized errors
Solutions:
- Regenerate your API token in Probo
- Verify the token format:
Bearer your_token - Check for extra spaces or newlines
- Ensure the token hasn’t expired or been revoked
Connection Issues
Section titled “Connection Issues”Problem: Cannot connect to Probo instance
Solutions:
- Verify the Probo URL is correct
- Check network connectivity
- Use HTTPS for production instances
- Verify firewall settings
Best Practices
Section titled “Best Practices”- Store API tokens in environment variables
- Use separate tokens for different environments
- Rotate tokens regularly (every 90 days)
- Use HTTPS for production connections
- Monitor token usage in Probo settings
- Avoid committing tokens to version control
Features
Section titled “Features”Opencode AI with Probo MCP provides:
- AI-powered coding with compliance context
- Real-time access to compliance data
- Automated compliance checks
- Code generation with risk awareness
- Natural language compliance queries