Claude Agents MCP Server
Imports existing Claude configurations from Nextcloud-synced directories, including agent definitions, templates, global configs, and custom commands, eliminating file locking and sync conflict issues.
Stores agent definitions, configurations, and sync history in a SQLite database, providing version control and conflict resolution for Claude configurations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Claude Agents MCP Serverlist all my coding agents"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Claude Agents MCP Server
A centralized MCP (Model Context Protocol) server for managing Claude agent definitions, configurations, and custom commands across multiple devices without file synchronization issues.
Why This Exists
When syncing Claude configuration files via Nextcloud (or other sync services), file locking issues occur because:
Claude Code holds locks on
history.jsonl,.update.lock, and IDE filesMultiple devices competing for the same files cause sync conflicts
Session data constantly changes, creating sync storms
This MCP server solves these problems by:
Serving configurations via HTTP/stdio (no file locks)
Centralizing agent definitions in a SQLite database
Providing version control and conflict resolution
Enabling live updates across all connected Claude sessions
Related MCP server: Brain MCP
Architecture
Claude Code (any machine)
|
| MCP protocol (stdio)
v
claude-agents-mcp server
|
+-- SQLite store (agents, configs, metadata)
| single-writer, no file locks to fight sync clients
|
+-- Export layer
writes agent definitions back out as files
when a target machine needs them on diskOne writer (SQLite) replaces many synced files. Sync services stop fighting Claude Code over file locks because the canonical state is no longer a directory of loose files; machines pull from the server and export what they need locally.
Quick Start
Local Development
# Install dependencies
npm install
# Run migration to import existing configs
npm run migrate -- --source "G:/Nextcloud"
# Start development server
npm run devDocker Deployment
# Build and run
docker-compose up -d
# View logs
docker-compose logs -f claude-agents-mcpConfigure Claude Code
IMPORTANT: MCP servers are registered in your global Claude config file:
Linux/Mac:
~/.claude.jsonWindows:
C:\Users\<username>\.claude.json
Add the MCP server configuration to this file (Claude Code may auto-add it when you first build the server):
{
"mcpServers": {
"claude-agents": {
"command": "node",
"args": ["/absolute/path/to/claude-agents-mcp/dist/index.js"],
"env": {
"CONFIG_DATA_PATH": "/absolute/path/to/claude-agents-mcp/data"
}
}
}
}Note:
Use absolute paths to the built server
The server runs via stdio (starts when Claude Code starts, stops when it exits)
It does NOT run as a background service - data persists in SQLite, process does not
Or for network access via HTTP API:
{
"mcpServers": {
"claude-agents": {
"url": "http://localhost:8765"
}
}
}MCP Tools
Agent Management
Tool | Description |
| List all agents, optionally filtered by category |
| Retrieve a specific agent definition |
| Create or update an agent |
| Remove an agent |
| Search agents by name or content |
Global Configuration
Tool | Description |
| Get CLAUDE.md, session_init, or constraints |
| Update global configuration |
Custom Commands
Tool | Description |
| List all custom slash commands |
| Retrieve a command definition |
| Create or update a command |
| Remove a command |
Project Context
Tool | Description |
| Get project-specific settings |
| Save project context |
Utilities
Tool | Description |
| View recent changes |
HTTP API Endpoints
When running the API server (src/api.ts):
GET /api/agents # List all agents
GET /api/agents/:category # List agents by category
GET /api/agent/:name # Get agent content
POST /api/agent # Create/update agent
DELETE /api/agent/:name # Delete agent
GET /api/config/:type # Get global config
POST /api/config/:type # Set global config
GET /api/commands # List commands
GET /api/command/:name # Get command
POST /api/command # Create/update command
DELETE /api/command/:name # Delete command
GET /api/project/:id # Get project context
POST /api/project/:id # Set project context
GET /api/search?q=query # Search agents
GET /api/history?limit=50 # Sync history
GET /health # Health checkAgent Categories
Category | Description |
| Role-based agents (SeniorArchitect, etc.) |
| Context-specific prompts (GeneralCoding, etc.) |
| Task-oriented agents (Refactor, Review, etc.) |
| Community-contributed agents |
| Brahma-series specialized agents |
Migration
Import existing configurations from Nextcloud:
npm run migrate -- --source "G:/Nextcloud" --data "./data"This will import:
All agent definitions from
AgentConfigs/.claude/agents/Agent templates from
AgentPrompts/Global configs (CLAUDE.md, SESSION_INIT.md, AGENT_CONSTRAINTS.md)
Custom commands from
.claude/commands/
Directory Structure
claude-agents-mcp/
├── src/
│ ├── index.ts # MCP server (stdio)
│ ├── api.ts # HTTP API wrapper
│ ├── db.ts # SQLite storage layer
│ └── migrate.ts # Migration script
├── data/
│ └── config.db # SQLite database
├── docker-compose.yml
├── Dockerfile
└── Dockerfile.apiEnvironment Variables
Variable | Default | Description |
|
| Path to data directory |
|
| HTTP API port |
|
| Environment mode |
Development
# Watch mode
npm run dev
# Build
npm run build
# Run migration
npm run migrate
# Start production
npm startLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
- SeturosOAuthcom.seturos
Shared work memory for Claude Code, Codex, Cursor and chat, scoped to each repository.
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
Related MCP Servers
- AlicenseAqualityDmaintenanceCross-surface persistent memory for Claude. Bridges context between Claude Chat, Code, and Cowork via local SQLite with full-text search.614 npm6MIT
- AlicenseNot gradedqualityDmaintenanceEnables inter-session communication and coordination for multiple Claude Code instances through a shared SQLite database. Supports real-time messaging, shared state management, and resource locking to facilitate parallel development workflows between AI agents.7 npm8MIT
- AlicenseNot gradedqualityDmaintenanceProvides persistent, searchable memory for Claude Code using local SQLite, semantic embeddings, and full-text search, enabling Claude to recall and retrieve context across sessions and projects without external services.17 npm4MIT
- AlicenseAqualityAmaintenanceEnables Claude to save, retrieve, update, search, and organize personal ideas and reusable analytical frameworks in a private SQLite-backed knowledge base. Supports local desktop use or always-on access across a user's own devices over a private network.8Apache 2.0