Skip to main content
Glama
mosafly

agent-context-mcp

by mosafly

agent-context-mcp

One privacy-first MCP server for developers who work across AI coding agents.

Move between Claude Code, Codex, and Hermes without re-explaining what happened. agent-context-mcp reads the useful parts of your local agent history, sanitizes them, and returns structured Markdown through one MCP interface.

Local-first. Read-only. Sanitized before output.

Why this exists

When you switch AI coding tools, each one starts without the decisions, failures, and next steps from the others. This server gives a selected client a safe, read-only view of local context from:

  • Claude Code

  • Codex

  • Hermes

It also discovers local AI harnesses, MCP configurations, and CLI runtimes — and can generate dry-run proposals for skills or MCP migration.

Related MCP server: Colab MCP

Your sessions stay local

agent-context-mcp is not a session-sync product.

  • No hosted service by default

  • No telemetry or analytics

  • No background uploads

  • No writes to source session stores

  • No secrets, raw configuration values, or auth headers returned

  • No remote network connection unless you explicitly enable and deploy one

Before output, source adapters exclude system/developer instructions, bootstrap dumps, encrypted/internal reasoning, and secret-shaped values. Tool output is opt-in and bounded. Active JSONL files with a partial trailing line are tolerated.

Never commit your agent data. This repository ignores session stores, JSONL files, local databases, credentials, and .env files. Its tests check for personal Windows paths and project-specific markers.

Install

From source (current)

git clone https://github.com/mosafly/agent-context-mcp.git
cd agent-context-mcp
python -m pip install .

Requires Python 3.10+.

Claude Code

claude mcp add --scope user agent_context -- agent-context-mcp

Codex CLI

codex mcp add agent_context -- agent-context-mcp

Hermes

hermes mcp add agent_context --command agent-context-mcp

Claude Desktop

Add this to claude_desktop_config.json and restart Claude Desktop:

{
  "mcpServers": {
    "agent_context": {
      "command": "agent-context-mcp",
      "args": []
    }
  }
}

Start a new client session after installing so the MCP tool cache refreshes.

One unified interface

All conversation tools take a source:

hermes | codex | claude_code

Tool

Purpose

agent_list_conversations

List sanitized local conversations

agent_search_conversations

Search sanitized text

agent_read_conversation

Read one selected conversation

agent_read_latest_conversation

Read the latest conversation

agent_export_context_bundle

Produce a bounded handoff bundle without writing a file

agent_detect_harnesses

Detect known local AI harnesses

agent_detect_harness_mcps

Discover MCP names without secret values

agent_detect_harness_runtimes

Locate CLI runtimes without launching desktop apps

agent_propose_skill_installs

Produce a skill migration dry-run

agent_propose_mcp_installs

Produce a sanitized MCP migration dry-run

Migration proposals never edit configuration, copy skills, install packages, or transfer credentials.

Supported clients

Client

Local stdio

Remote HTTPS

Claude Code

Codex CLI

Hermes / Hermes CLI

Claude Desktop

Claude Cowork / claude.ai

✅ via an authenticated gateway

ChatGPT Desktop / Web

✅ via an authenticated gateway

Cloud clients cannot access your localhost or execute a local stdio command. Do not expose this server directly to the public internet.

Optional local HTTP mode

The default transport is stdio. A local Streamable HTTP server is available only after an explicit opt-in:

AGENT_CONTEXT_ALLOW_HTTP=1 agent-context-mcp \
  --transport streamable-http \
  --host 127.0.0.1 \
  --port 8000

For Cowork, claude.ai, ChatGPT, or any cloud client, place an authenticated HTTPS gateway in front of the service. Require OAuth or equivalent authentication, rate limits, and a deliberate deployment decision. Never publish a direct session reader without those controls.

Configuration

The bundled adapters use local defaults for common session locations. Set these environment variables only when your stores live elsewhere:

CODEX_SESSIONS_ROOT
CLAUDE_PROJECTS_ROOT
HERMES_HOME

Paths are read locally; their contents are never uploaded by this package.

Development

python -m pip install -e .
python -m unittest discover -s tests
python -m py_compile src/agent_context_mcp/*.py src/agent_context_mcp/adapters/*.py

License

MIT. See LICENSE.

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables AI coding assistants like Claude Code, Cursor, and Codex to share chat logs, terminal history, and session context with each other. Eliminates the need to re-explain context when switching between different AI coding tools.
    2
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables handoff of context between AI coding agents like Claude Code, Cursor, Codex, and Windsurf with built-in provenance tracking.
    9,668
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables listing and continuing conversations from Claude Code, Codex, Cursor, and GLM, allowing context handoff between tools by providing historical transcripts as context.
    5
    MIT

View all related MCP servers

Related MCP Connectors

  • One shared brain for your AI coding agents: team memory, agent Q&A, tasks, and file claims.

  • Stop re-explaining yourself to Agents. Give it the right context, right when needed.

  • Collective memory for AI agents. One agent solves a bug — every agent gets the fix instantly.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mosafly/agent-context-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server