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.
- 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
- .NET 10 SDK
- Copilot CLI with an existing
~/.copilot/session-store.db
The MCP server uses stdio transport and is designed to be launched by an MCP host.
dotnet build src/NexusLabs.Narnia.McpServerAdd 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": {}
}
}
}| 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 |
open_narnia_ui |
Start the web UI if not running and open it in the default browser |
dotnet run --project src/NexusLabs.Narnia.WebThen open http://localhost:5000 in your browser.
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 |
NARNIA__WebUiUrl |
URL used by open_narnia_ui to check/open the web UI |
http://localhost:5244 |
NARNIA__WebProjectPath |
Path to the Web project (for open_narnia_ui to start the server). Auto-detected from source layout if not set. |
(auto-detected) |
git clone https://github.com/nexus-labs/narnia
cd narnia
dotnet build
dotnet testdotnet publish src/NexusLabs.Narnia.McpServer -c Releasenarnia/
src/
NexusLabs.Narnia.Core/ # Shared library — trim-safe, AOT-compatible
NexusLabs.Narnia.McpServer/ # MCP server — NativeAOT, stdio transport
NexusLabs.Narnia.Web/ # Blazor Static SSR web interface
tests/
NexusLabs.Narnia.Core.Tests/ # xUnit v3 test suite
The Core library is the only place where data access logic lives. Both the MCP server and Web app are thin entry points that register Core services and expose them to their respective transports.
session-store.db— SQLite with FTS5 full-text search (opened read-only)session-state/{guid}/workspace.yaml— flat key:value YAML with filesystem metadata (e.g.git_root)session-state/{guid}/files/— session artifact files (plan.md, context files, etc.)
- google-search-console-mcp -- Google Search Console MCP server: query clicks, impressions, CTR, and ranking position from your Search Console properties
- google-keyword-planner-mcp -- Google Ads Keyword Planner MCP server: keyword ideas, search volume, competition, and CPC data
- google-psi-mcp -- Zero-dependency MCP server for Google PageSpeed Insights Core Web Vitals
This tool was built by Nick Cosentino, a software engineer and content creator known as Dev Leader. Nick creates practical .NET, C#, ASP.NET Core, Blazor, and software engineering content for intermediate to advanced developers -- covering everything from performance optimization and clean architecture to real-world career advice.
Narnia was born out of a real frustration: Windows forcing a restart and wiping every active Copilot CLI session with no easy way to recover. It serves as a practical example of building NativeAOT C# MCP servers and Blazor Static SSR apps following modern .NET standards.
Find Nick online:
- Blog: https://www.devleader.ca
- YouTube: https://www.youtube.com/@devleaderca
- Newsletter: https://weekly.devleader.ca
- LinkedIn: https://linkedin.com/in/nickcosentino
- Linktree: https://www.linktr.ee/devleader
BrandGhost is a social media automation platform built by Nick that lets content creators cross-post and schedule content across all social platforms in one click. If you create content and want to spend less time on distribution and more time creating, check it out.
Contributions are welcome! Please:
- Open an issue describing the bug or feature request before submitting a PR
- Run
dotnet buildwith zero warnings before submitting - Run
dotnet test-- all tests must pass
MIT License -- see LICENSE for details.