feat(plugins): add OpenSpec MCP plugin#1029
Conversation
Introduces kimi-openspec, an official MCP plugin for OpenSpec integration. - openspec_status: detect OpenSpec projects - openspec_list_changes: list changes with status - openspec_list_specs: list specs - openspec_read_change: read proposal/design/tasks - openspec_read_spec: read spec files Registered in marketplace.json.
🦋 Changeset detectedLatest commit: 5d1c59b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8af4f4c22e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| return; | ||
| } | ||
| try { | ||
| const cwd = msg.params._meta?.cwd || process.cwd(); |
There was a problem hiding this comment.
Use the session workspace for OpenSpec lookups
Kimi does not populate msg.params._meta.cwd when invoking MCP tools: StdioMcpClient.callTool forwards only { name, arguments }, and this plugin's manifest cwd is resolved to the managed plugin directory. As a result this fallback uses the plugin install directory rather than the active session workspace, so even in a repo with openspec/config.yaml, openspec_status and the list/read tools inspect $KIMI_CODE_HOME/plugins/managed/kimi-openspec/openspec and report no project.
Useful? React with 👍 / 👎.
| const { spec_id } = args; | ||
| // Try as a directory first, then as a file | ||
| const dirPath = join(cwd, 'openspec', 'specs', spec_id); | ||
| const filePath = join(cwd, 'openspec', 'specs', spec_id); |
There was a problem hiding this comment.
Keep spec paths inside openspec/specs
When openspec_read_spec is called with a spec_id containing .. and the workspace has an openspec/specs directory, join() normalizes the path outside the specs tree; for example ../../secret.txt reads <workspace>/secret.txt. The advertised schema only requires a string, so Kimi's tool-argument validation will not reject traversal segments; normalize/realpath the result and ensure it remains under openspec/specs before listing or reading.
Useful? React with 👍 / 👎.
- Detect image/* content types in LocalFetchURLProvider - Read binary body for images, convert to base64 data URI - Sniff image dimensions when available - Return image as ContentPart[] with image_url for LLM vision models - Update tool description to mention image support - Add tests for image fetching in both tool and provider
Summary
Introduces
kimi-openspec, an official MCP plugin that lets Kimi Code interact with OpenSpec projects.Changes
plugins/official/kimi-openspec/bin/kimi-openspec.mjs– MCP server (stdio transport) that reads OpenSpec files directly from diskkimi.plugin.json– Plugin manifestSKILL.md– Plugin documentationplugins/marketplace.json– Registered the new plugin.changeset/kimi-openspec-plugin.mdProvided Tools
openspec_statusopenspec_list_changesopenspec/changes/with statusopenspec_list_specsopenspec/specs/openspec_read_changeproposal.md,design.md, ortasks.mdinside a changeopenspec_read_specTesting
Notes
This is an MVP. Future iterations could add:
openspec/config.yamlparsing@fission-ai/openspec)