Back to blog

Connect the Contextberg MCP server with npx

Use the MCP bridge to make selected local work history available in Codex, Claude Code, Claude Desktop, or another compatible client.

この記事を日本語で読む →
Contextberg MCPnpxCodexClaude CodeLocal work memory

The desktop app holds the history

@contextberg/mcp-server is a bridge between an MCP client and the Contextberg desktop app's local API. It does not store your screenshots, browser history, or memories inside the npm package. The desktop app must be running, and the information available depends on what you chose to record.

Copy the current command from Contextberg

Open the app's MCP connection area and select your client. The generated command includes the local API URL for that installation. For example, the current macOS app offers a Codex command with this structure:

codex mcp add contextberg --env CONTEXTBERG_API_URL=<URL_FROM_APP> -- npx -y @contextberg/mcp-server

For Claude Code, the app generates a command with this structure:

claude mcp add --scope user -e CONTEXTBERG_API_URL=<URL_FROM_APP> --transport stdio contextberg -- npx -y @contextberg/mcp-server

Replace the placeholder by copying the complete command in the app; do not type the angle-bracket text literally. Claude Desktop and GUI clients can use the app's generated configuration. Reopen the client after connecting. Windows launch commands may use a different shell wrapper, so use the command shown by the installed Windows app.

Ask for a bounded slice of work

Contextberg can expose recent activity, generated daily or weekly memory, agent history, and long-term memory through its supported MCP tools. Availability depends on the app version, enabled features, and whether relevant data was recorded. Ask for a time range and a specific purpose rather than requesting the entire history.

Using Contextberg, summarize what I viewed and worked on in the last two hours.
Separate observed activity from inferred intent.
Identify the first file or page I should check to resume.

The answer should be checked against Record and any live repository or document. Browser history can show that a page was opened; it cannot prove you accepted its advice.

If the connection does not work

Confirm that Contextberg is running, the client shows the MCP server, the copied CONTEXTBERG_API_URL is current, and npx can start in that environment. If the tool is available but returns no recent activity, inspect Record and capture settings first. A bridge cannot recover an event that was never recorded.

For agents that support Skills, the app also offers a separate Skill installation command. The Skill helps the agent know when to ask for work context; MCP provides the live connection to that context.

Related posts