Narnia
Narnia is a hybrid MCP server + Blazor web UI for browsing and searching GitHub Copilot CLI session history.
If you use Copilot CLI heavily, you know the pain: a Windows update reboots your machine and every active session terminal is gone. Narnia makes it easy to find and resume sessions — either by asking a new Copilot session to search for you (via MCP), or by browsing a local web interface.
Features
- MCP Server — exposes tools that any MCP-compatible client (including Copilot CLI) can call to search and browse your session history
- Web UI — Blazor-based local web interface for browsing, searching, and reading session details, checkpoints, and conversation turns
- Session workspace — reads supplemental metadata from
~/.copilot/session-state/ including git root and session artifact files
Prerequisites
- .NET 10 SDK
- Copilot CLI with an existing
~/.copilot/session-store.db
Running the MCP Server
The MCP server uses stdio transport and is designed to be launched by an MCP host.
Build
dotnet build src/NexusLabs.Narnia.McpServer
Configure in Copilot CLI
Add the following to your ~/.copilot/mcp-config.json:
{
"mcpServers": {
"narnia": {
"command": "dotnet",
"args": ["run", "--project", "C:/path/to/narnia/src/NexusLabs.Narnia.McpServer"],
"env": {}
}
}
}
After publishing as a NativeAOT binary (dotnet publish src/NexusLabs.Narnia.McpServer -c Release):
{
"mcpServers": {
"narnia": {
"command": "C:/path/to/NexusLabs.Narnia.McpServer.exe",
"args": [],
"env": {}
}
}
}
Available MCP Tools
| Tool | Description |
|---|
list_recent_sessions | Most recently updated sessions |
search_sessions | FTS5 full-text search across summaries, turns, and checkpoints |
get_session_details | Full session metadata and statistics |
get_session_checkpoints | All checkpoints with structured content |
get_session_turns | Conversation turns (paginated) |
get_session_workspace | Git root and session artifact files from the filesystem |
list_sessions_by_repository | Filter sessions by git repository |
list_sessions_by_cwd | Filter sessions by working directory |
Skills (Plugin System)
Narnia ships with agentic skills that can be loaded by Copilot CLI or Claude Code via their plugin systems. Skills let the LLM manage the web UI lifecycle directly — with full visibility into build output and adaptive error handling.
Available Skills
| Skill | Description |
|---|
narnia-web-server | Start, stop, restart, and check status of the Narnia web UI |
Installing as a Plugin
Narnia follows the standard plugin layout with plugin.json at the repo root.
Option A: Direct Install
Copilot CLI:
copilot plugin install ncosentino/narnia
Claude Code:
claude plugin install ncosentino/narnia
Option B: Via Marketplace
Register Narnia as a marketplace first, then install from it. This is useful if you want to browse available plugins before installing.
Copilot CLI (from inside a session):
/plugin marketplace add ncosentino/narnia
/plugin install narnia@narnia
Claude Code:
/plugin marketplace add ncosentino/narnia
/plugin install narnia@narnia
From a Local Clone
copilot plugin install ./path/to/narnia
Managing the Plugin
copilot plugin list # List installed plugins
copilot plugin update narnia # Update to latest
copilot plugin uninstall narnia # Remove the plugin
Once installed, skills are automatically available. Just ask the LLM to perform the task (e.g., "start the Narnia web server").
Running the Web UI
dotnet run --project src/NexusLabs.Narnia.Web
Then open http://localhost:5000 in your browser.
Configuration
Both the MCP server and web UI read configuration from environment variables:
| Variable | Description | Default |
|---|
NARNIA__DatabasePath | Path to session-store.db | ~/.copilot/session-store.db |
NARNIA__SessionStatePath | Path to session state directory | ~/.copilot/session-state |
Building from Source
git clone https://github.com/nexus-labs/narnia
cd narnia
dotnet build
dotnet test
Publish MCP server as NativeAOT
dotnet publish src/NexusLabs.Narnia.McpServer -c Release
Architecture