New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@rockship/code-memory-mcp

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rockship/code-memory-mcp

A powerful Model Context Protocol (MCP) server implementation for seamless code memory integration, enabling AI assistants to interact with code memory data

latest
Source
npmnpm
Version
1.2.51
Version published
Maintainers
1
Created
Source

Code Memory MCP

Project Overview

@rockship/code-memory-mcp is a Model Context Protocol (MCP) server that provides a powerful code‑memory integration layer for AI assistants. It enables AI agents to store, retrieve, and reason over project‑specific code artifacts, facilitating context‑aware interactions such as code search, documentation lookup, and automated refactoring.

The server is built with TypeScript and runs on Node.js. It leverages the @modelcontextprotocol/sdk to expose a set of handlers for:

  • Resource management (files, memories, configurations)
  • Prompt handling (custom system prompts for AI)
  • Tool integration (search, edit, version control)
  • Real‑time streaming of logs and notifications via SSE or standard I/O.

Key Features

  • MCP‑compliant server exposing a standard API for AI assistants.
  • Modular architecture with separate handlers for resources, prompts, tools, and completions.
  • Supports multiple transport modes: stdio, sse, and HTTP.
  • Automatic subscription handling for real‑time updates.
  • Configurable via a simple code-memory.json project file.

Installation

# Install dependencies
pnpm install

# Build the project
pnpm run build

Usage

The entry point is the code-memory-mcp CLI. Choose a script to run:

# Run the default stdio server (recommended for local development)
pnpm start

# Run the Server‑Sent Events server
pnpm run start:sse

# Run the streamable HTTP server
pnpm run start:streamableHttp

You can also invoke a specific script directly:

node dist/index.js stdio   # or sse, streamableHttp, init

Project Structure

src/
├─ adapters/            # Adapter layer for external clients
├─ interfaces/          # TypeScript interfaces for client & query contracts
├─ network/             # HTTP client implementation
├─ prompts/             # System prompts and instructions used by the AI
├─ server/              # Core server logic and handler registrations
│   ├─ handlers.ts      # Main request handlers
│   ├─ resources.ts     # Resource (file/memory) management
│   ├─ tools.ts         # Tool registration for AI actions
│   └─ …
├─ utils/               # Helper utilities and constants
├─ cli.ts               # CLI entry point for init script
├─ code-memory.ts       # Server factory and configuration
├─ index.ts             # Dynamic script loader
└─ sse.ts / stdio.ts   # Transport implementations

Configuration

The server reads its configuration from code-memory.json (generated on first run). Example:

{
  "project_id": "73d22542-6ef2-47c7-9a1e-89f6b5ed55e7",
  "project_name": "Code Memory MCP",
  "repo_url": "git@github.com:Rockship-Team/code-memory-mcp.git",
  "created_at": "2025-10-28T10:25:09.735230Z"
}

Development

  • Watch mode: pnpm run watch recompiles on file changes.
  • Testing: Add tests under a tests/ directory and run with your preferred test runner.
  • Release: Use pnpm run release (changesets) to publish a new version.

License

MIT © Rockship

Keywords

mcp

FAQs

Package last updated on 03 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts