Opencode AI
Configure the MCPale Opencode AI settings to connect to the platform with a carrier token, including environment variables and multi-environment configuration.
Opencode AI is an AI-powered coding assistant with MCP support.
Prerequisites
Section entitled ‘Prerequisites’- Opencode AI installed
- Scoped the platform OAuth token (see Authentication)
- Your platform court URL
Endpoint
Section entitled “Endpoint”Choose the end point for your platform environment:
| Environment | MCP URL |
|---|---|
| the platform US | https://us.probo.com/api/mcp/v1 |
| the platform EU | https://eu.probo.com/api/mcp/v1 |
| Custom | https://your-probo-instance.com/api/mcp/v1 |
The ___ZBT_I18N_RUNTIME_BLOCK_171__ segment is required.
Configuration
Section entitled “Configuration”1. Open Opencode Settings
Section entitled “1. Open Opencode Settings”Open Opencode settings or configuration file.
2. Add MCP Server
Section entitled “2. AddMCPServer”Add the configuration of the platformMCPServer:
{ "mcpServers": { "probo": { "url": "https://your-probo-instance.com/api/mcp/v1", "headers": { "Authorization": "Bearer your_api_token_here" } } }}3. Replace Placeholders
Section entitled “Replace Placeholders”Update these values:
your-probo-instance.com→ URL of your platform instanceyour_api_token_here→ Your OAuth token on the platform
4. Restart Opencode
Section entitled “Restart Opencode”Open Opencode to apply the configuration.
Once configured, you can use the platform tools through the Opencode AI assistant:
Example queries:
"List all pending obligations in my organization""Add a new risk for data breach with high impact""Show me all third parties that need review"Opencode will automatically invoke the tools of the appropriate platform.
Environment Variables
Section entitled ‘Environment Variables’For security, use an environmental variable for your OAuth 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 entitled “Multiple Environments”Configure different the platform 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 “Troubleshooting”Tools are not available
Section “Tools Not Available”Problem: Platform tools do not appear in Opencode
Solutions:
- Verification of Configuration
- Restart Opencode completely
- Check Opencode logs for connection errors
- Testarea punctului final cu inspectorulMCP:
Terminal window npx @modelcontextprotocol/inspector --cli \https://your-probo-instance.com/api/mcp/v1 \--transport http \--header "Authorization: Bearer $PROBO_API_TOKEN" \--method tools/list
Authentication Errors
Section “Authentication Errors”Problem: 401 Unauthorized errors
Solutions:
- Create an OAuth replacement token in the platform
- Check the token format:
Bearer your_token - Check for additional spaces or newsletters
- Make sure that the token has not expired or has been revoked
Connection Issues
Section entitled “Connection Issues”Problem: You cannot connect to the platform.
Solutions:
- Check if the URL is correct.
- Check network connectivity
- Use HTTPS for production instances
- Verify firewall settings
Best Practices
Section “Best Practices”- Store OAuth 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 the platform settings
- Avoid committing tokens to version control
Features
Section entitled “Features”Opencode AI with the platform MCP provides:
- IA-based coding with context of compliance
- Real-time access to compliance data
- Automated compliance checks
- Generating codes with risk awareness
- Natural language compliance queries