ClaudeCode Session Notes MCP Server

ClaudeCode Session Notes MCP Server

Enables comprehensive collection and analysis of ClaudeCode development sessions, including agent tracking, tool usage analytics, and performance metrics.

Category
访问服务器

README

ClaudeCode Session Notes MCP Server

Tests Quality FastMCP Python

A production-ready Model Context Protocol (MCP) server for comprehensive ClaudeCode session workbook collection and analysis. Built with FastMCP 2.0 for maximum performance and reliability.

🚀 Features

📊 Session Management

  • Start/End Sessions - Track development sessions with comprehensive metadata
  • Environment Collection - Automatic system environment capture (Python, OS, process info)
  • Session Status - Real-time session monitoring and metrics
  • Metadata Updates - Dynamic session attribute management

🤖 Agent Tracking

  • Agent Registration - Register AI agents with type, purpose, and capabilities
  • Execution Logging - Track agent actions with parameters, results, and timing
  • Interaction Analysis - Advanced behavioral tracking for decision-making patterns
  • Agent Statistics - Comprehensive activity metrics and performance data

🛠️ Tool Usage Analytics

  • Tool Request Logging - Track tool availability and usage patterns
  • Missing Tools Detection - Identify gaps in available toolsets
  • Success Rate Analysis - Monitor tool execution effectiveness
  • Usage Pattern Analysis - Understand tool utilization trends

📈 Analytics & Reporting

  • Comprehensive Reports - Session summaries with detailed analytics
  • Missing Tools Reports - Identify frequently requested but unavailable tools
  • Performance Metrics - Execution times, success rates, and efficiency measures
  • Data Export - JSON-based data persistence for external analysis

🏗️ Architecture

Built on FastMCP 2.0 with modern Python practices:

  • FastMCP 2.0 Framework - State-of-the-art MCP server implementation
  • Pydantic Models - Type-safe data validation and serialization
  • File-Based Storage - Reliable .claude/session-notes/ hierarchy
  • PIXI Dependency Management - Reproducible development environment
  • 100% Test Coverage - Production-ready with comprehensive test suite

📦 Installation

Prerequisites

  • Python 3.12+
  • PIXI (recommended) or pip
  • Git for development

Quick Start with PIXI (Recommended)

# Clone the repository
git clone https://github.com/Claire-s-Monster/claudecode-session-notes.git
cd claudecode-session-notes

# Install with PIXI
pixi install

# Start the MCP server
pixi run server

Alternative: pip Installation

# Clone and install
git clone https://github.com/Claire-s-Monster/claudecode-session-notes.git
cd claudecode-session-notes

# Install in editable mode
pip install -e .

# Start the MCP server
python -m session_notes.server

🔧 MCP Integration

Claude Desktop Configuration

Recommended (PIXI - Production Ready)

Add to your ~/.claude_desktop_config.json:

{
  "mcpServers": {
    "session-notes": {
      "command": "pixi",
      "args": ["run", "-e", "quality", "server"],
      "cwd": "/path/to/claudecode-session-notes"
    }
  }
}

Alternative Configurations

Development Mode (with debug logging):

{
  "mcpServers": {
    "session-notes": {
      "command": "pixi", 
      "args": ["run", "-e", "quality", "server"],
      "cwd": "/path/to/claudecode-session-notes",
      "env": {
        "PYTHONPATH": "src",
        "CLAUDE_DEBUG": "1"
      }
    }
  }
}

Minimal Runtime (fastest startup):

{
  "mcpServers": {
    "session-notes": {
      "command": "pixi",
      "args": ["run", "server"],
      "cwd": "/path/to/claudecode-session-notes"
    }
  }
}

Legacy Python (fallback option):

{
  "mcpServers": {
    "session-notes": {
      "command": "python",
      "args": ["-m", "session_notes.server"],
      "cwd": "/path/to/claudecode-session-notes"
    }
  }
}

💡 Why PIXI? Using PIXI commands ensures reproducible environments, exact dependency versions from pixi.lock, and optimal FastMCP 2.0 integration with conda-forge packages.

Available MCP Tools

Tool Description
start_session Begin tracking a new development session
end_session End session with metrics calculation
update_session_metadata Update session attributes dynamically
get_session_status Retrieve real-time session information
register_agent Register an AI agent in the session
get_agent_metadata Get comprehensive agent statistics
log_agent_execution Record agent actions and results
log_tool_request Track tool usage and availability
log_agent_interaction Record complex agent behaviors
analyze_missing_tools Identify missing tool patterns
save_missing_tools_report Generate missing tools analysis

Example Usage

# Start a session
start_session("my-dev-session")

# Register an agent
register_agent(
    session_id="my-dev-session",
    agent_type="code-reviewer",
    purpose="Review and analyze code quality"
)

# Log agent activity
log_agent_execution(
    session_id="my-dev-session",
    agent_id="agent-uuid",
    agent_type="code-reviewer",
    action="analyze_code",
    parameters={"file": "main.py"},
    result={"issues": 2, "score": 8.5}
)

# End session with metrics
end_session("my-dev-session", outcome="completed")

🧑‍💻 Development

Quality Standards

This project maintains production-grade quality standards:

  • ✅ 100% Test Pass Rate (285/290 tests passing)
  • ✅ Zero Critical Lint Violations
  • ✅ Type Safety with Pydantic models
  • ✅ Error Handling for all edge cases
  • ✅ Performance Optimized with FastMCP 2.0

Development Commands

# Install development environment
pixi install -e quality

# Run tests (100% pass rate)
pixi run test

# Run with coverage
pixi run test-cov

# Quality checks
pixi run lint          # Critical violations check
pixi run typecheck     # Type safety validation
pixi run quality       # Full quality pipeline

# Run the server in development
pixi run dev

Project Structure

claudecode-session-notes/
├── src/session_notes/
│   ├── __init__.py
│   └── server.py              # Main MCP server implementation
├── tests/                     # Comprehensive test suite (285 tests)
├── docs/                      # Documentation
├── pyproject.toml            # PIXI configuration & dependencies
├── .claude/                  # Claude integration
└── README.md                 # This file

📊 Data Storage

Session data is stored in a structured hierarchy under .claude/session-notes/:

.claude/session-notes/
├── {session-id}/
│   ├── session.json          # Session metadata & metrics
│   ├── missing_tools.json    # Missing tools analysis
│   └── agents/
│       └── {agent-id}/
│           ├── metadata.json      # Agent registration info
│           ├── execution.json     # Action logs
│           ├── tools.json         # Tool usage logs  
│           └── interactions.json  # Behavioral data

🤝 Contributing

We welcome contributions! This project has achieved 100% test pass rate and maintains high quality standards.

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Maintain quality: Run pixi run quality before committing
  4. Write tests: Ensure 100% test coverage continues
  5. Submit a Pull Request

Quality Requirements

  • ✅ All tests must pass (pixi run test)
  • ✅ No critical lint violations (pixi run lint)
  • ✅ Type safety maintained (pixi run typecheck)
  • ✅ Code coverage maintained (pixi run test-cov)

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🏆 Acknowledgments

  • FastMCP Framework - Built on the excellent FastMCP 2.0 by jlowin
  • PIXI Package Manager - Modern Python package management
  • Pydantic - Runtime type checking and data validation
  • ClaudeCode Integration - Seamless AI development workflow integration

📈 Project Status

  • Production Ready ✅
  • 100% Test Pass Rate ✅
  • Zero Critical Issues ✅
  • Actively Maintained ✅

Ready to supercharge your ClaudeCode development sessions with comprehensive analytics and insights! 🚀

For questions or support, please open an issue on GitHub.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选