Skip to main content

๐Ÿง  Strategic Memory CRM

MCP PyPI Python Flask NetworkX License Tests GitHub Stars Release


Relationship intelligence over transaction storage.

English Documentation โ€ข ๐Ÿ‡น๐Ÿ‡ท Tรผrkรงe Dokรผmantasyon


A 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.

Built for strategists, executives, and AI agents navigating complex stakeholder ecosystems where who trusts whom matters more than who bought what.


๐Ÿ“ธ Visual Showcase

๐Ÿ“Š Behavioral Intelligence & Relationship Matrix Dashboard

Real-time trust scores, reciprocity balance, risk factors, and interaction timelines. Strategic CRM Dashboard


๐Ÿ•ธ๏ธ Interactive Stakeholder Network Graph & Power Structures

Vis.js network topology highlighting informal influencers, gatekeepers, and hidden coalitions. Stakeholder Network Graph


๐ŸŽฏ Deep Stakeholder Profile & AI Strategic Advisor Battleplan

Psychometric profiling, negotiation behavioral style, and instant high-stakes pre-meeting briefings. Stakeholder Profile and AI Strategic Advisor


๐Ÿ—๏ธ System Architecture

flowchart TD
    subgraph DataLayer["๐Ÿ’พ Persistent State Layer (data/crm_state.json)"]
        Stakeholders["Stakeholders (Profiles, Goals, Vulnerabilities)"]
        Relationships["Relationships (Asymmetric Trust & Reciprocity)"]
        Interactions["Interactions (Meetings, Commitments, Favors)"]
    end

    subgraph IntelligenceEngine["๐Ÿง  Behavioral Intelligence Engines"]
        Trust["Trust Dynamics Engine
(Passive Decay, Reciprocity Balance)"]
        Influence["Influence & Politics Engine
(NetworkX PageRank, Brokers, Coalitions)"]
        Negotiation["Negotiation Profiler
(Style Classification, Promise-Breaker Detection)"]
        Entropy["Relationship Entropy Engine
(Shannon Unpredictability & Volatility)"]
        Risk["Composite Risk Assessment
(Actionable Drivers & Mitigations)"]
    end

    DataLayer <--> IntelligenceEngine

    subgraph DualInterface["โšก Dual-Mode Interface"]
        subgraph WebApp["๐Ÿ–ฅ๏ธ Web Dashboard (Port 5088)"]
            Flask["Flask Web Server"]
            UI["Dark Glassmorphism UI & Vis.js Graph"]
            AdvisorUI["Live AI Advisor (Gemini / Claude / OpenAI)"]
        end

        subgraph MCPLayer["๐Ÿ”Œ Model Context Protocol (FastMCP)"]
            MCPServer["mcp_server.py (Stdio JSON-RPC)"]
            MCPTools["7 Specialized Intelligence Tools"]
        end
    end

    IntelligenceEngine <--> DualInterface

    subgraph AIAssistants["๐Ÿค– AI Clients & Agents"]
        Claude["Claude Desktop"]
        Cursor["Cursor IDE"]
        Antigravity["Google Antigravity"]
        Agents["Autonomous Code Agents"]
    end

    MCPLayer <==> AIAssistants

๐Ÿ”Œ Model Context Protocol (MCP) Server

Strategic 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.

๐Ÿ› ๏ธ Exposed MCP Tools

MCP Tool Parameters Description
list_stakeholders None Returns all stakeholders with organization, role, hierarchy tier, dominant negotiation style, and risk score.
get_stakeholder_intel stakeholder_id (id or name) Comprehensive behavioral intelligence report: trust ties, psychometrics, reliability, risk drivers, allies, and rivals.
get_organization_politics None NetworkX power map: top informal influencers (PageRank), information bridges & gatekeepers (betweenness), and hidden coalitions.
analyze_relationship source_id, target_id Deep dyadic analysis: asymmetric trust scores, reciprocity balance, Shannon entropy (volatility), and shared interaction history.
simulate_scenario scenario_type, source_id, target_id... Predictive What-If simulation: projects network entropy shifts, trust ripples, contagion exposure, and containment advice.
get_coalition_radar None Faction power analysis: collective decision power share (%), faction leaders, and vulnerable bridge nodes (weakest links).
compare_stakeholders source_id, target_id Side-by-side comparison: psychometrics, negotiation styles, bidirectional trust scores, and mutual allies/rivals.
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.
add_stakeholder name, role, organization, org_tier, personality, goals... Creates a new stakeholder profile in the strategic memory database with personality traits.
generate_tactical_briefing stakeholder_id, meeting_objective Generates an executive pre-meeting negotiation battleplan, power lever analysis, and critical pitfalls.

๐Ÿš€ Claude Desktop & Cursor Setup

Add the following configuration to your claude_desktop_config.json or Cursor MCP settings:

{
  "mcpServers": {
    "strategic-memory-crm": {
      "command": "python",
      "args": ["G:/git@adacreativeco/strategic-memory-crm/mcp_server.py"]
    }
  }
}

๐Ÿ’ก Example AI Prompts with MCP

Once connected, ask your AI assistant:

  • "Who are the informal power brokers and gatekeepers in our merger ecosystem?"
  • "Analyze the trust volatility and political risk between Marcus Vance and Elena Rostova."
  • "I have a high-stakes alignment meeting with David Chen tomorrow. Generate a tactical negotiation briefing with opening moves and concession boundaries."
  • "Log a positive negotiation with Sarah Jenkins: she agreed to our Q3 timeline and kept her commitment."

๐Ÿš€ Core Intelligence Engines

1. ๐Ÿค Asymmetric Trust Dynamics (trust.py)

Trust is modeled as an evolving, directional signal ($A ightarrow B eq B ightarrow A$) influenced by:

  • Passive Temporal Decay: Unattended relationships decay toward neutral over time ($\lambda = 0.005/ ext{day}$).
  • Reciprocity Balance: Tracks one-sided favor economies; chronic imbalances induce trust penalties.
  • Commitment Reliability: Kept commitments award $+0.08$ trust; broken commitments penalize $-0.15$; betrayals penalize $-0.25$.
  • Personality Compatibility: Psychological affinity nudges trust based on complementary Big-Five traits.

2. โš”๏ธ Negotiation Behavioral Profiler (negotiation.py)

Classifies stakeholders into behavioral archetypes based on empirical negotiation history:

  • Dominator: High frequency of power moves, rarely makes concessions.
  • Accommodator: Chronic concession maker, avoids direct confrontation.
  • Collaborator: Balanced give-and-take, high commitment reliability ($>85%$).
  • Competitor: Aggressive value claimer with moderate concessions.
  • Pattern Detection: Identifies Serial Promise-Breakers, Pure Escalators, Chronic Yielders, and Rapport Builders.

3. ๐Ÿ•ธ๏ธ Network Centrality & Organizational Politics (influence.py)

Powered by NetworkX:

  • PageRank Power: Identifies informal influencers whose opinions cascade through the network.
  • Betweenness Centrality & Articulation Points: Identifies structural bottlenecks (gatekeepers) and critical communication bridges (brokers).
  • Community Detection: Uncovers hidden coalitions and informal faction clusters.

4. ๐Ÿ“ˆ Shannon Relationship Entropy (entropy.py)

Quantifies relationship volatility and unpredictability using information theory: $$H(X) = -\sum p(x) \log_2 p(x)$$ Combined with trust delta variance and interaction regularity to flag erratic, high-entropy stakeholder ties.

5. ๐ŸŽฏ AI Strategic Advisor (app.py & mcp_tools.py)

Generates structured pre-meeting battleplans with 4 distinct analytical sections:

  1. Psychological Diagnosis: Core drivers, hidden agendas, and mindset.
  2. Strategic Leverage & Vulnerabilities: Identified soft spots and leverage anchors.
  3. Tactical Playbook: Opening framing, concession strategy, and closing techniques.
  4. Critical Pitfalls: Psychological landmines to avoid.

๐Ÿ› ๏ธ Quick Start

1. Clone & Install Dependencies

git clone https://github.com/adacreativeco/strategic-memory-crm.git
cd strategic-memory-crm
pip install -r requirements.txt

2. Run the Web Dashboard

python app.py

Open http://localhost:5088 in your browser.

3. Run the MCP Server

python mcp_server.py

4. Run Automated Test Suite

python -m unittest discover tests

๐Ÿ“‚ Project Structure

strategic-memory-crm/
โ”œโ”€โ”€ app.py                          # Flask web dashboard & REST API server
โ”œโ”€โ”€ mcp_server.py                   # Model Context Protocol (MCP) server entry point
โ”œโ”€โ”€ pyproject.toml                  # Standard Python package metadata & scripts
โ”œโ”€โ”€ requirements.txt                # Production dependencies (Flask, NetworkX, NumPy, SciPy, MCP)
โ”œโ”€โ”€ strategic_memory_crm/
โ”‚   โ”œโ”€โ”€ models.py                   # Core dataclasses (Stakeholder, Interaction, Relationship, CRMState)
โ”‚   โ”œโ”€โ”€ storage.py                  # Real-time JSON persistence load & save engine
โ”‚   โ”œโ”€โ”€ trust.py                    # Asymmetric trust dynamics & passive decay engine
โ”‚   โ”œโ”€โ”€ negotiation.py              # Behavioral negotiation profiling & pattern detection
โ”‚   โ”œโ”€โ”€ influence.py                # Graph centrality, gatekeepers, brokers & coalitions (NetworkX)
โ”‚   โ”œโ”€โ”€ entropy.py                  # Shannon entropy & relationship volatility scoring
โ”‚   โ”œโ”€โ”€ risk.py                     # Composite risk assessment & actionable mitigations
โ”‚   โ”œโ”€โ”€ mcp_tools.py                # Modular MCP behavioral intelligence tools
โ”‚   โ”œโ”€โ”€ graph.py                    # Vis.js JSON graph serialization
โ”‚   โ”œโ”€โ”€ simulation.py               # Interaction history simulator
โ”‚   โ””โ”€โ”€ dataset.py                  # Fictional corporate M&A dataset generator
โ”œโ”€โ”€ templates/                      # Jinja2 HTML templates
โ”‚   โ”œโ”€โ”€ base.html                   # Dark-themed master layout
โ”‚   โ”œโ”€โ”€ dashboard.html              # Relationship matrix, statistics & action modals
โ”‚   โ”œโ”€โ”€ stakeholder.html            # Profile, timeline & AI Strategic Advisor
โ”‚   โ””โ”€โ”€ graph.html                  # Interactive Vis.js network graph
โ”œโ”€โ”€ static/
โ”‚   โ””โ”€โ”€ style.css                   # Responsive dark UI styling
โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ test_crm.py                 # Core CRM behavioral engine unit test suite
โ”‚   โ””โ”€โ”€ test_mcp.py                 # MCP server & tools unit test suite (25 tests total)
โ””โ”€โ”€ data/
    โ””โ”€โ”€ crm_state.json              # Persistent database state

๐Ÿ“„ License

Distributed under the Apache 2.0 License. See LICENSE for details.


Built with ๐Ÿง  by ADA Creative Co.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strategic_memory_crm-1.2.0.tar.gz (337.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strategic_memory_crm-1.2.0-py3-none-any.whl (338.3 kB view details)

Uploaded Python 3

File details

Details for the file strategic_memory_crm-1.2.0.tar.gz.

File metadata

  • Download URL: strategic_memory_crm-1.2.0.tar.gz
  • Upload date:
  • Size: 337.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for strategic_memory_crm-1.2.0.tar.gz
Algorithm Hash digest
SHA256 4f5dc4ec0a01a7ed0359bf42ead280a0e579bd6cee32930f0d6621eec5a75983
MD5 f172779e8886631b513e26637410b9c5
BLAKE2b-256 da6c0ba8dbf30a6cbd570eadfd5ace20fa4caad0608099cd2b4e5683d6a0d712

See more details on using hashes here.

File details

Details for the file strategic_memory_crm-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for strategic_memory_crm-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 950c4a5b61a94bd79dcaf9e7e195fed7dd8c6b3ac876facefef247f881f89650
MD5 d36935bff9156bf2ec5497f8bb46f3d1
BLAKE2b-256 538026c3879d6c3a8447934cf1e6a9e17d074081c539aaef9a4db21fb57a991d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 files

1.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page