Skip to content

[noskills] Validation error in opencode.json for MCP server config generated by noskills init #128

@salihdev0

Description

@salihdev0

Bug Description

When initializing a project with noskills init and selecting OpenCode as a coding tool, the generated opencode.json file causes a strict configuration validation error when running opencode.

The generated configuration uses a string for the command field and an array for args (which is a common pattern in other MCP clients like Claude Desktop), and it omits the enabled key. However, opencode's schema strictly expects command to be an array of strings and requires the enabled boolean flag to be present.

Steps to Reproduce

  1. Run the initialization command in a project directory:
npx eser@latest noskills init
  1. Follow the interactive prompts and ensure OpenCode is selected as a coding tool:
┌  noskills init
│
◇  Config: .eser/          
◇  Project scanned      
◇    go
│
◇  0 coding tool(s) detected 
│
◇  No coding tools detected. Which tools do you use? (space to toggle) · Claude Code, OpenCode, Codex CLI
│
◇  3 provider(s) detected    
│
◇  What kind of project is this? (space to toggle, enter to confirm) · Beautiful Product, Long-Lived, Compliance, Well-Engineered
✓  Concerns: beautiful-product, long-lived, compliance, well-engineered
│
◇  Synced 4 tool(s)      
◇    claude-code
◇    opencode
◇    codex
◇    hooks
│
└  Done. 3 tool(s), 3 provider(s), 4 concern(s).
  1. Check the generated opencode.json file. It will have command as a string ("npx") and args as an array.
  2. Run the opencode command in the terminal.
  3. Observe the validation error preventing the command from executing.

Expected Behavior

Either noskills should generate the opencode.json file strictly conforming to the current OpenCode schema (using a command array and including "enabled": true), OR opencode should relax its schema to support the command (string) + args (array) format for better compatibility with standard MCP configurations.

Actual Behavior

The opencode command execution halts with the following output:

Configuration is invalid at /Users/ssi/projects/vesta/zenith/opencode.json
↳ Expected array, got "npx" mcp.noskills.command
↳ Missing key mcp.noskills.enabled

Runtime

Node.js

Package Version

@eserstack/noskills latest

Runtime Version

Node 24

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNeeds triage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions