# Example Resource Entry # Resources include guides, configs, MCP servers, tools, and commands. # Place actual entries in: data/resources/your-resource-name.yaml # ============================================================================ # REQUIRED FIELDS # ============================================================================ name: Example MCP Server repo: https://github.com/example/opencode-mcp-database tagline: MCP server for database access and querying description: A Model Context Protocol (MCP) server that provides OpenCode with database access capabilities. Supports - PostgreSQL, MySQL, SQLite - Read-only query execution - Schema introspection # ============================================================================ # OPTIONAL FIELDS # ============================================================================ # Scope defines where the extension can be installed (defaults to [global]) # For MCP servers, scope indicates global vs project-specific config scope: - global # System-wide MCP server - project # Project-specific database access tags: - mcp-server - database - postgresql - mysql min_version: "1.0.0" homepage: https://example.com/docs/mcp-database installation: | ## Prerequisites - Node.js 18+ - Database connection credentials ## Installation ```bash # Install globally via npm npm install -g @example/opencode-mcp-database ``` ## Configuration Add to your `opencode.json`: ```json { "mcpServers": { "database": { "command": "opencode-mcp-database", "args": ["--connection", "postgresql://localhost/mydb"] } } } ``` ## Environment Variables Alternatively, configure via environment: ```bash export DATABASE_URL="postgresql://localhost/mydb" ``` ## Security Notes - Use read-only database credentials - Consider connection pooling for production - Review query permissions carefully ## Removal ```bash npm uninstall -g @example/opencode-mcp-database ``` Remove the `mcpServers.database` entry from `opencode.json`.