mcp-copilotcli-history

mcp-copilotcli-history

Enables searching and analyzing GitHub Copilot's conversation history stored locally, providing tools for full-text search, session listing, statistics, and file-based retrieval.

Category
Visit Server

README

mcp-copilotcli-history

An MCP server that provides tools for searching through GitHub Copilot's conversation history stored in ~/.copilot/session-state/.

Features

  • Search Sessions: Full-text search across all Copilot conversations
  • List Recent Sessions: View recent sessions with titles extracted from first user message
  • Session Statistics: Get aggregate stats about your Copilot usage
  • View Conversations: Read the full conversation from any session
  • Search by File: Find sessions that referenced specific files
  • Search Tool Usage: Find examples of how tools were used

Installation

Using uvx (recommended)

When using uv no specific installation is needed:

uvx mcp-copilotcli-history

Using pip

pip install mcp-copilotcli-history

After installation, run as a module:

python -m mcp_copilotcli_history

Configuration

Configure for Claude Desktop

Add to your claude_desktop_config.json:

<details> <summary>Using uvx</summary>

{
  "mcpServers": {
    "copilot-history": {
      "command": "uvx",
      "args": ["mcp-copilotcli-history"]
    }
  }
}

</details>

<details> <summary>Using pip installation</summary>

{
  "mcpServers": {
    "copilot-history": {
      "command": "python",
      "args": ["-m", "mcp_copilotcli_history"]
    }
  }
}

</details>

Configure for VS Code

Add the configuration to your user-level MCP configuration file. Open the Command Palette (Ctrl + Shift + P) and run MCP: Open User Configuration.

<details> <summary>Using uvx</summary>

{
  "servers": {
    "copilot-history": {
      "command": "uvx",
      "args": ["mcp-copilotcli-history"]
    }
  }
}

</details>

<details> <summary>Using pip installation</summary>

{
  "servers": {
    "copilot-history": {
      "command": "python",
      "args": ["-m", "mcp_copilotcli_history"]
    }
  }
}

</details>

Configure for Zed

Add to your Zed settings.json:

"context_servers": {
  "copilot-history": {
    "command": "uvx",
    "args": ["mcp-copilotcli-history"]
  }
}

Available Tools

search_sessions

Search through all Copilot session history for a pattern.

Arguments:

  • query (required): Search term or regex pattern
  • event_type (optional): Filter by event type (user.message, assistant.message, etc.)
  • max_results (optional): Maximum results to return (default: 20)
  • case_sensitive (optional): Case-sensitive matching (default: false)

list_recent_sessions

List the most recent Copilot sessions with their titles.

Arguments:

  • limit (optional): Maximum sessions to return (default: 10)

get_session_stats

Get statistics about all Copilot session history.

get_session_conversation

Get the conversation from a specific session.

Arguments:

  • session_id (required): Session ID (full or partial)
  • include_tool_calls (optional): Include tool call details (default: false)
  • max_messages (optional): Maximum messages to return (default: 50)

search_by_file_path

Find sessions that referenced a specific file or path pattern.

Arguments:

  • file_pattern (required): File path or pattern to search for
  • max_results (optional): Maximum results (default: 20)

search_tool_usage

Find sessions where specific tools were used.

Arguments:

  • tool_name (optional): Tool name to filter by
  • max_results (optional): Maximum results (default: 20)

Example Use Cases

Once configured, you can ask your AI assistant questions like:

  • "Search my Copilot history for discussions about terraform"
  • "What sessions did I have this week?"
  • "Find conversations where I worked on main.py"
  • "How did I use the create_file tool before?"
  • "Show me the conversation from session abc123"

Debugging

Use the MCP inspector to debug:

npx @modelcontextprotocol/inspector uvx mcp-copilotcli-history

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured