fix(mcp): turn off a global server in OpenCode 2 projects (#541)

* fix(mcp): turn off a global server in OpenCode 2 projects

OpenCode 2 replaces a global server with the project entry of the same
name, and silently drops an entry without its type and command or url.
The project switch Skillshare wrote, {"enabled": false}, therefore left
the server on in OpenCode 2, while OpenCode 1 merged it by field.

Checked against OpenCode 2.0.27 and 1.19.0: OpenCode 2 still reads the
flat mcp.<name> shape and turns enabled: false into disabled: true, and
both read an entry with type and command or url. So no version detection
is needed. When the global config under mcp.projects defines the server,
the OpenCode switch now carries its type and executable, or its url
without the query, next to enabled: false. Args, env, headers and the
query stay out of a project file that may be committed, as the Pi switch
once did. A switch that already carries the endpoint keeps it when the
global server later leaves the config, unless it was edited since sync.

In project mode, or when the global config lacks the server, only the
bare switch can be written; the plan now says OpenCode 2 ignores it, in
the CLI and the dashboard.

Import also reads OpenCode 2's mcp.servers section, which its own
`mcp add` writes, instead of reporting it as one broken server.

Refs #538

* fix(mcp): keep secrets in a URL path out of the OpenCode switch

The OpenCode switch dropped only the query of the global server's URL.
Some MCP services put the key in the path instead, and an absolute
executable path names the user's home directory; both then reached a
project file that may be committed. A disabled server never starts, and
OpenCode 2 accepts any type with a command or url, so the switch now
carries only the executable's name or the URL's scheme and host.

Refs #538

* fix(mcp): skip OpenCode 2's timeout defaults when importing

OpenCode 2 keeps server defaults in mcp.timeout next to mcp.servers, so
import listed timeout as a broken server. It is dropped only together
with a recognized servers section, where it cannot be a v1 server.

Refs #538

* fix(mcp): read an empty OpenCode 2 servers section

An empty mcp.servers object was not recognized as OpenCode 2's section,
so import listed servers and timeout as broken servers instead of
finding no entries. The dashboard help for disabled also still said only
the switch is written, which is no longer true for opencode.

Refs #538

* fix(mcp): keep an OpenCode endpoint switch next to its own fields

The kept switch was matched by the whole native entry, so a field only
OpenCode reads, such as a per-server timeout, made the next sync drop the
type and command or url once the global server left the config, and
OpenCode 2 then ignored the switch. Match the fields Skillshare manages.

Refs #538

* fix(mcp): show the OpenCode endpoint switch in the dashboard preview

The dashboard renders a project's server alone, so the preview never saw
the same-named global server and showed the bare switch that OpenCode 2
ignores, while sync wrote the switch with the endpoint. Resolve the
global server the way sync does.

Refs #538

* fix(plugin): read OpenCode 2's version output

OpenCode 2 prints "opencode v2.0.27" for --version, while OpenCode 1
prints only "1.19.0". The adapter trimmed a leading "v" only, so plugin
sync to OpenCode 2 failed as an unrecognized version and imported
updates were skipped as if OpenCode 1 had no update command. Read the
last field, and decide the update check with the same parser.

Refs #538
This commit is contained in:
Willie
2026-10-12 23:57:40 +08:00
committed by GitHub
parent b9563ea4e8
commit f540daf601
29 changed files with 257 additions and 23 deletions
+84
View File
@@ -362,6 +362,90 @@ func TestPiSwitchIsAnOverride(t *testing.T) {
}
}
// OpenCode 2 drops a project entry without its type and command or url, so the switch carries
// the global server's executable name or its url's origin, and nothing that may hold a secret.
func TestOpenCodeSwitchCarriesTheGlobalEndpoint(t *testing.T) {
s, tmp := projectsService(t, "mcp:\n servers:\n docs:\n command: /home/me/bin/tool\n args: [--port, \"3000\"]\n env: {TOKEN: {fromEnv: TOKEN}}\n targets: [opencode]\n web:\n url: https://example.com/secret-key/mcp?key=secret\n headers: {Authorization: {fromEnv: AUTH}}\n targets: [opencode]\n projects:\n $TMP/p1:\n targets: [opencode]\n servers:\n docs:\n disabled: true\n web:\n disabled: true\n")
plan := applyProjects(t, s)
for _, c := range plan.Changes {
if c.Root == filepath.Join(tmp, "p1") && !c.Switch {
t.Fatalf("not a switch: %+v", c)
}
}
if slices.Contains(plan.Notices, OpenCodeSwitchNotice) {
t.Fatalf("notice for a switch with its endpoint: %v", plan.Notices)
}
data, err := os.ReadFile(filepath.Join(tmp, "p1", "opencode.json"))
if err != nil {
t.Fatal(err)
}
var file struct{ MCP map[string]map[string]any }
if err := json.Unmarshal(data, &file); err != nil {
t.Fatal(err)
}
want := map[string]map[string]any{
"docs": {"type": "local", "command": []any{"tool"}, "enabled": false},
"web": {"type": "remote", "url": "https://example.com", "enabled": false},
}
if !reflect.DeepEqual(file.MCP, want) {
t.Fatalf("project opencode.json: %s", data)
}
if plan, err := s.Preview(); err != nil || slices.ContainsFunc(plan.Changes, func(c Change) bool { return c.Action != "unchanged" }) {
t.Fatalf("not idempotent: %+v %v", plan, err)
}
}
// The global server may leave this config while OpenCode still defines it, so a switch that
// carries its endpoint keeps it rather than falling back to the switch OpenCode 2 ignores.
// One edited since sync is no longer the switch sync wrote, so it is a conflict.
func TestOpenCodeSwitchKeepsItsEndpointWithoutTheGlobalServer(t *testing.T) {
s, tmp := projectsService(t, "mcp:\n servers:\n docs:\n command: tool\n targets: [opencode]\n projects:\n $TMP/p1:\n targets: [opencode]\n servers:\n docs:\n disabled: true\n")
applyProjects(t, s)
project := filepath.Join(tmp, "p1", "opencode.json")
written, _ := os.ReadFile(project)
// OpenCode's own per-server timeout sits next to the switch.
if err := os.WriteFile(project, []byte(strings.Replace(string(written), `"enabled"`, `"timeout": {"startup": 1000}, "enabled"`, 1)), 0600); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(s.ConfigPath, []byte(strings.ReplaceAll("mcp:\n servers: {}\n projects:\n $TMP/p1:\n targets: [opencode]\n servers:\n docs:\n disabled: true\n", "$TMP", tmp)), 0600); err != nil {
t.Fatal(err)
}
plan, err := s.Preview()
if c := changeFor(plan, project, "docs"); err != nil || c == nil || c.Action != "unchanged" || slices.Contains(plan.Notices, OpenCodeSwitchNotice) {
t.Fatalf("kept switch: %+v %v", plan, err)
}
if err := os.WriteFile(project, []byte(strings.Replace(string(written), `"tool"`, `"tool", "--edited"`, 1)), 0600); err != nil {
t.Fatal(err)
}
if plan, err = s.Preview(); err != nil || changeFor(plan, project, "docs").Action != "conflict" {
t.Fatalf("edited switch: %+v %v", plan, err)
}
}
// Without the global server there is no endpoint to write, so the switch stays alone, which
// OpenCode 1 merges and OpenCode 2 ignores; the plan says so.
func TestOpenCodeSwitchWithoutTheGlobalServerWarns(t *testing.T) {
s := testService(t)
s.ProjectRoot = filepath.Join(s.Home, "project")
if err := os.WriteFile(s.ConfigPath, []byte("mcp:\n servers:\n docs:\n disabled: true\n targets: [opencode]\n"), 0600); err != nil {
t.Fatal(err)
}
plan, err := s.Preview()
if err != nil || !slices.Contains(plan.Notices, OpenCodeSwitchNotice) {
t.Fatalf("notices: %v %v", plan, err)
}
}
// The dashboard's preview of a project under mcp.projects shows what sync writes.
func TestPreviewOfAnOpenCodeSwitchCarriesTheGlobalEndpoint(t *testing.T) {
s, tmp := projectsService(t, "mcp:\n servers:\n docs:\n command: tool\n targets: [opencode]\n projects:\n $TMP/p1:\n servers: {}\n")
s.ProjectRoot = filepath.Join(tmp, "p1")
got := s.RenderNative("docs", Server{Disabled: true, Targets: []string{"opencode"}})
if len(got) != 1 || got[0].Error != "" || !strings.Contains(got[0].Content, `"command"`) {
t.Fatalf("preview %+v", got)
}
}
// Earlier releases wrote the global server's command next to the switch. Pi reads that entry
// as a project server, and turning it on in Pi's /mcp starts it without args or env, so the
// next sync rewrites it as the override.
+36
View File
@@ -282,3 +282,39 @@ func TestAdditionalClientImportRejectsDisabled(t *testing.T) {
}
}
}
// OpenCode 2 nests its servers under mcp.servers, as its own mcp add writes them.
func TestImportReadsOpenCodeServersSection(t *testing.T) {
items, err := Import("opencode", []byte(`{"mcp":{"servers":{"docs":{"type":"local","command":["tool","--x"],"environment":{"KEY":"{env:KEY}"}}},"flat":{"type":"remote","url":"https://example.com/mcp"},"timeout":{"startup":45000}}}`), "")
if err != nil {
t.Fatal(err)
}
got := map[string]Server{}
for _, item := range items {
if len(item.Problems) > 0 {
t.Fatalf("%s: %v", item.Name, item.Problems)
}
got[item.Name] = item.Server
}
docs := got["docs"]
if len(got) != 2 || docs.Command != "tool" || !slices.Equal(docs.Args, []string{"--x"}) || docs.Env["KEY"].FromEnv != "KEY" || got["flat"].URL != "https://example.com/mcp" {
t.Fatalf("candidates: %+v", got)
}
}
func TestImportReadsAnEmptyOpenCodeServersSection(t *testing.T) {
if items, err := Import("opencode", []byte(`{"mcp":{"servers":{},"timeout":{"startup":45000}}}`), ""); err == nil {
t.Fatalf("candidates: %+v", items)
}
}
// A server named servers is still a server: only a section of objects is OpenCode 2's.
func TestImportKeepsAnOpenCodeServerNamedServers(t *testing.T) {
items, err := Import("opencode", []byte(`{"mcp":{"servers":{"enabled":false},"other":{"type":"local","command":["x"]}}}`), "")
if err != nil || len(items) != 2 || items[1].Name != "servers" || len(items[1].Problems) == 0 {
t.Fatalf("candidates: %+v %v", items, err)
}
if _, err := Import("opencode", []byte(`{"mcp":{"servers":{"docs":{"type":"local","command":["a"]}},"docs":{"type":"local","command":["b"]}}}`), ""); err == nil || !strings.Contains(err.Error(), "docs") {
t.Fatalf("same name in both places: %v", err)
}
}
+17
View File
@@ -145,6 +145,23 @@ func importNative(target string, data []byte, singleName string, adapter, piProj
if err != nil {
return nil, err
}
// OpenCode 2 nests its servers under mcp.servers, next to defaults in mcp.timeout; one server
// named servers has other fields.
nested, section := native.Entries["servers"]
section = section && target == "opencode"
for _, value := range nested {
section = section && isObject(value)
}
if section {
delete(native.Entries, "servers")
delete(native.Entries, "timeout")
for name, entry := range nested {
if _, both := native.Entries[name]; both {
return nil, fmt.Errorf("MCP server %s is in both mcp and mcp.servers; keep one", name)
}
native.Entries[name] = entry.(map[string]any)
}
}
if len(native.Entries) == 0 && singleName != "" && !isTOMLTarget(target) && target != "goose" {
v := native.json.Clone()
v.Standardize()
+2
View File
@@ -88,6 +88,8 @@ type Server struct {
// Agent's global config defines. Unselecting an Agent already covers a server
// Skillshare defines, so a disabled server carries no command or url.
Disabled bool `yaml:"disabled,omitempty" json:"disabled,omitempty"`
// global is the same-named server of the global config, nil in project mode or when absent.
global *Server
}
// legacyServerFields chose Pi's MCP extension and opted in to pruning Pi fields, before
+21
View File
@@ -39,6 +39,10 @@ func switchOnly(target string, entry map[string]any) bool {
// Before Pi 1.0.1 support, the switch also carried the global server's command or url.
return entry["enabled"] == false && (len(entry) == 1 || len(entry) == 2 && (entry["command"] != nil || entry["url"] != nil))
}
if target == "opencode" && len(entry) == 3 && entry["type"] != nil && (entry["command"] != nil || entry["url"] != nil) {
// OpenCode's switch carries the global server's type and command or url; see renderDisabled.
return entry["enabled"] == false
}
return len(entry) == 1 && (entry["enabled"] == false || entry["disabled"] == true)
}
@@ -100,6 +104,10 @@ type ledger struct {
// before 3.0.0, read mcp.json too. The dashboard matches the text, so change both together.
const PiBuiltinNotice = "Pi's built-in MCP needs Pi 0.99.0 or later; on older Pi these servers stop loading until Pi is updated. If pi-mcp-adapter or pi-mcp-extension is still installed in Pi, remove it, because it can take the place of Pi's built-in MCP"
// OpenCodeSwitchNotice explains a switch that names no endpoint, which OpenCode 2 ignores. The
// dashboard matches the text, so change both together.
const OpenCodeSwitchNotice = "OpenCode 2 ignores a project entry that only turns a server off, so the server stays on there. Skillshare writes the server's type and command or url only when its global config defines the server; add it there, or turn it off in OpenCode's global config"
// piExtensionEntry reports an entry Skillshare wrote for pi-mcp-adapter or pi-mcp-extension
// before 0.23.0: one in the adapter's own file, or one with the transport field only
// pi-mcp-extension read. The built-in entry never has it, and it is part of the hash, so an
@@ -283,6 +291,7 @@ func followingSwitches(servers map[string]Server, defaults []string, global *Sou
var reached []string
if global != nil {
if shared, ok := global.Servers[name]; ok {
server.global = &shared
if reached = shared.Targets; reached == nil {
reached = global.Targets
}
@@ -588,6 +597,7 @@ func (s *Service) previewResolved(source *Source, resolutions []Resolution) (*Pl
}
projectRoots := sortedKeys(source.Projects)
piMoves := source.piExtensionSettings
endpointless := false
keys := make([]fileKey, 0, len(desired))
for key := range desired {
keys = append(keys, key)
@@ -629,6 +639,11 @@ func (s *Service) previewResolved(source *Source, resolutions []Resolution) (*Pl
current := native.Entries[name]
currentHash := entryHash(managedEntry(target, current))
want := desired[fk][name]
// Once the global server leaves this config, a switch still carrying its endpoint keeps it:
// OpenCode may still define the server, and OpenCode 2 ignores the bare switch.
if kept := managedEntry(target, current); target == "opencode" && len(want) == 1 && len(kept) == 3 && switchOnly(target, want) && switchOnly(target, kept) && managed && owned.Owner == source.ConfigPath && currentHash == owned.Hash {
want = kept
}
wantHash := entryHash(managedEntry(target, want))
prune := map[string]bool{}
pruneConflict := false
@@ -752,6 +767,9 @@ func (s *Service) previewResolved(source *Source, resolutions []Resolution) (*Pl
if (change.Action == "remove" || change.Action == "update") && piExtensionEntry(target, path, current) {
piMoves = true
}
if target == "opencode" && change.Switch && len(want) == 1 {
endpointless = true
}
change.Fields = changedFieldNames(current, f.changes[name], change.Action)
if change.Action == "conflict" {
p.Blocked = true
@@ -770,6 +788,9 @@ func (s *Service) previewResolved(source *Source, resolutions []Resolution) (*Pl
if piMoves {
p.Notices = append(p.Notices, PiBuiltinNotice)
}
if endpointless {
p.Notices = append(p.Notices, OpenCodeSwitchNotice)
}
for _, found := range matched {
if !found {
return nil, fmt.Errorf("conflict resolution does not refer to a selected MCP entry")
+17 -2
View File
@@ -2,14 +2,25 @@ package mcp
import (
"fmt"
"net/url"
"sort"
"strings"
)
// renderDisabled writes only the switch. That works where the Agent merges its project
// file over its global one field by field, so the global command or url survives. Agents
// renderDisabled writes the switch, alone where the Agent merges its project file over its
// global one field by field, so the global command or url survives. Agents
// that replace the whole entry, or reject one without a transport, would break instead.
func renderDisabled(target string, s Server) (map[string]any, error) {
switch {
case target == "opencode" && s.global != nil:
// OpenCode 2 replaces the global server and drops an entry without type and command or url.
// A disabled server never starts, so the committed file gets only the executable's name or
// the url's origin: args, env, headers, a home path and a key in the url's path stay out.
if command := s.global.Command; command != "" {
return map[string]any{"type": "local", "command": []string{command[strings.LastIndexAny(command, `/\`)+1:]}, "enabled": false}, nil
}
u, _ := url.Parse(s.global.URL) // validated by Server.validate
return map[string]any{"type": "remote", "url": u.Scheme + "://" + u.Host, "enabled": false}, nil
case openCodeFormat(target):
return map[string]any{"enabled": false}, nil
case target == "omp":
@@ -182,6 +193,10 @@ func (s *Service) RenderNative(name string, server Server) []Rendered {
// An unreadable config has no accounts.
if source, err := LoadSource(s.ConfigPath); err == nil {
s = s.withAccounts(source.Accounts)
// A switch under mcp.projects follows the global server of the same name, as in sync.
if shared, ok := source.Servers[name]; ok && server.Disabled && s.ProjectRoot != "" && s.configProjectRoot() == "" {
server.global = &shared
}
}
out := make([]Rendered, 0, len(server.Targets))
for _, target := range server.Targets {
+2 -1
View File
@@ -139,7 +139,8 @@ func TestAntigravityProjectIsolation(t *testing.T) {
}
func TestOpenCodeConfigPreservesOtherEntries(t *testing.T) {
for _, version := range []string{"1.18.31", "2.0.0"} {
// OpenCode 2 prints its name before the version.
for _, version := range []string{"1.18.31", "2.0.0", "opencode v2.0.27"} {
t.Run(version, func(t *testing.T) {
home := t.TempDir()
t.Setenv("HOME", home)
+10 -1
View File
@@ -175,8 +175,17 @@ func (s *Service) openCodeConfigPath() (string, error) {
return filepath.Join(dir, "opencode.json"), nil
}
func openCode2(version string) bool {
key, _ := openCodeKey(version)
return key == "plugins"
}
// openCodeKey reads `opencode --version`: OpenCode 1 prints 1.x, OpenCode 2 "opencode v2.x".
func openCodeKey(version string) (string, error) {
v := strings.TrimPrefix(strings.TrimSpace(version), "v")
v := ""
if fields := strings.Fields(version); len(fields) > 0 {
v = strings.TrimPrefix(fields[len(fields)-1], "v")
}
if strings.HasPrefix(v, "1.") {
return "plugin", nil
}
+1 -1
View File
@@ -169,7 +169,7 @@ func (s *Service) Preview(ctx context.Context, r Request) (*Plan, error) {
}
// pi update has no project scope, and OpenCode v1 has no update command. omp's upgrade
// would reinstall whatever the native marketplace holds, which Skillshare never reviewed.
if c.Action == "update" && c.Binding.Source == "" && (s.ProjectRoot != "" && agent == "pi" || agent == "omp") || c.Action == "update" && c.Binding.Source == "" && agent == "opencode" && (s.ProjectRoot != "" || !strings.HasPrefix(strings.TrimPrefix(h.Version, "v"), "2.")) {
if c.Action == "update" && c.Binding.Source == "" && (s.ProjectRoot != "" && agent == "pi" || agent == "omp") || c.Action == "update" && c.Binding.Source == "" && agent == "opencode" && (s.ProjectRoot != "" || !openCode2(h.Version)) {
skip("plugins.skip.imported", "Update imported packages in the native client; Skillshare updates reviewed source snapshots only.", nil)
}
if c.Action == "update" && agent == "opencode" && c.Binding.Source == "" {
+3 -2
View File
@@ -357,14 +357,15 @@ printing `Updated config.yaml for 0.23.0 (backup: <path>)`. `--dry-run` writes n
## Turn off a global server in one project
Needs a project in scope: `-p`, a folder with `.skillshare/config.yaml`, or a root under
`mcp.projects` in the global config. It writes just the switch; OpenCode, Kilo Code
`mcp.projects` in the global config. It writes just the switch; Kilo Code
and Pi keep the global connection, while OMP suppresses the same-named entry. NAME must be the name in the Agent's own global config;
Skillshare does not check that it exists there.
| Target | Supported | Written |
|---|---|---|
| `claude` | Yes | name added to this project's `disabledMcpServers` in `~/.claude.json` (per machine) |
| `opencode`, `kilocode` | Yes | `{"enabled": false}` |
| `opencode` | Yes | Under `mcp.projects`: the global server's `type` and executable name, or URL scheme and host, with `"enabled": false` (OpenCode 2 drops a bare switch). Otherwise `{"enabled": false}`, which OpenCode 2 ignores |
| `kilocode` | Yes | `{"enabled": false}` |
| `pi` | Pi 1.0.1+ | `{"enabled": false}`, Pi's project override |
| `omp` | Yes | `{"enabled": false}`, suppresses the same-named user entry |
| `codex` | No | see [Codex](#codex) |
+1
View File
@@ -224,6 +224,7 @@ describe('mcpNotice', () => {
it('words the plan notices with UI keys, keeping the servers they name', () => {
expect(mcpNotice(t, "Pi's built-in MCP needs Pi 0.99.0 or later; on older Pi these servers stop loading until Pi is updated. If pi-mcp-adapter or pi-mcp-extension is still installed in Pi, remove it, because it can take the place of Pi's built-in MCP")).toBe('[mcp.notice.piBuiltin]');
expect(mcpNotice(t, "OpenCode 2 ignores a project entry that only turns a server off, so the server stays on there. Skillshare writes the server's type and command or url only when its global config defines the server; add it there, or turn it off in OpenCode's global config")).toBe('[mcp.notice.openCodeSwitch]');
expect(mcpNotice(t, 'Pi now uses its built-in MCP; the next sync updates the config: docs, local (shop)')).toBe('[mcp.notice.piExtension {"names":"docs, local (shop)"}]');
expect(mcpNotice(t, "Pi's built-in MCP does not read idleTimeout, lifecycle; the next sync removes them: docs")).toBe('[mcp.notice.adapterOptions {"fields":"idleTimeout, lifecycle","names":"docs"}]');
expect(mcpNotice(t, 'tool policy not applied for opencode: allow (lists)')).toBe('[mcp.notice.toolPolicy {"agent":"OpenCode","parts":"[mcp.tools.gap.allow]","names":"lists"}]');
+1
View File
@@ -368,6 +368,7 @@ export const backupTime = (id: string) => new Date(Number(id.split('-')[0]) / 1e
// other is shown as sent. A legacy notice ends in ": <servers>", a tool policy one in " (<servers>)".
const noticeKeys: Record<string, string> = {
"Pi's built-in MCP needs Pi 0.99.0 or later; on older Pi these servers stop loading until Pi is updated. If pi-mcp-adapter or pi-mcp-extension is still installed in Pi, remove it, because it can take the place of Pi's built-in MCP": 'mcp.notice.piBuiltin',
"OpenCode 2 ignores a project entry that only turns a server off, so the server stays on there. Skillshare writes the server's type and command or url only when its global config defines the server; add it there, or turn it off in OpenCode's global config": 'mcp.notice.openCodeSwitch',
};
const legacyNoticeKeys: Record<string, string> = {
'Pi now uses its built-in MCP; the next sync updates the config': 'mcp.notice.piExtension',
+1
View File
@@ -1627,6 +1627,7 @@
"mcp.syncDialog.subtitle": "Diese Änderungen werden in die MCP-Konfigurationsdateien geschrieben. Von jeder Datei wird ein Backup aufbewahrt.",
"mcp.syncDialog.done": "Die MCP-Konfigurationsdateien wurden geschrieben.",
"mcp.notice.piBuiltin": "Das integrierte MCP von Pi braucht Pi 0.99.0 oder neuer. Mit älterem Pi laden diese Server nicht mehr, bis Pi aktualisiert ist. Wenn pi-mcp-adapter oder pi-mcp-extension noch in Pi installiert ist, entferne es, denn es kann das integrierte MCP von Pi ersetzen.",
"mcp.notice.openCodeSwitch": "OpenCode 2 ignoriert einen Projekteintrag, der einen Server nur ausschaltet, daher bleibt der Server dort aktiv. Skillshare kann Typ und Befehl oder URL des Servers nur schreiben, wenn seine globale Konfiguration den Server definiert. Füge ihn dort hinzu oder schalte ihn in der globalen OpenCode-Konfiguration aus.",
"mcp.notice.piExtension": "Pi nutzt jetzt sein integriertes MCP; der nächste Sync aktualisiert die Konfiguration: {names}",
"mcp.notice.piOptionsPrune": "piOptionsPrune wird nicht mehr verwendet; der nächste Sync entfernt es: {names}",
"mcp.notice.adapterOptions": "Das integrierte MCP von Pi liest {fields} nicht; der nächste Sync entfernt sie: {names}",
+1
View File
@@ -1627,6 +1627,7 @@
"mcp.syncDialog.subtitle": "These changes are written to the MCP config files. A backup of each file is kept.",
"mcp.syncDialog.done": "The MCP config files are written.",
"mcp.notice.piBuiltin": "Pi's built-in MCP needs Pi 0.99.0 or later. On older Pi these servers stop loading until Pi is updated. If pi-mcp-adapter or pi-mcp-extension is still installed in Pi, remove it, because it can take the place of Pi's built-in MCP.",
"mcp.notice.openCodeSwitch": "OpenCode 2 ignores a project entry that only turns a server off, so the server stays on there. Skillshare can write the server's type and command or URL only when its global config defines the server. Add it there, or turn it off in OpenCode's global config.",
"mcp.notice.piExtension": "Pi now uses its built-in MCP; the next sync updates the config: {names}",
"mcp.notice.piOptionsPrune": "piOptionsPrune is no longer used; the next sync removes it: {names}",
"mcp.notice.adapterOptions": "Pi's built-in MCP does not read {fields}; the next sync removes them: {names}",
+1
View File
@@ -1627,6 +1627,7 @@
"mcp.syncDialog.subtitle": "Estos cambios se escriben en los archivos de configuración de MCP. Se guarda una copia de seguridad de cada archivo.",
"mcp.syncDialog.done": "Los archivos de configuración de MCP se han escrito.",
"mcp.notice.piBuiltin": "El MCP integrado de Pi necesita Pi 0.99.0 o posterior. Con un Pi anterior, estos servidores dejan de cargarse hasta que actualices Pi. Si pi-mcp-adapter o pi-mcp-extension sigue instalado en Pi, quítalo, porque puede ocupar el lugar del MCP integrado de Pi.",
"mcp.notice.openCodeSwitch": "OpenCode 2 ignora una entrada de proyecto que solo desactiva un servidor, así que el servidor sigue activo allí. Skillshare solo puede escribir el tipo y el comando o la URL del servidor cuando su configuración global lo define. Agrégalo allí o desactívalo en la configuración global de OpenCode.",
"mcp.notice.piExtension": "Pi ahora usa su MCP integrado; la próxima sincronización actualiza la configuración: {names}",
"mcp.notice.piOptionsPrune": "piOptionsPrune ya no se usa; la próxima sincronización lo quita: {names}",
"mcp.notice.adapterOptions": "El MCP integrado de Pi no lee {fields}; la próxima sincronización los quita: {names}",
+1
View File
@@ -1627,6 +1627,7 @@
"mcp.syncDialog.subtitle": "این تغییرات در فایل‌های پیکربندی MCP نوشته می‌شوند. از هر فایل یک نسخهٔ پشتیبان نگه داشته می‌شود.",
"mcp.syncDialog.done": "فایل‌های پیکربندی MCP نوشته شدند.",
"mcp.notice.piBuiltin": "MCP داخلی Pi به Pi نسخهٔ 0.99.0 یا بالاتر نیاز دارد. در Pi قدیمی‌تر این سرورها تا به‌روزرسانی Pi بارگذاری نمی‌شوند. اگر pi-mcp-adapter یا pi-mcp-extension هنوز در Pi نصب است، آن را حذف کنید، چون می‌تواند جای MCP داخلی Pi را بگیرد.",
"mcp.notice.openCodeSwitch": "OpenCode 2 ورودی پروژه‌ای را که فقط یک سرور را خاموش می‌کند نادیده می‌گیرد، بنابراین سرور در آنجا روشن می‌ماند. Skillshare فقط وقتی پیکربندی سراسری‌اش سرور را تعریف کند می‌تواند نوع و فرمان یا URL سرور را بنویسد. آن را آنجا اضافه کنید، یا در پیکربندی سراسری OpenCode خاموشش کنید.",
"mcp.notice.piExtension": "Pi اکنون از MCP داخلی خود استفاده می‌کند؛ همگام‌سازی بعدی پیکربندی را به‌روز می‌کند: {names}",
"mcp.notice.piOptionsPrune": "piOptionsPrune دیگر استفاده نمی‌شود؛ همگام‌سازی بعدی آن را حذف می‌کند: {names}",
"mcp.notice.adapterOptions": "MCP داخلی Pi این‌ها را نمی‌خواند: {fields}؛ همگام‌سازی بعدی آن‌ها را حذف می‌کند: {names}",
+1
View File
@@ -1627,6 +1627,7 @@
"mcp.syncDialog.subtitle": "Ces modifications sont écrites dans les fichiers de configuration MCP. Une sauvegarde de chaque fichier est conservée.",
"mcp.syncDialog.done": "Les fichiers de configuration MCP ont été écrits.",
"mcp.notice.piBuiltin": "Le MCP intégré de Pi nécessite Pi 0.99.0 ou plus récent. Avec un Pi plus ancien, ces serveurs ne se chargent plus tant que Pi n'est pas mis à jour. Si pi-mcp-adapter ou pi-mcp-extension est encore installé dans Pi, supprimez-le, car il peut prendre la place du MCP intégré de Pi.",
"mcp.notice.openCodeSwitch": "OpenCode 2 ignore une entrée de projet qui ne fait que désactiver un serveur, donc le serveur reste actif. Skillshare ne peut écrire le type et la commande ou l'URL du serveur que si sa configuration globale définit ce serveur. Ajoutez-le là, ou désactivez-le dans la configuration globale d'OpenCode.",
"mcp.notice.piExtension": "Pi utilise désormais son MCP intégré ; la prochaine synchronisation met à jour la configuration : {names}",
"mcp.notice.piOptionsPrune": "piOptionsPrune n'est plus utilisé ; la prochaine synchronisation le supprime : {names}",
"mcp.notice.adapterOptions": "Le MCP intégré de Pi ne lit pas {fields} ; la prochaine synchronisation les supprime : {names}",
+1
View File
@@ -1627,6 +1627,7 @@
"mcp.syncDialog.subtitle": "Perubahan ini ditulis ke file konfigurasi MCP. Cadangan setiap file disimpan.",
"mcp.syncDialog.done": "File konfigurasi MCP sudah ditulis.",
"mcp.notice.piBuiltin": "MCP bawaan Pi memerlukan Pi 0.99.0 atau lebih baru. Di Pi versi lama, server ini berhenti dimuat sampai Pi diperbarui. Jika pi-mcp-adapter atau pi-mcp-extension masih terpasang di Pi, hapus, karena bisa menggantikan MCP bawaan Pi.",
"mcp.notice.openCodeSwitch": "OpenCode 2 mengabaikan entri proyek yang hanya mematikan server, jadi server tetap aktif di sana. Skillshare hanya dapat menulis tipe dan perintah atau URL server jika konfigurasi globalnya mendefinisikan server tersebut. Tambahkan di sana, atau matikan di konfigurasi global OpenCode.",
"mcp.notice.piExtension": "Pi sekarang memakai MCP bawaannya; sinkronisasi berikutnya memperbarui konfigurasi: {names}",
"mcp.notice.piOptionsPrune": "piOptionsPrune tidak dipakai lagi; sinkronisasi berikutnya menghapusnya: {names}",
"mcp.notice.adapterOptions": "MCP bawaan Pi tidak membaca {fields}; sinkronisasi berikutnya menghapusnya: {names}",
+1
View File
@@ -1627,6 +1627,7 @@
"mcp.syncDialog.subtitle": "これらの変更を MCP の設定ファイルに書き込みます。各ファイルのバックアップを残します。",
"mcp.syncDialog.done": "MCP の設定ファイルに書き込みました。",
"mcp.notice.piBuiltin": "Pi の内蔵 MCP には Pi 0.99.0 以降が必要です。古い Pi では、更新するまでこれらのサーバーは読み込まれません。pi-mcp-adapter または pi-mcp-extension が Pi にまだ入っている場合は削除してください。Pi の内蔵 MCP の代わりに動くことがあります。",
"mcp.notice.openCodeSwitch": "OpenCode 2 はサーバーをオフにするだけのプロジェクトエントリを無視するため、そこではサーバーがオンのままです。Skillshare がサーバーの type と command または URL を書き込めるのは、グローバル設定でそのサーバーが定義されている場合だけです。そこに追加するか、OpenCode のグローバル設定でオフにしてください。",
"mcp.notice.piExtension": "Pi は内蔵 MCP を使うようになりました。次の sync で config を更新します: {names}",
"mcp.notice.piOptionsPrune": "piOptionsPrune は使われなくなりました。次の sync で削除します: {names}",
"mcp.notice.adapterOptions": "Pi の内蔵 MCP は {fields} を読みません。次の sync で削除します: {names}",
+1
View File
@@ -1627,6 +1627,7 @@
"mcp.syncDialog.subtitle": "이 변경 사항을 MCP 설정 파일에 기록합니다. 각 파일의 백업을 남깁니다.",
"mcp.syncDialog.done": "MCP 설정 파일에 기록했습니다.",
"mcp.notice.piBuiltin": "Pi 내장 MCP에는 Pi 0.99.0 이상이 필요합니다. 이전 Pi에서는 업데이트할 때까지 이 서버들이 로드되지 않습니다. Pi에 pi-mcp-adapter나 pi-mcp-extension이 아직 설치되어 있다면 제거하세요. Pi 내장 MCP를 대신할 수 있습니다.",
"mcp.notice.openCodeSwitch": "OpenCode 2는 서버를 끄기만 하는 프로젝트 항목을 무시하므로 그곳에서 서버가 계속 켜져 있습니다. Skillshare는 전역 설정이 서버를 정의할 때만 서버의 type과 command 또는 URL을 작성할 수 있습니다. 그곳에 추가하거나 OpenCode 전역 설정에서 끄세요.",
"mcp.notice.piExtension": "Pi는 이제 내장 MCP를 사용합니다. 다음 sync에서 설정을 업데이트합니다: {names}",
"mcp.notice.piOptionsPrune": "piOptionsPrune은 더 이상 사용되지 않습니다. 다음 sync에서 제거합니다: {names}",
"mcp.notice.adapterOptions": "Pi 내장 MCP는 {fields}을(를) 읽지 않습니다. 다음 sync에서 제거합니다: {names}",
+1
View File
@@ -1627,6 +1627,7 @@
"mcp.syncDialog.subtitle": "Estas alterações são gravadas nos arquivos de configuração do MCP. Um backup de cada arquivo é mantido.",
"mcp.syncDialog.done": "Os arquivos de configuração do MCP foram gravados.",
"mcp.notice.piBuiltin": "O MCP integrado do Pi precisa do Pi 0.99.0 ou mais recente. Em um Pi mais antigo, esses servidores deixam de carregar até o Pi ser atualizado. Se o pi-mcp-adapter ou o pi-mcp-extension ainda estiver instalado no Pi, remova-o, porque ele pode tomar o lugar do MCP integrado do Pi.",
"mcp.notice.openCodeSwitch": "O OpenCode 2 ignora uma entrada de projeto que apenas desativa um servidor, então o servidor continua ativo lá. O Skillshare só pode gravar o tipo e o comando ou a URL do servidor quando sua configuração global define o servidor. Adicione-o lá ou desative-o na configuração global do OpenCode.",
"mcp.notice.piExtension": "O Pi agora usa o MCP integrado; a próxima sincronização atualiza a configuração: {names}",
"mcp.notice.piOptionsPrune": "piOptionsPrune não é mais usado; a próxima sincronização o remove: {names}",
"mcp.notice.adapterOptions": "O MCP integrado do Pi não lê {fields}; a próxima sincronização os remove: {names}",
+1
View File
@@ -1627,6 +1627,7 @@
"mcp.syncDialog.subtitle": "这些变更会写入 MCP 配置文件,每个文件都会保留备份。",
"mcp.syncDialog.done": "已写入 MCP 配置文件。",
"mcp.notice.piBuiltin": "Pi 内置 MCP 需要 Pi 0.99.0 或更高版本。旧版 Pi 在更新前不会加载这些 server。如果 Pi 仍安装着 pi-mcp-adapter 或 pi-mcp-extension,请将其移除,因为它可能取代 Pi 内置 MCP。",
"mcp.notice.openCodeSwitch": "OpenCode 2 会忽略只关闭服务器的项目条目,所以服务器在那里仍会开启。只有全局配置定义了该服务器时,Skillshare 才能写入它的 type 以及 command 或 URL。请在那里添加它,或在 OpenCode 的全局配置中关闭它。",
"mcp.notice.piExtension": "Pi 现在使用内置 MCP,下次同步会更新配置:{names}",
"mcp.notice.piOptionsPrune": "piOptionsPrune 已不再使用,下次同步会移除:{names}",
"mcp.notice.adapterOptions": "Pi 内置 MCP 不会读取 {fields},下次同步会移除:{names}",
+1
View File
@@ -1627,6 +1627,7 @@
"mcp.syncDialog.subtitle": "這些變更會寫入 MCP 設定檔,每個檔案都會保留備份。",
"mcp.syncDialog.done": "已寫入 MCP 設定檔。",
"mcp.notice.piBuiltin": "Pi 內建 MCP 需要 Pi 0.99.0 以上。舊版 Pi 在更新前不會載入這些 server。如果 Pi 還裝著 pi-mcp-adapter 或 pi-mcp-extension,請把它移除,因為它可能取代 Pi 內建 MCP。",
"mcp.notice.openCodeSwitch": "OpenCode 2 會忽略只關閉伺服器的專案項目,所以伺服器在那裡仍會開啟。只有全域設定定義了該伺服器時,Skillshare 才能寫入它的 type 以及 command 或 URL。請在那裡加入它,或在 OpenCode 的全域設定中關閉它。",
"mcp.notice.piExtension": "Pi 現在使用內建 MCP,下次同步會更新設定:{names}",
"mcp.notice.piOptionsPrune": "piOptionsPrune 已不再使用,下次同步會移除:{names}",
"mcp.notice.adapterOptions": "Pi 內建 MCP 不會讀取 {fields},下次同步會移除:{names}",
+1 -1
View File
@@ -63,7 +63,7 @@ export const fieldDocs: Record<string, FieldDoc> = {
description: 'HTTP or HTTPS MCP endpoint. The client connects to this service. Do not put credentials in the URL.',
type: 'string', example: 'url: https://example.com/mcp',
},
'mcp.servers.disabled': { description: 'Project mode only. Turns off a server that the Agent\'s own global config defines, by writing only the switch. Use it alone with targets. Works with claude, opencode and kilocode.', type: 'boolean', allowedValues: ['true'], example: 'disabled: true' },
'mcp.servers.disabled': { description: 'Project mode only. Turns off a server that the Agent\'s own global config defines, by writing only the switch; for opencode it also writes the global server\'s type and executable name or URL origin, because OpenCode 2 ignores a bare switch. Use it alone with targets. Works with claude, opencode and kilocode.', type: 'boolean', allowedValues: ['true'], example: 'disabled: true' },
'mcp.servers.transport': {
description: 'Optional transport. Inferred from command (stdio) or url (streamable-http).',
type: 'string', allowedValues: ['stdio', 'streamable-http'], example: 'transport: stdio',
+18 -3
View File
@@ -179,7 +179,7 @@ Names such as `company-docs` work across all supported clients.
| Codex | `~/.codex/config.toml` | `.codex/config.toml` | `mcp_servers` |
| Cursor | `~/.cursor/mcp.json` | `.cursor/mcp.json` | `mcpServers` |
| VS Code | User `mcp.json` (below) | `.vscode/mcp.json` | `servers` |
| OpenCode | `~/.config/opencode/opencode.json` | `opencode.json` | `mcp` |
| OpenCode | `~/.config/opencode/opencode.json` | `opencode.json` | `mcp`; import also reads OpenCode 2's `mcp.servers` |
| Kilo Code | `~/.config/kilo/kilo.jsonc` | `kilo.jsonc` | `mcp` |
| Grok CLI | `~/.grok/config.toml` | `.grok/config.toml` | `mcp_servers` |
| Antigravity (AGY) | `~/.gemini/config/mcp_config.json` | `.agents/mcp_config.json` | `mcpServers` |
@@ -374,14 +374,14 @@ This works with five clients only:
| Client | Supported | What Skillshare writes |
|---|---|---|
| Claude Code | Yes | `~/.claude.json`: the name, in this project's `disabledMcpServers` list |
| OpenCode | Yes | `opencode.json`: `"NAME": {"enabled": false}` |
| OpenCode | Yes | `opencode.json`: `"NAME": {"type": "local", "command": ["EXECUTABLE"], "enabled": false}`, or the URL for a remote server, see below |
| Kilo Code | Yes | `kilo.jsonc`: `"NAME": {"enabled": false}` |
| Pi | Yes, Pi 1.0.1 and later | `.pi/mcp.json`: `"NAME": {"enabled": false}`, see below |
| Oh My Pi | Yes | `.omp/mcp.json`: `"NAME": {"enabled": false}` shadows the same-named user entry |
| Codex | No | See below |
| Every other client | No | Selecting one is an error; nothing is written |
Only the switch is written. OpenCode, Kilo Code and Pi keep the command or URL from
Only the switch is written, except for OpenCode. Kilo Code and Pi keep the command or URL from
the global entry; OMP suppresses the disabled project entry before name deduplication,
so the same-named user entry cannot connect. The other clients are refused because they replace the whole global entry
with the project one, or have no project file, so a lone switch would break the
@@ -421,6 +421,21 @@ mcp:
targets: [opencode, kilocode]
```
OpenCode 2 replaces a global server with the project entry of the same name, and drops
an entry without its `type` and `command` or `url`, so a lone switch would leave the
server on. When the global config under `mcp.projects` defines the server, Skillshare
writes its type and executable name, or only its URL's scheme and host, next to
`"enabled": false`. OpenCode 1 reads the same entry. Args, env, headers, the executable's
directory and the URL's path and query stay out of the project file, which may be committed. A switch that already carries
them keeps them if the server later leaves the global config.
- If you turn the server back on in OpenCode, it starts with only the executable name or URL
origin from the project file, because that entry replaces the global one. Remove the
`disabled` entry from the project under `mcp.projects` instead, then sync.
- In project mode, or when the global config does not define the server, Skillshare can
only write `{"enabled": false}`. OpenCode 1 merges it; OpenCode 2 ignores it, and sync
says so. Turn the server off in OpenCode's global config there.
### Claude Code
Claude Code takes a whole server entry from one scope and never merges fields, so a
@@ -147,7 +147,7 @@ Grok の場合、名前は文字またはアンダースコアで始まり、文
| Codex | `~/.codex/config.toml` | `.codex/config.toml` | `mcp_servers` |
| Cursor | `~/.cursor/mcp.json` | `.cursor/mcp.json` | `mcpServers` |
| VS Code | User `mcp.json`(下記) | `.vscode/mcp.json` | `servers` |
| OpenCode | `~/.config/opencode/opencode.json` | `opencode.json` | `mcp` |
| OpenCode | `~/.config/opencode/opencode.json` | `opencode.json` | `mcp`。インポートは OpenCode 2 の `mcp.servers` も読み込みます |
| Kilo Code | `~/.config/kilo/kilo.jsonc` | `kilo.jsonc` | `mcp` |
| Grok CLI | `~/.grok/config.toml` | `.grok/config.toml` | `mcp_servers` |
| Antigravity (AGY) | `~/.gemini/config/mcp_config.json` | `.agents/mcp_config.json` | `mcpServers` |
@@ -275,14 +275,14 @@ Agent は自身の global MCP ファイルと project のファイルを合わ
| クライアント | 対応 | Skillshare が書き込む内容 |
|---|---|---|
| Claude Code | Yes | `~/.claude.json`: この project の `disabledMcpServers` リストにその名前を追加 |
| OpenCode | Yes | `opencode.json`: `"NAME": {"enabled": false}` |
| OpenCode | Yes | `opencode.json`: `"NAME": {"type": "local", "command": ["EXECUTABLE"], "enabled": false}`。リモートサーバーの場合は URL。下記参照 |
| Kilo Code | Yes | `kilo.jsonc`: `"NAME": {"enabled": false}` |
| Pi | Yes(Pi 1.0.1 以降) | `.pi/mcp.json`: `"NAME": {"enabled": false}`、下記参照 |
| Oh My Pi | Yes | `.omp/mcp.json`: `"NAME": {"enabled": false}` が同名のユーザーエントリを隠す |
| Codex | No | 下記参照 |
| その他すべてのクライアント | No | 選択するとエラー。何も書き込まれない |
書き込まれるのはスイッチのみです。OpenCode、Kilo Code、Pi は global エントリのコマンドまたは URL をそのまま保持します。OMP は名前の重複排除の前に無効化された project エントリを除外するため、同名のユーザーエントリは接続できません。他のクライアントが拒否されるのは、global エントリ全体を project 側のものに置き換えてしまうか、project ファイルを持たないため、スイッチだけを書き込むとオフにするどころかサーバーを壊してしまうからです。
書き込まれるのはスイッチのみです(OpenCode を除く)。Kilo Code、Pi は global エントリのコマンドまたは URL をそのまま保持します。OMP は名前の重複排除の前に無効化された project エントリを除外するため、同名のユーザーエントリは接続できません。他のクライアントが拒否されるのは、global エントリ全体を project 側のものに置き換えてしまうか、project ファイルを持たないため、スイッチだけを書き込むとオフにするどころかサーバーを壊してしまうからです。
Codex が拒否されるのは別の理由によります。Codex は `.codex/config.toml` を global ファイルの上にフィールド単位でマージするため、
global config がそのサーバーを定義しているマシンでは `enabled = false` 単体でも機能します。しかしそれを定義していないマシンでは、マージされたエントリに
@@ -311,6 +311,11 @@ mcp:
targets: [opencode, kilocode]
```
OpenCode 2 は global サーバーを同名の project エントリで置き換え、`type` と `command` または `url` を持たないエントリを破棄します。そのためスイッチだけではサーバーはオンのままです。`mcp.projects` の global config がそのサーバーを定義している場合、Skillshare はその type と実行ファイル名、または URL のスキームとホストだけを `"enabled": false` と並べて書き込みます。OpenCode 1 も同じエントリを読み込みます。args、env、headers、実行ファイルのディレクトリ、URL のパスとクエリはコミットされる可能性のある project ファイルに書き込まれません。すでにこれらを持つスイッチは、後でサーバーが global config から外れてもそのまま保持されます。
- OpenCode でサーバーを再びオンにすると、project ファイルのエントリが global のものを置き換えるため、実行ファイル名または URL のオリジンだけで起動します。代わりに `mcp.projects` のプロジェクトから `disabled` エントリを削除して sync してください。
- project モードの場合、または global config がサーバーを定義していない場合、Skillshare が書き込めるのは `{"enabled": false}` だけです。OpenCode 1 はこれをマージしますが、OpenCode 2 は無視し、sync がその旨を表示します。その場合は OpenCode の global config でサーバーをオフにしてください。
### Claude Code
Claude Code は 1 つのスコープからサーバーエントリ全体を取得し、フィールドをマージすることは決してないため、`.mcp.json` 内のスイッチはサーバーをオフにするのではなく置き換えてしまいます。Claude Code は
@@ -174,7 +174,7 @@ client에서 동작합니다.
| Codex | `~/.codex/config.toml` | `.codex/config.toml` | `mcp_servers` |
| Cursor | `~/.cursor/mcp.json` | `.cursor/mcp.json` | `mcpServers` |
| VS Code | User `mcp.json` (below) | `.vscode/mcp.json` | `servers` |
| OpenCode | `~/.config/opencode/opencode.json` | `opencode.json` | `mcp` |
| OpenCode | `~/.config/opencode/opencode.json` | `opencode.json` | `mcp`; import는 OpenCode 2의 `mcp.servers`도 읽습니다 |
| Kilo Code | `~/.config/kilo/kilo.jsonc` | `kilo.jsonc` | `mcp` |
| Grok CLI | `~/.grok/config.toml` | `.grok/config.toml` | `mcp_servers` |
| Antigravity (AGY) | `~/.gemini/config/mcp_config.json` | `.agents/mcp_config.json` | `mcpServers` |
@@ -360,14 +360,14 @@ Agent는 자체 global MCP 파일과 프로젝트 파일을 함께 읽습니다.
| Client | Supported | What Skillshare writes |
|---|---|---|
| Claude Code | 예 | `~/.claude.json`: 이름을 이 프로젝트의 `disabledMcpServers` 목록에 추가 |
| OpenCode | 예 | `opencode.json`: `"NAME": {"enabled": false}` |
| OpenCode | 예 | `opencode.json`: `"NAME": {"type": "local", "command": ["EXECUTABLE"], "enabled": false}`, 원격 서버는 URL, 아래 참고 |
| Kilo Code | 예 | `kilo.jsonc`: `"NAME": {"enabled": false}` |
| Pi | 예, Pi 1.0.1부터 | `.pi/mcp.json`: `"NAME": {"enabled": false}`, 아래 참조 |
| Oh My Pi | 예 | `.omp/mcp.json`: `"NAME": {"enabled": false}`가 같은 이름의 사용자 항목을 가림 |
| Codex | 아니요 | 아래 참고 |
| Every other client | 아니요 | 하나를 선택하면 오류가 발생하며 아무것도 작성되지 않음 |
스위치만 작성됩니다. OpenCode, Kilo Code, Pi는 global 항목의 command나 URL을 그대로 유지합니다.
OpenCode를 제외하면 스위치만 작성됩니다. Kilo Code, Pi는 global 항목의 command나 URL을 그대로 유지합니다.
OMP는 이름 중복 제거 전에 비활성화된 project 항목을 억제하므로 같은 이름의 사용자 항목이
연결되지 않습니다. 다른
client는 전체 global 항목을 프로젝트 항목으로 대체하거나 프로젝트 파일이 없기
@@ -407,6 +407,11 @@ mcp:
targets: [opencode, kilocode]
```
OpenCode 2는 global 서버를 같은 이름의 project 항목으로 교체하고, `type`과 `command` 또는 `url`이 없는 항목은 버립니다. 그래서 스위치만으로는 서버가 계속 켜져 있습니다. `mcp.projects`의 global config가 그 서버를 정의하면 Skillshare는 서버의 type과 실행 파일 이름, 또는 URL의 scheme과 host만 `"enabled": false`와 함께 작성합니다. OpenCode 1도 같은 항목을 읽습니다. args, env, headers, 실행 파일의 디렉터리, URL의 경로와 쿼리는 커밋될 수 있는 project 파일에 들어가지 않습니다. 이미 이 값을 가진 스위치는 나중에 서버가 global config에서 빠져도 그대로 유지됩니다.
- OpenCode에서 서버를 다시 켜면 project 파일의 항목이 global 항목을 교체하므로, 실행 파일 이름이나 URL origin만으로 시작됩니다. 대신 `mcp.projects`의 프로젝트에서 `disabled` 항목을 제거하고 sync하세요.
- project 모드이거나 global config가 서버를 정의하지 않으면 Skillshare는 `{"enabled": false}`만 작성할 수 있습니다. OpenCode 1은 이를 병합하지만 OpenCode 2는 무시하며, sync가 이를 알려 줍니다. 그 경우 OpenCode의 global config에서 서버를 끄세요.
### Claude Code
Claude Code는 한 scope에서 전체 서버 항목을 가져오며 필드를 병합하지 않으므로,
@@ -177,7 +177,7 @@ skillshare mcp edit docs --target claude # 把它加回来
| Codex | `~/.codex/config.toml` | `.codex/config.toml` | `mcp_servers` |
| Cursor | `~/.cursor/mcp.json` | `.cursor/mcp.json` | `mcpServers` |
| VS Code | 用户级 `mcp.json`(如下) | `.vscode/mcp.json` | `servers` |
| OpenCode | `~/.config/opencode/opencode.json` | `opencode.json` | `mcp` |
| OpenCode | `~/.config/opencode/opencode.json` | `opencode.json` | `mcp`;导入时也会读取 OpenCode 2 的 `mcp.servers` |
| Kilo Code | `~/.config/kilo/kilo.jsonc` | `kilo.jsonc` | `mcp` |
| Grok CLI | `~/.grok/config.toml` | `.grok/config.toml` | `mcp_servers` |
| Antigravity (AGY) | `~/.gemini/config/mcp_config.json` | `.agents/mcp_config.json` | `mcpServers` |
@@ -362,14 +362,14 @@ mcp:
| Client | 是否支持 | Skillshare 写入的内容 |
|---|---|---|
| Claude Code | 是 | `~/.claude.json`:在此项目的 `disabledMcpServers` 列表中写入名称 |
| OpenCode | 是 | `opencode.json`:`"NAME": {"enabled": false}` |
| OpenCode | 是 | `opencode.json`:`"NAME": {"type": "local", "command": ["EXECUTABLE"], "enabled": false}`,远程服务器则写 URL,见下文 |
| Kilo Code | 是 | `kilo.jsonc`:`"NAME": {"enabled": false}` |
| Pi | 是,Pi 1.0.1 起 | `.pi/mcp.json`: `"NAME": {"enabled": false}`,见下文 |
| Oh My Pi | 是 | `.omp/mcp.json`:`"NAME": {"enabled": false}` 会遮蔽同名的用户条目 |
| Codex | 否 | 见下文 |
| 其他所有 client | 否 | 选择其中任何一个都会报错;不会写入任何内容 |
只会写入这个开关。OpenCode、Kilo Code 和 Pi 仍会使用 global 条目中的 command 或 URL;
除 OpenCode 外,只会写入这个开关。Kilo Code 和 Pi 仍会使用 global 条目中的 command 或 URL;
OMP 会在按名称去重之前排除这个已关闭的 project 条目,因此同名的用户条目无法连接。
其他 client 之所以被拒绝,是因为它们会用 project 条目整体替换 global 条目,
或者没有 project 文件,因此单独一个开关会破坏
@@ -407,6 +407,11 @@ mcp:
targets: [opencode, kilocode]
```
OpenCode 2 会用同名的 project 条目整个取代 global 服务器,并丢弃缺少 `type` 以及 `command` 或 `url` 的条目,所以只写开关会让服务器保持开启。当 `mcp.projects` 所在的 global config 定义了该服务器时,Skillshare 会把它的 type 和可执行文件名,或只含 scheme 与 host 的 URL,与 `"enabled": false` 一起写入。OpenCode 1 也读取同样的条目。args、env、headers、可执行文件所在目录以及 URL 的路径和查询字符串都不会写进可能被提交的 project 文件。已经带有这些字段的开关,在服务器之后离开 global config 时会保留不变。
- 如果在 OpenCode 中重新开启该服务器,由于 project 条目会取代 global 条目,它只会带着可执行文件名或 URL 的 origin 启动。请改为从 `mcp.projects` 中该项目下移除 `disabled` 条目,再执行 sync。
- 在 project 模式下,或 global config 没有定义该服务器时,Skillshare 只能写入 `{"enabled": false}`。OpenCode 1 会合并它,OpenCode 2 会忽略它,sync 会给出提示。这种情况下请在 OpenCode 的 global config 中关闭该服务器。
### Claude Code
Claude Code 会从某个作用域整体取用一个 server 条目,绝不会合并字段,因此
@@ -146,7 +146,7 @@ skillshare mcp edit docs --target claude # 恢復同步
| Codex | `~/.codex/config.toml` | `.codex/config.toml` | `mcp_servers` |
| Cursor | `~/.cursor/mcp.json` | `.cursor/mcp.json` | `mcpServers` |
| VS Code | User `mcp.json`(如下) | `.vscode/mcp.json` | `servers` |
| OpenCode | `~/.config/opencode/opencode.json` | `opencode.json` | `mcp` |
| OpenCode | `~/.config/opencode/opencode.json` | `opencode.json` | `mcp`;匯入時也會讀取 OpenCode 2 的 `mcp.servers` |
| Kilo Code | `~/.config/kilo/kilo.jsonc` | `kilo.jsonc` | `mcp` |
| Grok CLI | `~/.grok/config.toml` | `.grok/config.toml` | `mcp_servers` |
| Antigravity (AGY) | `~/.gemini/config/mcp_config.json` | `.agents/mcp_config.json` | `mcpServers` |
@@ -329,14 +329,14 @@ project 中不要載入,請新增一個**使用該 Agent 的 global 檔案中
| Client | 是否支援 | Skillshare 會寫入什麼 |
|---|---|---|
| Claude Code | 是 | `~/.claude.json`:名稱會加入這個 project 的 `disabledMcpServers` 清單 |
| OpenCode | 是 | `opencode.json`:`"NAME": {"enabled": false}` |
| OpenCode | 是 | `opencode.json`:`"NAME": {"type": "local", "command": ["EXECUTABLE"], "enabled": false}`,遠端伺服器則寫 URL,見下文 |
| Kilo Code | 是 | `kilo.jsonc`:`"NAME": {"enabled": false}` |
| Pi | 是,Pi 1.0.1 起 | `.pi/mcp.json`: `"NAME": {"enabled": false}`,見下方 |
| Oh My Pi | 是 | `.omp/mcp.json`:`"NAME": {"enabled": false}` 會遮蔽同名的 user 項目 |
| Codex | 否 | 見下方說明 |
| 其他所有 client | 否 | 選擇它會是錯誤;不會寫入任何內容 |
只有開關會被寫入。OpenCode、Kilo Code 與 Pi 會沿用 global 項目中的 command 或 URL;
除了 OpenCode,只有開關會被寫入。Kilo Code 與 Pi 會沿用 global 項目中的 command 或 URL;
OMP 會在名稱去重之前先排除已停用的 project 項目,因此同名的 user 項目無法連線。
其他 clients 之所以被拒絕,是因為它們會用 project 項目整個取代 global
項目,或是沒有 project 檔案,因此單獨寫入一個開關反而會弄壞
@@ -374,6 +374,11 @@ mcp:
targets: [opencode, kilocode]
```
OpenCode 2 會用同名的 project 項目整個取代 global 伺服器,並丟棄缺少 `type` 以及 `command` 或 `url` 的項目,所以只寫開關會讓伺服器維持開啟。當 `mcp.projects` 所在的 global config 定義了該伺服器時,Skillshare 會把它的 type 和執行檔名稱,或只含 scheme 與 host 的 URL,與 `"enabled": false` 一起寫入。OpenCode 1 也讀得懂同樣的項目。args、env、headers、執行檔所在目錄以及 URL 的路徑和查詢字串都不會寫進可能被 commit 的 project 檔案。已經帶有這些欄位的開關,在伺服器之後離開 global config 時會保持不變。
- 如果在 OpenCode 裡重新開啟該伺服器,由於 project 項目會取代 global 項目,它只會帶著執行檔名稱或 URL 的 origin 啟動。請改為從 `mcp.projects` 中該專案底下移除 `disabled` 項目,再執行 sync。
- 在 project 模式下,或 global config 沒有定義該伺服器時,Skillshare 只能寫入 `{"enabled": false}`。OpenCode 1 會合併它,OpenCode 2 會忽略它,sync 會提醒。這種情況請在 OpenCode 的 global config 關閉該伺服器。
### Claude Code
Claude Code 會從單一 scope 整個取用一個 server 項目,絕不會合併欄位,所以