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:
Using uvx
{
"mcpServers": {
"copilot-history": {
"command": "uvx",
"args": ["mcp-copilotcli-history"]
}
}
}
Using pip installation
{
"mcpServers": {
"copilot-history": {
"command": "python",
"args": ["-m", "mcp_copilotcli_history"]
}
}
}
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.
Using uvx
{
"servers": {
"copilot-history": {
"command": "uvx",
"args": ["mcp-copilotcli-history"]
}
}
}
Using pip installation
{
"servers": {
"copilot-history": {
"command": "python",
"args": ["-m", "mcp_copilotcli_history"]
}
}
}
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 patternevent_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 formax_results(optional): Maximum results (default: 20)
search_tool_usage
Find sessions where specific tools were used.
Arguments:
tool_name(optional): Tool name to filter bymax_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
Metadata
Release files for mcp-copilotcli-history 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_copilotcli_history-0.1.1.tar.gz | 40.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_copilotcli_history-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 50.2 kB
Release files / mcp_copilotcli_history-0.1.1.tar.gz
| Download URL | mcp_copilotcli_history-0.1.1.tar.gz |
|---|---|
| Size | 40.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dbb152be1208b0b51218ee481d774c77feb4e8af0715288d2f0147bbc3b9dd61
|
|
BLAKE2b-256 checksum How to use checksums |
53418accc2949dbac3dc4bcb73c79e5c86fafac19a0173a5d08ad34a1c2038ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2025.
Transparency logRelease files / mcp_copilotcli_history-0.1.1-py3-none-any.whl
| Download URL | mcp_copilotcli_history-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f6dce44ec48f07861fa242a4ab04d17e31dc130a717a58ae9ea5c9b33d83ffe
|
|
BLAKE2b-256 checksum How to use checksums |
a251ea630221601d036c5f3a0162feefb3258ac3728a10f7b12d84022d786a50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2025.
Transparency logSecurity for mcp-copilotcli-history 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for mcp_copilotcli_history-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.