home / mcp / optimized memory mcp server
This is a personal project to test Claude AI's ability to self-write an MCP Server code for its own use.
Configuration
View docs{
"mcpServers": {
"agentwong-optimized-memory-mcp-serverv2": {
"url": "http://localhost:8000",
"headers": {
"DATABASE_URL": "sqlite:///path/to/db.db"
}
}
}
}You run an Optimized Memory MCP Server v2 to provide a high-performance MCP interface for memory-efficient infrastructure tracking, resource management, and Claude Desktop integration. This server exposes resources and tools that let you query, manage, and analyze infrastructure data with robust storage, error handling, and logging, all while supporting persistent state through SQLite and a fast MCP protocol.
Start and connect your MCP client to the server to access resources and run tools. The server is designed to be started locally and then consumed by Claude Desktop or any MCP client that speaks the protocol.
Prerequisites: Python 3.13.1 or higher, SQLite 3.x, and a runtime environment capable of hosting the uvx server.
The server can be started locally and connected via the MCP URL used by your client. A typical local setup involves configuring the database URL and launching the runtime server. Use the following commands to prepare and run the server in sequence.
# Set up the database URL for SQLite
export DATABASE_URL=sqlite:///path/to/db.db
# Start the MCP server using the local runtime
uvx run python -m src.main
```,0,0,- Start the server and then configure your MCP client (such as Claude Desktop) to point to the local MCP URL. Commonly used endpoint is the local host, typically http://localhost:8000 for MCP connections.
If you encounter startup or connectivity issues, ensure the database URL is correctly set and the server process has access to the SQLite file. Check for proper environment setup and verify that the health endpoint is reachable at the designated host and port.
Manage MCP entities, including listing, retrieval, and relationship tracking.
Track provider resources and registration within the MCP ecosystem.
Integrate Ansible collections and modules into MCP workflows.
Maintain version history for MCP resources and configurations.
Enable search across MCP resources and tool data.
Create and update MCP entities through the MCP interface.
Observe and log changes to resources for audit and analytics.
Register and manage providers supplying MCP resources.
Tools for analyzing infrastructure state and relationships.