mirror of
https://github.com/sst/opencode.git
synced 2025-07-07 16:14:59 +00:00
docs: readme
This commit is contained in:
parent
89b95be4de
commit
37bb8895fe
1 changed files with 22 additions and 24 deletions
46
README.md
46
README.md
|
@ -55,7 +55,28 @@ Project configuration is optional. You can place an `opencode.json` file in the
|
|||
}
|
||||
```
|
||||
|
||||
### Providers
|
||||
#### MCP
|
||||
|
||||
```json title="opencode.json"
|
||||
{
|
||||
"$schema": "http://opencode.ai/config.json",
|
||||
"mcp": {
|
||||
"localmcp": {
|
||||
"type": "local",
|
||||
"command": ["bun", "x", "my-mcp-command"],
|
||||
"environment": {
|
||||
"MY_ENV_VAR": "my_env_var_value"
|
||||
}
|
||||
},
|
||||
"remotemcp": {
|
||||
"type": "remote",
|
||||
"url": "https://my-mcp-server.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Providers
|
||||
|
||||
You can use opencode with any provider listed at [here](https://ai-sdk.dev/providers/ai-sdk-providers). Use the npm package name as the key in your config. Note we use v5 of the ai-sdk and not all providers support that yet.
|
||||
|
||||
|
@ -79,29 +100,6 @@ You can use opencode with any provider listed at [here](https://ai-sdk.dev/provi
|
|||
}
|
||||
```
|
||||
|
||||
#### Provider Options
|
||||
|
||||
#### MCP
|
||||
|
||||
```json title="opencode.json"
|
||||
{
|
||||
"$schema": "http://opencode.ai/config.json",
|
||||
"mcp": {
|
||||
"localmcp": {
|
||||
"type": "local",
|
||||
"command": ["bun", "x", "my-mcp-command"],
|
||||
"environment": {
|
||||
"MY_ENV_VAR": "my_env_var_value"
|
||||
}
|
||||
},
|
||||
"remotemcp": {
|
||||
"type": "remote",
|
||||
"url": "https://my-mcp-server.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Contributing
|
||||
|
||||
To run opencode locally you need
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue