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
访问服务器

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选