๐ง Strategic Memory CRM
Relationship intelligence over transaction storage.
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.
๐ธ๏ธ Interactive Stakeholder Network Graph & Power Structures
Vis.js network topology highlighting informal influencers, gatekeepers, and hidden coalitions.
๐ฏ Deep Stakeholder Profile & AI Strategic Advisor Battleplan
Psychometric profiling, negotiation behavioral style, and instant high-stakes pre-meeting briefings.
๐๏ธ 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. |
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:
- Psychological Diagnosis: Core drivers, hidden agendas, and mindset.
- Strategic Leverage & Vulnerabilities: Identified soft spots and leverage anchors.
- Tactical Playbook: Opening framing, concession strategy, and closing techniques.
- 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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file strategic_memory_crm-1.1.0.tar.gz.
File metadata
- Download URL: strategic_memory_crm-1.1.0.tar.gz
- Upload date:
- Size: 326.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c620aadb6c4100af83caa86716a3009c87257b5800184edf5ec24aac6f9c445c
|
|
| MD5 |
a975eaaf297f3b2d3861db8e119c23b7
|
|
| BLAKE2b-256 |
cc7afc4e01aecda8732236ea991fd35f0477a174aa96ad59e38d28bff7fb3c53
|
File details
Details for the file strategic_memory_crm-1.1.0-py3-none-any.whl.
File metadata
- Download URL: strategic_memory_crm-1.1.0-py3-none-any.whl
- Upload date:
- Size: 323.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5440aa8539c3ae54714716dd77e107dbab4bf76690782f86d99925974f0778b
|
|
| MD5 |
3d700aa08e9a06e3e838886cd5fc67fd
|
|
| BLAKE2b-256 |
1e5c76b923925d7bf9f6fae86261c38f9b39e515b2af7b9905809056c113180e
|