session-convert
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@session-convertconvert my last Claude Code session to OpenCode"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
session-convert
Move an AI coding session between Claude Code, Codex CLI, and OpenCode without losing the conversation.
Docs · Conversion reference · Русский
When the useful context is in the wrong coding agent, session-convert reads the source session, maps it to a common conversation, and writes the target agent's native JSONL or SQLite format. It is an MCP server for local, user-owned session files—not a hosted sync service.
What it does
Converts all six directions between Claude Code, Codex CLI, and OpenCode.
Reads Claude/Codex JSONL and current or legacy OpenCode SQLite layouts.
Preserves text, tool calls/results, reasoning where available, images, metadata, and model names.
Previews message counts, tool activity, and compatibility notes before writing.
Also exposes a direct-path conversion API for known
.jsonlor.dbfiles.
Related MCP server: codex-mcp-server
Install from source
There is no published package install documented here yet. For a source checkout, use Node.js 20+ and run:
git clone https://github.com/megamen32/session-convert.git
cd session-convert
npm ci
npm run buildThen point your MCP client at dist/index.js:
{
"mcpServers": {
"session-convert": {
"command": "node",
"args": ["/absolute/path/to/session-convert/dist/index.js"]
}
}
}First conversion
Use list_sessions to find a session, preview_conversion to inspect the mapping, and convert_session to write it. convert_by_path is available when you already know the source file. The server accesses local session files using the permissions of the MCP client.
Learn more
License
MIT
Available Tools
4 toolsconvert_by_pathA
Convert a session file by its direct file path. Auto-detects the format (Claude JSONL, Codex rollout JSONL, or OpenCode .db). Useful when you know the exact file location.
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target harness | |
| sourcePath | Yes | Absolute path to the source session file (.jsonl or .db) | |
| projectPath | No | For OpenCode target: project directory path |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the burden. It mentions auto-detection of format, which is helpful, but fails to disclose side effects (e.g., whether the conversion creates a new file, overwrites, or returns output) or any permissions needed. The disclosure is adequate but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences with no redundant information. Every word adds value: it defines the tool, states auto-detection, and gives usage context. Perfectly sized and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description covers purpose and when-to-use but lacks information about the result of conversion (output format, file creation, return value). It is moderately complete for a simple tool but could include more detail about what happens after conversion.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so parameters are already documented. The description adds contextual value (auto-detection logic) but does not elaborate on parameter specifics like allowed values for 'to' or path constraints. Baseline 3 is appropriate as the description adds marginal extra meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool converts a session file by its direct file path and lists the auto-detected formats. It distinguishes from sibling 'convert_session' by emphasizing the file path method, providing a specific verb-resource-scope combination.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description says 'Useful when you know the exact file location', which implies when to use, but does not explicitly provide when-not-to-use or compare to siblings like convert_session. The guidance is clear but lacks exclusionary context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
convert_sessionB
Convert a session from one harness to another. Reads the session, transforms messages to the target format, and writes it to the target harness's native storage. OpenCode conversion (read/write) is uniquely supported — no other tool does this.
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target harness | |
| from | Yes | Source harness | |
| sessionId | Yes | Session ID to convert | |
| projectPath | No | For OpenCode target: explicitly use this project-local .opencode/opencode.db; omitted uses the current global OpenCode database | |
| searchPaths | No | For OpenCode source: paths to search for databases |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It describes the process (read, transform, write) but omits important behavioral traits like whether the source is modified, required permissions, or potential side effects. The uniqueness claim is helpful but insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with two sentences, no redundancy, and front-loads the core purpose. However, it could be more structured with bullet points for clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and 5 parameters (3 required), the description fails to explain return values or the role of optional parameters (projectPath, searchPaths). The conversion process is described but completeness for decision-making is lacking.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds no additional meaning to parameters beyond what the schema already provides. It does not explain relationships between parameters or provide usage examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool converts a session between harnesses, using verbs 'reads', 'transforms', and 'writes'. It distinguishes from siblings by noting that OpenCode conversion is uniquely supported, making the purpose highly specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description hints at usage for OpenCode conversion but does not explicitly state when to use this tool versus siblings like convert_by_path or preview_conversion. No when-not-to-use guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_sessionsA
List convertible sessions from a harness. Shows session ID, title, CWD, model, message count, and age. Use this to find the session ID to convert.
| Name | Required | Description | Default |
|---|---|---|---|
| harness | Yes | Which harness to list sessions from | |
| cwdPrefix | No | Filter by CWD prefix (e.g. '~/apps' to find sessions in that directory tree) | |
| searchPaths | No | Additional paths to search for OpenCode databases (only for opencode harness) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must bear full burden. It states the tool lists sessions and shows fields, but does not explicitly declare read-only nature, potential rate limits, or pagination. A score of 3 reflects adequate but not explicit disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three concise sentences: action, output fields, usage. Front-loaded and no redundancy. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with 3 parameters all documented in schema, the description covers output fields and usage. It does not mention pagination or largest possible result set, but given the tool's simplicity, it is nearly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already describes all parameters. The description adds no additional parameter-level meaning beyond referencing harness and fields shown. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action ('List convertible sessions'), specifies the output fields, and distinguishes it from sibling conversion tools by indicating its role in finding session IDs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Use this to find the session ID to convert', which provides clear usage context. While it doesn't detail when not to use or list alternatives, the sibling tools are implicitly different (conversion vs. listing).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
preview_conversionA
Preview what a session conversion would look like without actually writing anything. Shows message breakdown, tool call stats, and compatibility notes for the target format.
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target harness | |
| from | Yes | Source harness | |
| sessionId | Yes | Session ID to preview | |
| searchPaths | No | For OpenCode source: paths to search for databases |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It states 'without actually writing anything' clarifying it's read-only, and describes output content. It does not mention permissions or error handling, but for a preview tool, the description is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the core action, and the second sentence elaborates on output. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of an output schema, the description provides a good overview of the return type. It explains the parameters sufficiently with schema coverage. Could mention expected structure or error states, but overall complete for a preview tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds context about what the preview shows, but does not add specific parameter-level meaning beyond what the schema provides. It adds marginal value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'preview' and the resource 'session conversion', and lists what it shows (message breakdown, tool call stats, compatibility notes). This distinguishes it from sibling tools like 'convert_session' which actually perform the conversion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by saying 'without actually writing anything', suggesting it's for safe preview. However, it does not explicitly state when to use this tool over alternatives like 'convert_session' or 'convert_by_path', though the context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
convert_by_path - First observed
convert_session - First observed
list_sessions - First observed
preview_conversion
TDQS
Each tool has a clearly distinct purpose: listing sessions, converting by session ID, previewing conversions, and converting by file path. There is no overlap or ambiguity between them.
All tools use snake_case with a verb_noun pattern. The two convert tools differ by the argument (session vs path), which is consistent but could be slightly confusing. Overall, naming is predictable and well-structured.
With 4 tools, the set is well-scoped for session conversion. Each tool serves a necessary function: listing, converting by ID, previewing, and converting by path. No unnecessary tools and no missing essential operations.
The tool set covers the full conversion workflow: discovering sessions (list_sessions), previewing before conversion (preview_conversion), and converting via two methods (by session ID or by file path). No obvious gaps for the stated purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Persistent cross-session memory shared by Codex, Claude Code, ChatGPT, and other AI agents.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Cross-agent artifact workspace with provenance across Claude Code, Codex, Cursor, LangGraph.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables searching and retrieving Claude Code conversation history that would otherwise expire after 30 days. Supports full-text search, semantic search, and session management with automatic backup of all conversations.728MIT
- AlicenseAqualityCmaintenanceBridges Claude and OpenAI's Codex CLI for AI-powered code analysis, generation, and review, with support for session management, web search, and structured output.6765628ISC
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to list, inspect, and export OpenCode AI coding sessions as HTML/JSON archives with secret redaction and token statistics.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to delegate prompts to an OpenCode agent session for cheaper executor-role work, supporting different providers and session persistence.23,488MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/megamen32/session-convert'
If you have feedback or need assistance with the MCP directory API, please join our Discord server