mirror of
https://github.com/awesome-opencode/awesome-opencode.git
synced 2026-04-28 12:29:29 +00:00
- Introduce `scope`, `tags`, `min_version`, `homepage`, and `installation` fields for enhanced discoverability and guidance. - Remove `install` and `compatibility` objects, replacing them with a simplified `installation` string field. - Add `examples/` directory with full exemplar files for each extension type. - Update `schema-design.md` to reflect new schema, clarify field definitions, and improve documentation structure.
80 lines
2.1 KiB
YAML
80 lines
2.1 KiB
YAML
# 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`.
|