codepet-mcp-server

codepet-mcp-server

A local MCP server that captures coding context, tracks developer sessions, and powers daily insights.

Category
访问服务器

README

Codepet MCP Server

A local MCP server that captures coding context, tracks developer sessions, and powers daily insights. Compatible with Claude Code, Cursor, VS Code, Windsurf, and any MCP-compliant client.

Built by MURROR.


Quick Start

1. Install

cd codepet-mcp-server
npm install
npm run build

2. Connect to Your Editor

Claude Code — add to ~/.claude/claude_desktop_config.json:

{
  "mcpServers": {
    "codepet": {
      "command": "node",
      "args": ["/full/path/to/codepet-mcp-server/dist/index.js"]
    }
  }
}

Cursor — add to .cursor/mcp.json in your project root:

{
  "servers": {
    "codepet": {
      "command": "node",
      "args": ["/full/path/to/codepet-mcp-server/dist/index.js"]
    }
  }
}

VS Code / Windsurf — add to .vscode/mcp.json in your project root:

{
  "servers": {
    "codepet": {
      "command": "node",
      "args": ["/full/path/to/codepet-mcp-server/dist/index.js"]
    }
  }
}

Replace /full/path/to/ with the actual path on your machine.

3. Verify It Works

Once connected, ask your AI assistant:

"Scan my project and tell me what I'm working with"

If Codepet responds with your project structure, languages, and dependencies — you're all set.

4. Test with Inspector (Optional)

npm run inspect

Opens the MCP Inspector — a browser-based UI to test all tools and resources interactively.


Features Overview

What How
Scan your project structure Ask AI: "What am I working with?"
See recent git activity Ask AI: "What did I commit today?"
Check for build errors Ask AI: "Are there any compiler errors?"
Read any file with metadata Ask AI: "Show me src/index.ts"
Track skill progress Ask AI: "How are my skills progressing?"
Generate daily summary Ask AI: "Generate my daily coding summary"

Phase 1 — Context Capture

Tools

Tool Description
scan_project Detect languages, frameworks, structure, and dependencies
get_git_context Recent commits, diffs, branch info, activity patterns
get_diagnostics Compiler errors, lint warnings, error→fix tracking

Resources

URI Description
codepet://project/summary Cached project fingerprint
codepet://user/profile Pet name, level, streak, skills
codepet://missions/active Contextual learning missions

Phase 2 — Learning & Skill Mapping

Tools

Tool Description
get_file_content Read file with language detection, line ranges, and metadata
get_learning_context Aggregated learning progress: error patterns, streaks, skill tree XP, recommendations

Resources

URI Description
codepet://skills/progress Skill tree progress mapped from coding activity (16 skills, 4 kingdoms)

Skill Tree Mapping

Coding activity is automatically mapped to Codepet's 16 skills across 4 kingdoms:

Kingdom Tier Skills
The Molten Forge 1 — Foundations Prompt Clarity, Error Reading, Tool Basics, Code Judgment
The Frozen Spire 2 — Context & Structure Context Setting, AI Rules Files, Documentation, Project Structure
The Eternal Garden 3 — Advanced Tool Switching, Scope Mgmt, Design System, Prompt Iteration
The Mystic Grove 4 — Expert User Personas, Context Windows, AI Architecture, Second Brain

Each skill has 5 levels. XP is earned automatically based on what you do — reading files, fixing errors, exploring projects, and using different tools all contribute to different skills.

Phase 3 — Daily Summaries + macOS App Integration

Tools

Tool Description
generate_daily_summary LLM-powered daily summary with stats, narrative, and in-character pet reaction

Resources

URI Description
codepet://summary/today Today's daily summary (call generate_daily_summary to create)

macOS App Integration

The Codepet macOS app reads ~/.codepet/ data via MCPBridgeService.swift:

  • Polls every 30s for new events, summaries, and skill progress
  • Merges real coding XP into the app's progression system (with double-count prevention)
  • Updates pet mood and energy based on daily coding activity
  • Available as @EnvironmentObject throughout the SwiftUI view hierarchy

Session Logger

Every tool call is automatically logged to ~/.codepet/ as JSON files, organized by date. This data powers daily summaries and skill tracking.

Setup

cd codepet-mcp-server
npm install
npm run build

Add to Claude Code

// ~/.claude/claude_desktop_config.json
{
  "mcpServers": {
    "codepet": {
      "command": "node",
      "args": ["/path/to/codepet-mcp-server/dist/index.js"]
    }
  }
}

Add to Cursor / VS Code

// .cursor/mcp.json or .vscode/mcp.json
{
  "servers": {
    "codepet": {
      "command": "node",
      "args": ["/path/to/codepet-mcp-server/dist/index.js"]
    }
  }
}

Usage

Once connected, the AI client can call tools naturally:

"Scan my project and tell me what I'm working with" → calls scan_project

"What did I commit today?" → calls get_git_context

"Are there any build errors?" → calls get_diagnostics

"Show me the contents of src/index.ts" → calls get_file_content

"How am I progressing on my skills?" → calls get_learning_context

Data Storage

All data is stored locally in ~/.codepet/:

~/.codepet/
├── events/
│   └── 2026-04-07.json    # Today's tool call events
├── summaries/
│   └── 2026-04-07.json    # Generated daily summaries
└── profile.json            # User profile + cached project data

Roadmap

  • Phase 1: scan_project, get_git_context, get_diagnostics tools + resources
  • Phase 2: get_file_content, get_learning_context tools + skill tree mapping
  • Phase 3: Daily summary generation (LLM-powered), Codepet macOS app integration
  • Future: SQLite backend (better-sqlite3), real-time file watching, pet evolution

Troubleshooting

"Server not found" or tools don't appear: Make sure you ran npm run build and the path in your config points to dist/index.js (not src/index.ts). The path must be absolute.

No data in ~/.codepet/: The server only writes data when tools are called. Ask your AI to run scan_project or get_git_context to generate the first events.

Daily summary is empty: Run generate_daily_summary — it creates the summary on demand. It needs at least a few tool calls logged in today's events file to produce meaningful output.

macOS app doesn't show MCP data: The macOS app polls ~/.codepet/ every 30 seconds. Make sure the MCP server has been used at least once today so event files exist. Check the Xcode console for [MCPBridge] log messages.

Permission errors on ~/.codepet/: The server creates this directory automatically. If it fails, create it manually: mkdir -p ~/.codepet/events ~/.codepet/summaries


License

MIT — see the root LICENSE file.

推荐服务器

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

官方
精选