Skip to content

[feature] Claude Code integration: OpenContext MCP server configurable via opencontext CLI, publishable as a Claude Code plugin #21

Description

@Peefy

Problem

Claude Code is a primary agent harness for many OpenContext users, but today integrating OpenContext means manual plumbing such as:

claude mcp add opencontext -s user -- opencontext mcp \
  --embedding-provider local --memory-backend sqlite-vec

...and separately recreating any skill/command files by hand. There is no managed install path from our side, no way to keep the config in sync when providers/backends change, and no packaged slash-command surface.

Meanwhile the repo already ships plugins/dsh-opencontext for the DeepSeek Harness — Claude Code deserves the same treatment (see also the sibling Codex CLI request in #20).

Proposed solution

Again, two installation paths:

Path A — configure from the opencontext CLI

pnpm add -g @melandlabs/opencontext

# Writes the MCP registration (project .mcp.json or user scope, selectable via --scope)
opencontext mcp install --target claude-code [--scope project|user]

# Shell out to `claude mcp add ...` when the Claude Code CLI is detected,
# otherwise write JSON directly. Idempotent updates only.

# Health checks afterwards:
opencontext doctor --section integrations   # "claude-code" check

Path B — install as a Claude Code plugin

Ship a first-party Claude Code plugin under plugins/claude-code-opencontext/:

  • .claude-plugin/plugin.json manifest referencing an MCP server definition for opencontext mcp
  • Packaged skill(s): reuse the existing skill-body.md for the opencontext skill
  • Slash commands mapped from the DSH surface: /oc doctor, /oc search, /oc remember

Additionally host a marketplace manifest at the repo root (.claude-plugin/marketplace.json) so installation becomes:

/plugin marketplace add melandlabs/opencontext
/plugin install opencontext@melandlabs

Once published to npm, claude plugin install should work directly too.

Acceptance criteria

  • opencontext mcp install --target claude-code writes valid config for both project and user scopes and is idempotent
  • A fresh Claude Code session lists the oc_* tools and can recall/write shared memory
  • /oc doctor runs inside Claude Code and reflects the host environment (cwd, profile)
  • Marketplace install path verified end-to-end

Alternatives considered

  • Tell users to use claude mcp add manually (status quo): unmanaged, and it silently breaks when default providers change.
  • MCP registry listing only: solves discovery but not the skill/command packaging we already provide for DSH.

Where does this change live?

New plugin workspace plugins/claude-code-opencontext/ plus an install subcommand / integration section in packages/opencontext/src/cli/ (shared logic with the Codex target).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions