mcp-self-learning
MCP Self-Learning Server - Autonomous learning system for AI agent performance improvement
claude mcp add --transport stdio saralegui-solutions-mcp-self-learning-server node /home/ben/saralegui-solutions-llc/shared/MCPSelfLearningServer/mcp-self-learning-server.js \ --env NODE_ENV="production" \ --env LEARNING_MODE="autonomous"
How to use
This MCP Self-Learning Server runs an autonomous learning engine that continuously analyzes interactions, extracts meaningful patterns, and stores them for future reasoning. It exposes a set of tools designed to observe, refine, and export its knowledge base: analyze_pattern to learn from tool usage and outputs, get_insights to view current learning analytics, trigger_learning to start a learning cycle on demand, and get_performance_metrics to inspect tool-specific performance. Knowledge management commands let you export or import knowledge in JSON or Markdown formats, enabling cross-server synchronization and backup. Use predict_next_action to obtain context-aware suggestions based on the current state, and optimize_tool to receive optimization recommendations for particular tools. This server also supports monitoring and health checks to ensure stable operation, and it automatically persists learning data at configured intervals. Install and run the server in production with the provided configuration to benefit from continuous learning and cross-server knowledge sharing.
How to install
Prerequisites:
- Node.js 18+ installed on the host
- npm or yarn for package management
Steps:
-
Clone or download the project
- Example: git clone https://github.com/your-org/saralegui-solutions-mcp-self-learning-server.git cd saralegui-solutions-mcp-self-learning-server
-
Install dependencies
- npm: npm install
- or yarn: yarn install
-
Configure the server (example usage with Claude Desktop as in the README)
- Ensure the server script path matches your environment. The example uses: /home/ben/saralegui-solutions-llc/shared/MCPSelfLearningServer/mcp-self-learning-server.js
- Create or update your Claude Desktop config to include: { "mcpServers": { "self-learning": { "command": "node", "args": ["/path/to/your/mcp-self-learning-server.js"], "env": { "NODE_ENV": "production", "LEARNING_MODE": "autonomous" } } } }
-
Start the server
- npm start
-
Optional verification
- Run health checks and monitor commands: npm run health npm run monitor
Prerequisites to consider:
- Ensure network access if you rely on cross-server knowledge, exports/imports, or auto-sync features.
- Verify data/ and logs/ directories are writable by the process.
Additional notes
Tips and common considerations:
- Environment variables: NODE_ENV controls runtime mode; LOG_LEVEL, LOG_CONSOLE, and LOG_FILE can be toggled to adjust visibility and persistence of logs; LEARNING_MODE should typically be autonomous for self-learning behavior.
- Learning settings: the engine uses thresholds and intervals (e.g., learning trigger after a number of interactions). You can adjust values like memory size, auto-save interval, and pattern confidence threshold in the configuration to tune performance.
- Data persistence: the server saves data periodically and rotates backups. Ensure data/ and logs/ have sufficient disk space.
- Auto-sync and cross-server learning: when enabled, the server periodically shares knowledge with other MCP servers and can import/export in JSON or Markdown formats. Configure appropriate permissions and network access for your environment.
- Troubleshooting: if the server won’t start, confirm Node.js version (18+), run npm install to ensure dependencies are present, and check permissions on the project directories. Use npm run health and npm run monitor to diagnose runtime issues.
- Security: protect your knowledge exports/imports and the endpoints exposing learning analytics, especially in multi-tenant or shared environments.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.