{"id":"e06ca98b-e4b3-4e4e-bcbb-a02bfc16fb6f","slug":"strategic-memory-crm","kind":"mcp","name":"strategic-memory-crm","summary":"Behavioral intelligence CRM platform modeling trust dynamics, negotiation patterns, influence structures, and relationship risk.","owner":"adacreativeco","repoUrl":"https://github.com/adacreativeco/strategic-memory-crm","license":"Apache-2.0","licenseTier":"permissive","trust":"community","stars":2,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-06-28T13:44:37.000Z","addedAt":"2026-10-21T17:39:56.558Z","logoUrl":"https://avatars.githubusercontent.com/u/282998831?u=981eadba137f160b301c011c601c1ea8b848a2d6&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["memory-knowledge"],"tags":["behavioral-intelligence","claude","crm","flask","gemini","graph-analysis","llm","networkx"],"runtime":"python","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-25T22:42:16.537Z","sample":false,"url":"https://conduits.dev/tools/strategic-memory-crm","language":"Python","transports":["stdio"],"install":{"pypi":"strategic-memory-crm"},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# 🧠 Strategic Memory CRM\n\n<div align=\"center\">\n\n[![MCP](https://img.shields.io/badge/MCP-Model_Context_Protocol-6366f1?style=for-the-badge&logo=anthropic&logoColor=white)](https://modelcontextprotocol.io/)\n[![PyPI](https://img.shields.io/pypi/v/strategic-memory-crm?style=for-the-badge&color=3775A9&logo=pypi&logoColor=white)](https://pypi.org/project/strategic-memory-crm/)\n[![Python](https://img.shields.io/badge/Python-3.10+-3776AB?style=for-the-badge&logo=python&logoColor=white)](https://python.org)\n[![Flask](https://img.shields.io/badge/Flask-3.0+-000000?style=for-the-badge&logo=flask&logoColor=white)](https://palletsprojects.com/p/flask/)\n[![NetworkX](https://img.shields.io/badge/NetworkX-3.2+-blue?style=for-the-badge&logo=python)](https://networkx.org/)\n[![License](https://img.shields.io/badge/License-Apache_2.0-10b981?style=for-the-badge)](LICENSE)\n[![Tests](https://img.shields.io/badge/Tests-31%20Passed-success?style=for-the-badge&logo=pytest&logoColor=white)](tests/test_crm.py)\n[![GitHub Stars](https://img.shields.io/github/stars/adacreativeco/strategic-memory-crm?style=for-the-badge&color=ffd700)](https://github.com/adacreativeco/strategic-memory-crm/stargazers)\n[![Release](https://img.shields.io/badge/Release-v1.2.0-6366f1?style=for-the-badge)](https://github.com/adacreativeco/strategic-memory-crm/releases)\n\n<br/>\n\n**Relationship intelligence over transaction storage.**\n\n[English Documentation](README.md) • [🇹🇷 Türkçe Dokümantasyon](README.tr.md)\n\n</div>\n\n---\n\nA lightweight behavioral intelligence CRM platform and **Model Context Protocol (MCP) Server** that models **trust dynamics, negotiation patterns, influence structures, organizational politics, and relationship risk** — instead of just storing deals and sales pipelines.\n\nBuilt for strategists, executives, and AI agents navigating complex stakeholder ecosystems where ***who trusts whom* matters more than *who bought what***.\n\n---\n\n## 📸 Visual Showcase\n\n<div align=\"center\">\n\n### 📊 Behavioral Intelligence & Relationship Matrix Dashboard\n*Real-time trust scores, reciprocity balance, risk factors, and interaction timelines.*\n![Strategic CRM Dashboard](dashboard_screenshot.png)\n\n<br/>\n\n### 🕸️ Interactive Stakeholder Network Graph & Power Structures\n*Vis.js network topology highlighting informal influencers, gatekeepers, and hidden coalitions.*\n![Stakeholder Network Graph](graph_screenshot.png)\n\n<br/>\n\n### 🎯 Deep Stakeholder Profile & AI Strategic Advisor Battleplan\n*Psychometric profiling, negotiation behavioral style, and instant high-stakes pre-meeting briefings.*\n![Stakeholder Profile and AI Strategic Advisor](stakeholder_screenshot.png)\n\n</div>\n\n---\n\n## 🏗️ System Architecture\n\n```mermaid\nflowchart TD\n    subgraph DataLayer[\"💾 Persistent State Layer (data/crm_state.json)\"]\n        Stakeholders[\"Stakeholders (Profiles, Goals, Vulnerabilities)\"]\n        Relationships[\"Relationships (Asymmetric Trust & Reciprocity)\"]\n        Interactions[\"Interactions (Meetings, Commitments, Favors)\"]\n    end\n\n    subgraph IntelligenceEngine[\"🧠 Behavioral Intelligence Engines\"]\n        Trust[\"Trust Dynamics Engine\n(Passive Decay, Reciprocity Balance)\"]\n        Influence[\"Influence & Politics Engine\n(NetworkX PageRank, Brokers, Coalitions)\"]\n        Negotiation[\"Negotiation Profiler\n(Style Classification, Promise-Breaker Detection)\"]\n        Entropy[\"Relationship Entropy Engine\n(Shannon Unpredictability & Volatility)\"]\n        Risk[\"Composite Risk Assessment\n(Actionable Drivers & Mitigations)\"]\n    end\n\n    DataLayer <--> IntelligenceEngine\n\n    subgraph DualInterface[\"⚡ Dual-Mode Interface\"]\n        subgraph WebApp[\"🖥️ Web Dashboard (Port 5088)\"]\n            Flask[\"Flask Web Server\"]\n            UI[\"Dark Glassmorphism UI & Vis.js Graph\"]\n            AdvisorUI[\"Live AI Advisor (Gemini / Claude / OpenAI)\"]\n        end\n\n        subgraph MCPLayer[\"🔌 Model Context Protocol (FastMCP)\"]\n            MCPServer[\"mcp_server.py (Stdio JSON-RPC)\"]\n            MCPTools[\"7 Specialized Intelligence Tools\"]\n        end\n    end\n\n    IntelligenceEngine <--> DualInterface\n\n    subgraph AIAssistants[\"🤖 AI Clients & Agents\"]\n        Claude[\"Claude Desktop\"]\n        Cursor[\"Cursor IDE\"]\n        Antigravity[\"Google Antigravity\"]\n        Agents[\"Autonomous Code Agents\"]\n    end\n\n    MCPLayer <==> AIAssistants\n```\n\n---\n\n## 🔌 Model Context Protocol (MCP) Server\n\nStrategic Memory CRM acts as a dedicated **AI Relationship Memory Layer** over MCP. AI assistants in **Claude Desktop**, **Cursor**, **VS Code**, or **Antigravity** can directly query stakeholder psychometrics, inspect organizational politics, and generate tactical negotiation briefings without opening a browser.\n\n### 🛠️ Exposed MCP Tools\n\n| MCP Tool | Parameters | Description |\n|---|---|---|\n| `list_stakeholders` | *None* | Returns all stakeholders with organization, role, hierarchy tier, dominant negotiation style, and risk score. |\n| `get_stakeholder_intel` | `stakeholder_id` *(id or name)* | Comprehensive behavioral intelligence report: trust ties, psychometrics, reliability, risk drivers, allies, and rivals. |\n| `get_organization_politics` | *None* | NetworkX power map: top informal influencers (PageRank), information bridges & gatekeepers (betweenness), and hidden coalitions. |\n| `analyze_relationship` | `source_id`, `target_id` | Deep dyadic analysis: asymmetric trust scores, reciprocity balance, Shannon entropy (volatility), and shared interaction history. |\n| `simulate_scenario` | `scenario_type`, `source_id`, `target_id`... | Predictive What-If simulation: projects network entropy shifts, trust ripples, contagion exposure, and containment advice. |\n| `get_coalition_radar` | *None* | Faction power analysis: collective decision power share (%), faction leaders, and vulnerable bridge nodes (weakest links). |\n| `compare_stakeholders` | `source_id`, `target_id` | Side-by-side comparison: psychometrics, negotiation styles, bidirectional trust scores, and mutual allies/rivals. |\n| `log_interaction` | `source_id`, `target_id`, `interaction_type`, `summary`, `sentiment`, `commitments_kept`... | Logs a new meeting/call/favor/conflict, recalculates trust decay/growth, updates reciprocity balance, and saves to database. |\n| `add_stakeholder` | `name`, `role`, `organization`, `org_tier`, `personality`, `goals`... | Creates a new stakeholder profile in the strategic memory database with personality traits. |\n| `generate_tactical_briefing` | `stakeholder_id`, `meeting_objective` | Generates an executive pre-meeting negotiation battleplan, power lever analysis, and critical pitfalls. |\n\n### 🚀 Claude Desktop & Cursor Setup\n\nAdd the following configuration to your `claude_desktop_config.json` or Cursor MCP settings:\n\n```json\n{\n  \"mcpServers\": {\n    \"strategic-memory-crm\": {\n      \"command\": \"python\",\n      \"args\": [\"G:/git@adacreativeco/strategic-memory-crm/mcp_server.py\"]\n    }\n  }\n}\n```\n\n### 💡 Example AI Prompts with MCP\n\nOnce connected, ask your AI assistant:\n* *\"Who are the informal power brokers and gatekeepers in our merger ecosystem?\"*\n* *\"Analyze the trust volatility and political risk between Marcus Vance and Elena Rostova.\"*\n* *\"I have a high-stakes alignment meeting with David Chen tomorrow. Generate a tactical negotiation briefing with opening moves and concession boundaries.\"*\n* *\"Log a positive negotiation with Sarah Jenkins: she agreed to our Q3 timeline and kept her commitment.\"*\n\n---\n\n## 🚀 Core Intelligence Engines\n\n### 1. 🤝 Asymmetric Trust Dynamics (`trust.py`)\nTrust is modeled as an evolving, directional signal ($A \nightarrow B \neq B \nightarrow A$) influenced by:\n* **Passive Temporal Decay:** Unattended relationships decay toward neutral over time ($\\lambda = 0.005/\text{day}$).\n* **Reciprocity Balance:** Tracks one-sided favor economies; chronic imbalances induce trust penalties.\n* **Commitment Reliability:** Kept commitments award $+0.08$ trust; broken commitments penalize $-0.15$; betrayals penalize $-0.25$.\n* **Personality Compatibility:** Psychological affinity nudges trust based on complementary Big-Five traits.\n\n### 2. ⚔️ Negotiation Behavioral Profiler (`negotiation.py`)\nClassifies stakeholders into behavioral archetypes based on empirical negotiation history:\n* **Dominator:** High frequency of power moves, rarely makes concessions.\n* **Accommodator:** Chronic concession maker, avoids direct confrontation.\n* **Collaborator:** Balanced give-and-take, high commitment reliability ($>85\\%$).\n* **Competitor:** Aggressive value claimer with moderate concessions.\n* **Pattern Detection:** Identifies *Serial Promise-Breakers*, *Pure Escalators*, *Chronic Yielders*, and *Rapport Builders*.\n\n### 3. 🕸️ Network Centrality & Organizational Politics (`influence.py`)\nPowered by **NetworkX**:\n* **PageRank Power:** Identifies informal influencers whose opinions cascade through the network.\n* **Betweenness Centrality & Articulation Points:** Identifies structural bottlenecks (gatekeepers) and critical communication bridges (brokers).\n* **Community Detection:** Uncovers hidden coalitions and informal faction clusters.\n\n### 4. 📈 Shannon Relationship Entropy (`entropy.py`)\nQuantifies relationship volatility and unpredictability using information theory:\n$$H(X) = -\\sum p(x) \\log_2 p(x)$$\nCombined with trust delta variance and interaction regularity to flag erratic, high-entropy stakeholder ties.\n\n### 5. 🎯 AI Strategic Advisor (`app.py` & `mcp_tools.py`)\nGenerates structured pre-meeting battleplans with 4 distinct analytical sections:\n1. **Psychological Diagnosis:** Core drivers, hidden agendas, and mindset.\n2. **Strategic Leverage & Vulnerabilities:** Identified soft spots and leverage anchors.\n3. **Tactical Playbook:** Opening framing, concession strategy, and closing techniques.\n4. **Critical Pitfalls:** Psychological landmines to avoid.\n\n---\n\n## 🛠️ Quick Start\n\n### 1. Clone & Install Dependencies\n```bash\ngit clone https://github.com/adacreativeco/strategic-memory-crm.git\ncd strategic-memory-crm\npip install -r requirements.txt\n```\n\n### 2. Run the Web Dashboard\n```bash\npython app.py\n```\nOpen [http://localhost:5088](http://localhost:5088) in your browser.\n\n### 3. Run the MCP Server\n```bash\npython mcp_server.py\n```\n\n### 4. Run Automated Test Suite\n```bash\npython -m unittest discover tests\n```\n\n---\n\n## 📂 Project Structure\n\n```\nstrategic-memory-crm/\n├── app.py                          # Flask web dashboard & REST API server\n├── mcp_server.py                   # Model Context Protocol (MCP) server entry point\n├── pyproject.toml                  # Standard Python package metadata & scripts\n├── requirements.txt                # Production dependencies (Flask, NetworkX, NumPy, SciPy, MCP)\n├── strategic_memory_crm/\n│   ├── models.py                   # Core dataclasses (Stakeholder, Interaction, Relationship, CRMState)\n│   ├── storage.py                  # Real-time JSON persistence load & save engine\n│   ├── trust.py                    # Asymmetric trust dynamics & passive decay engine\n│   ├── negotiation.py              # Behavioral negotiation profiling & pattern detection\n│   ├── influence.py                # Graph centrality, gatekeepers, brokers & coalitions (NetworkX)\n│   ├── entropy.py                  # Shannon entropy & relationship volatility scoring\n│   ├── risk.py                     # Composite risk assessment & actionable mitigations\n│   ├── mcp_tools.py                # Modular MCP behavioral intelligence tools\n│   ├── graph.py                    # Vis.js JSON graph serialization\n│   ├── simulation.py               # Interaction history simulator\n│   └── dataset.py                  # Fictional corporate M&A dataset generator\n├── templates/                      # Jinja2 HTML templates\n│   ├── base.html                   # Dark-themed master layout\n│   ├── dashboard.html              # Relationship matrix, statistics & action modals\n│   ├── stakeholder.html            # Profile, timeline & AI Strategic Advisor\n│   └── graph.html                  # Interactive Vis.js network graph\n├── static/\n│   └── style.css                   # Responsive dark UI styling\n├── tests/\n│   ├── test_crm.py                 # Core CRM behavioral engine unit test suite\n│   └── test_mcp.py                 # MCP server & tools unit test suite (25 tests total)\n└── data/\n    └── crm_state.json              # Persistent database state\n```\n\n---\n\n## 📄 License\n\nDistributed under the Apache 2.0 License. See [LICENSE](LICENSE) for details.\n\n---\n\n<div align=\"center\">\nBuilt with 🧠 by <a href=\"https://github.com/adacreativeco\">ADA Creative Co.</a>\n</div>\n"}