MCP server for searching GitHub Copilot conversation history
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_copilotcli_history-0.1.0.tar.gz.
File metadata
- Download URL: mcp_copilotcli_history-0.1.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cb440f719ec8b9444be0cf14f571a8a0f80bf36940d6f4d46e157b6bc343bdf
|
|
| MD5 |
e9ed0ad5dfbaced3f28feb2ef5689496
|
|
| BLAKE2b-256 |
689b0b59ae16cf648773d46754808e5062be0d83ea8c31fd56396abd7905756f
|
Provenance
The following attestation bundles were made for mcp_copilotcli_history-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on MicroMichaelIE/mcp-copilotcli-history
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_copilotcli_history-0.1.0.tar.gz -
Subject digest:
2cb440f719ec8b9444be0cf14f571a8a0f80bf36940d6f4d46e157b6bc343bdf - Sigstore transparency entry: 740233134
- Sigstore integration time:
-
Permalink:
MicroMichaelIE/mcp-copilotcli-history@dfc84bc6afb7adf6feffc091784dfd49c579a488 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/MicroMichaelIE
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@dfc84bc6afb7adf6feffc091784dfd49c579a488 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcp_copilotcli_history-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_copilotcli_history-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b438a3aa71b4397dd77a8b6d3eae61b26df5895159b87b69c645d00dcc4d41a6
|
|
| MD5 |
d957a59957ae1895ace771860969b49d
|
|
| BLAKE2b-256 |
cb41a15e2704edff96d168988dc416b9864f4f8f0ce69f551b64eb95628938cd
|
Provenance
The following attestation bundles were made for mcp_copilotcli_history-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on MicroMichaelIE/mcp-copilotcli-history
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_copilotcli_history-0.1.0-py3-none-any.whl -
Subject digest:
b438a3aa71b4397dd77a8b6d3eae61b26df5895159b87b69c645d00dcc4d41a6 - Sigstore transparency entry: 740233146
- Sigstore integration time:
-
Permalink:
MicroMichaelIE/mcp-copilotcli-history@dfc84bc6afb7adf6feffc091784dfd49c579a488 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/MicroMichaelIE
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@dfc84bc6afb7adf6feffc091784dfd49c579a488 -
Trigger Event:
release
-
Statement type: