claude-config-mcp
Manages Claude Code configuration and provides cross-session intelligent memory via the Luoshu system, enabling Claude to remember decisions and project context across conversations.
README
claude-config-mcp
Claude Code forgets everything between sessions. This MCP server fixes that.
📖 Documentation | 📦 npm | 🗺️ Roadmap
claude-config-mcp manages your Claude Code .claude/ configuration through MCP tools, and adds luoshu (洛书) — a cross-session intelligent memory system that lets Claude remember your decisions, preferences, and project context across conversations.
Architecture
graph TB
CC[Claude Code CLI] -->|MCP Protocol| MCP[claude-config-mcp Server]
MCP --> CM[Configuration Management]
MCP --> LU[Luoshu Memory Engine]
MCP --> OV[File Semantic Search]
CM --> Memory[Memory Tools]
CM --> Config[Config Tools]
CM --> Templates[Template Engine]
CM --> Extensions[Extension Manager]
CM --> Hooks[Hooks Manager]
CM --> Evolution[Evolution Analyzer]
LU --> Store[Memory Store<br/>JSONL]
LU --> VecIdx[Vector Index<br/>Embeddings]
LU --> Recall[Intelligent Recall<br/>LLM Synthesis]
LU --> Provider[Multi-Provider<br/>OpenAI Compatible]
OV --> ClaudeIdx[Claude Index<br/>rules + memory files]
Provider --> OpenAI[OpenAI]
Provider --> DeepSeek[DeepSeek]
Provider --> More[Moonshot / Zhipu<br/>SiliconFlow / Volcengine]
style MCP fill:#f9f,stroke:#333,stroke-width:2px
style LU fill:#bbf,stroke:#333
style CM fill:#bfb,stroke:#333
Features
Configuration Management
Manage Claude Code's .claude/ directory through MCP tools:
- Memory — Read/write/search
.claude/memory/files across projects - Config — Get/save global and project-level configuration (CLAUDE.md, settings.json, .mcp.json)
- Templates — Install/uninstall configuration template packs (rules, agents, skills, commands)
- Extensions — CRUD operations for agents, rules, skills, and commands
- Hooks — Manage event hooks (PreToolUse, PostToolUse, SessionStart, Stop, etc.)
- Evolution — Analyze rules for duplicates, gaps, and health issues
Luoshu (洛书) Intelligent Memory
Cross-session memory system powered by LLM and vector search:
- Auto-extraction — Automatically extract key decisions, patterns, and context from conversations
- Semantic search — Find related memories using vector similarity, not just keywords
- Intelligent recall — Ask natural language questions like "what decisions were made about auth?" and get synthesized answers
- Graceful degradation — Works without LLM config (keyword search only), unlocks full power with LLM
Installation
npm (recommended)
npm install -g claude-config-mcp
This installs the binary for your platform and registers /luoshu.setup and /luoshu.config skills.
Then register the MCP server:
claude mcp add claude-config -s user -- npx -y claude-config-mcp
From source
git clone https://github.com/znlnzi/claude-config-studio.git
cd claude-config-studio
make install
This builds the binary, installs it to ~/.local/bin/, copies skills to ~/.claude/skills/, and registers with Claude Code.
Quick Start
After installation, restart Claude Code and type:
/luoshu.setup
This will:
- Detect your project type and tech stack
- Ask 3 quick questions about your preferences
- Install matching configuration templates
- Guide you through LLM setup for intelligent memory (optional)
MCP Tools
Memory Management
| Tool | Description |
|---|---|
save_memory |
Save a memory entry to .claude/memory/ |
load_memory |
Load memory files from a project |
search_memory |
Keyword search with automatic semantic supplement |
Configuration
| Tool | Description |
|---|---|
config_get_global |
Get global Claude Code configuration |
config_save_global |
Save global configuration field |
config_save_project |
Save project-level configuration field |
get_project_config |
Get project's .claude/ directory overview |
list_projects |
List all managed projects |
Templates
| Tool | Description |
|---|---|
template_list |
List available configuration templates |
template_install |
Install a template to project or global scope |
template_uninstall |
Uninstall a template |
template_installed |
List installed templates |
Extensions
| Tool | Description |
|---|---|
extension_list |
List extensions (agents/rules/skills/commands) |
extension_read |
Read an extension file |
extension_save |
Create or update an extension |
extension_delete |
Delete an extension |
Hooks
| Tool | Description |
|---|---|
hooks_list |
List configured hooks |
hooks_save |
Save hooks configuration |
Evolution
| Tool | Description |
|---|---|
evolve_status |
Get evolution system status |
evolve_analyze |
Analyze rules for issues |
evolve_apply |
Approve or reject a suggestion |
Luoshu Config
| Tool | Description |
|---|---|
luoshu_config_get |
Get current luoshu configuration (API keys masked) |
luoshu_config_set |
Set a configuration field with key pre-validation |
luoshu_config_validate |
Test LLM/Embedding connection |
luoshu_provider_list |
List all available LLM provider presets |
Luoshu Memory
| Tool | Description |
|---|---|
memory_extract |
Extract key points from conversation text |
memory_semantic_search |
Vector similarity search over memories |
luoshu_recall |
Intelligent recall with LLM synthesis |
Luoshu Status
| Tool | Description |
|---|---|
luoshu_status |
Get system stats (memory count, index size, cache) |
luoshu_reindex |
Rebuild vector index |
Import/Export
| Tool | Description |
|---|---|
export_config |
Export configuration as base64-encoded ZIP |
import_config |
Import configuration from base64-encoded ZIP |
MCP Resources
Read-only access to configuration files via MCP resource URIs:
| URI | Description |
|---|---|
claude://global/claude-md |
Global CLAUDE.md instructions |
claude://global/memory/{filename} |
Global memory files |
claude://project/{path}/memory/{filename} |
Project memory files |
Luoshu Configuration
Luoshu uses a local config file at ~/.luoshu/config.json. Configure via /luoshu.config or environment variables:
| Environment Variable | Description |
|---|---|
LUOSHU_LLM_API_KEY |
LLM service API key |
LUOSHU_LLM_MODEL |
LLM model name |
LUOSHU_EMBEDDING_API_KEY |
Embedding service API key |
LUOSHU_EMBEDDING_MODEL |
Embedding model name |
Supported LLM providers (OpenAI-compatible API):
| Provider | Preset Name |
|---|---|
| OpenAI | openai |
| DeepSeek | deepseek |
| Moonshot (Kimi) | moonshot |
| Zhipu (GLM) | zhipu |
| SiliconFlow | siliconflow |
| Volcengine Doubao | volcengine |
| Custom | custom |
Use luoshu_provider_list to see all presets, or set llm.provider to any preset name — endpoint and model defaults are auto-filled.
Transport Modes
# stdio (default, for Claude Code integration)
claude-config-mcp
# HTTP (for Docker, shared deployments)
claude-config-mcp --transport http --http-addr localhost:8080
HTTP mode exposes a Streamable HTTP endpoint at /mcp.
Supported Platforms
| Platform | Architecture |
|---|---|
| macOS | ARM64 (Apple Silicon) |
| macOS | x64 (Intel) |
| Linux | x64 |
| Linux | ARM64 |
| Windows | x64 |
Project Structure
claude-config-studio/
├── cmd/mcp-server/ # MCP Server entry point (Go)
├── internal/
│ ├── luoshu/ # Luoshu memory engine (vector index, recall, config)
│ ├── templatedata/ # Built-in template definitions
│ └── evolution/ # Rules evolution engine
├── npm/ # npm package distribution
├── dist/skills/ # Global skills (/luoshu.setup, /luoshu.config)
├── python/openviking-mcp/ # OpenViking semantic search MCP server (Python)
├── scripts/ # Build and publish scripts
└── Makefile # Build, test, install targets
The main component is the Go MCP Server (cmd/mcp-server/), distributed via npm with pre-built binaries for all platforms.
python/openviking-mcp/ is a companion Python MCP server providing semantic search over Claude Code memory and rules files via OpenViking.
Development
# Build MCP server only
make mcp
# Run lint + build + tests
make test
# Run tests with verbose output
go test ./internal/... -v
# Cross-compile for all platforms
make npm-build
# Clean build artifacts
make clean
Contributing
See CONTRIBUTING.md for development setup, code style, and pull request guidelines.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。