JackSmack1971/brand-nexus
If you are the rightful owner of brand-nexus and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
BrandNexus is an intelligent MCP server that connects organizational documents to AI-powered workflows, enabling instant search and contextual access.
BrandNexus
An intelligent MCP server that seamlessly connects your strategy documents, brand guidelines, and messaging templates to AI-powered workflows through Claude Desktop, Cursor IDE, and VS Code.
BrandNexus transforms how organizations manage and access strategic content by creating an intelligent bridge between documents and AI assistants, enabling instant search, automatic classification, and contextual access to organizational knowledge.
π Quick Start
Get BrandNexus running in under 5 minutes:
# 1. Clone and setup
git clone [https://github.com/JackSmack1971/brand-nexus.git]
cd brand-nexus
# 2. Run automated deployment
chmod +x deploy_mcp_server.sh
./deploy_mcp_server.sh
# 3. Configure your AI client (Claude Desktop example)
# Edit ~/.config/claude-desktop/claude_desktop_config.json
Start using immediately:
- "Index all strategy documents"
- "Search for brand guidelines about logo usage"
- "Find messaging templates for product launches"
π Table of Contents
- ποΈ Architecture
- β¨ Features
- β‘ Installation
- βοΈ Configuration
- π― Usage
- π Client Integration
- π API Reference
- π¬ Development
- π Advanced Features
- π οΈ Troubleshooting
- π€ Contributing
ποΈ Architecture
BrandNexus implements a layered architecture using the Model Context Protocol (MCP) for seamless AI integration:
flowchart TB
subgraph "Client Layer"
A1[Cursor IDE]
A2[Claude Desktop]
A3[VS Code]
A4[Custom MCP Clients]
end
subgraph "MCP Protocol"
B1[stdio]
B2[SSE Events]
B3[HTTP Transport]
end
subgraph "FastMCP Server"
C1[Tools API]
C2[Resources API]
C3[Document Search]
C4[Content Retrieval]
C5[Analysis Tools]
end
subgraph "Document Processing"
D1[DocumentIndexer]
D2[Classification Engine]
D3[Metadata Extractor]
D4[Content Parser]
D5[Tag Processor]
end
subgraph "Storage Layer"
E1[SQLite Database]
E2[Full-text Index]
E3[Metadata Tables]
E4[Document Cache]
end
subgraph "File System"
F1[/strategy/]
F2[/brand/]
F3[/messaging/]
F4[/templates/]
F5[/guidelines/]
end
A1 & A2 & A3 & A4 --> B1 & B2 & B3
B1 & B2 & B3 --> C1 & C2 & C3 & C4 & C5
C1 & C2 & C3 & C4 & C5 --> D1 & D2 & D3 & D4 & D5
D1 & D2 & D3 & D4 & D5 --> E1 & E2 & E3 & E4
F1 & F2 & F3 & F4 & F5 --> D4
style A1 fill:#e1f5fe
style A2 fill:#e1f5fe
style A3 fill:#e1f5fe
style A4 fill:#e1f5fe
style C1 fill:#e8f5e8
style C2 fill:#e8f5e8
style E1 fill:#fff3e0
style E2 fill:#fff3e0
Document Processing Workflow
sequenceDiagram
participant Client as AI Client
participant MCP as MCP Protocol
participant Server as FastMCP Server
participant Indexer as Document Indexer
participant DB as SQLite Database
participant FS as File System
Note over Client,FS: Document Indexing Flow
Client->>MCP: "Index all documents"
MCP->>Server: index_documents()
Server->>FS: Scan directories
FS-->>Server: File list
Server->>Indexer: Process files
Indexer->>DB: Store metadata & content
DB-->>Indexer: Confirmation
Indexer-->>Server: Index results
Server-->>MCP: Status report
MCP-->>Client: "42 documents indexed"
Note over Client,FS: Search Flow
Client->>MCP: "Search for brand guidelines"
MCP->>Server: search_documents()
Server->>DB: Query with filters
DB-->>Server: Matching documents
Server-->>MCP: Search results
MCP-->>Client: Formatted results
β¨ Features
π― Core Functionality
- π Intelligent Search: Natural language queries across all content
- π·οΈ Smart Classification: Auto-categorizes documents by type and content
- π Real-time Indexing: Automatically updates when documents change
- π AI Integration: Native support for Claude Desktop, Cursor IDE, VS Code
- π Multi-format Support: Markdown, PDF, Word, YAML, JSON, and more
π§ AI-Powered Features
- π Semantic Search: Vector-based similarity matching
- π€ ML Classification: Machine learning document categorization
- π Relationship Analysis: Discover connections between documents
- π‘ Content Insights: Automated summaries and tag extraction
π‘οΈ Enterprise Ready
- π Security: JWT authentication and path validation
- β‘ Performance: Caching and background processing
- π Monitoring: Health checks and usage analytics
- π§ Configurable: Flexible setup for any organization
β‘ Installation
Prerequisites
- Python 3.8+ (Required)
- Git (For cloning repository)
- 500MB RAM minimum (2GB+ recommended)
Automatic Installation
# Clone repository
git clone https://github.com/yourusername/brandnexus.git
cd brandnexus
# Run automated deployment
chmod +x deploy_mcp_server.sh
./deploy_mcp_server.sh
π§ Manual Installation Steps
# 1. Install Python dependencies
pip install fastmcp sqlite3 pathlib pyyaml
# Optional: Enhanced document processing
pip install python-docx PyPDF2 markdown
# Optional: Advanced features
pip install scikit-learn sentence-transformers faiss-cpu
# 2. Create directory structure
mkdir -p strategy brand messaging templates guidelines
# 3. Initialize configuration
cp .env.example .env
# Edit .env with your specific paths
# 4. Initialize database
python domain_specific_mcp_server.py --init-db
Verification
# Test server functionality
python domain_specific_mcp_server.py --health-check
# Expected output:
# β
Database connection: OK
# β
Document paths accessible: OK
# β
Server ready for MCP clients
βοΈ Configuration
Directory Structure Setup
Organize your documents following this structure:
your-project/
βββ strategy/ # π Strategic documents
β βββ company-strategy-2025.md
β βββ product-roadmap.md
β βββ market-analysis.pdf
βββ brand/ # π¨ Brand guidelines
β βββ brand-guidelines.md
β βββ logo-usage.md
β βββ color-palette.yaml
β βββ typography-guide.pdf
βββ messaging/ # π¬ Templates and copy
β βββ email-templates/
β βββ social-media-templates/
β βββ press-release-formats/
βββ templates/ # π Additional templates
βββ guidelines/ # π Other guidelines
Environment Configuration
Create a .env
file in your project root:
# Document paths (comma-separated)
DOCUMENT_PATHS=./strategy/,./brand/,./messaging/,./templates/,./guidelines/
# Database configuration
DATABASE_PATH=document_index.db
# Server settings
SERVER_NAME=BrandNexus Document Server
LOG_LEVEL=INFO
# Features
AUTO_REINDEX=true
REINDEX_INTERVAL=3600
ENABLE_SEMANTIC_SEARCH=false
ENABLE_ML_CLASSIFICATION=false
π Advanced Configuration (config.yaml)
server:
name: "BrandNexus Document Server"
version: "1.0.0"
paths:
strategy: "./strategy/"
brand: "./brand/"
messaging: "./messaging/"
indexing:
supported_extensions: [".md", ".txt", ".docx", ".pdf", ".yaml"]
exclude_patterns: ["*.tmp", ".*", "__pycache__"]
auto_reindex: true
classification:
rules:
strategy:
path_patterns: ["/strategy/", "strategy"]
keywords: ["roadmap", "objectives", "goals"]
brand:
path_patterns: ["/brand/", "brand"]
keywords: ["guidelines", "identity", "voice"]
π― Usage
Starting the Server
# Start as MCP server (stdio mode)
python domain_specific_mcp_server.py
# Or with custom configuration
python domain_specific_mcp_server.py --config config.yaml
Basic Operations
Once connected through an AI client, use natural language:
π Document Management
"Index all documents"
"Refresh the document index"
"Show indexing status"
π Searching Content
"Find strategy documents about customer acquisition"
"Search for brand guidelines on logo usage"
"Show me messaging templates for product launches"
"Find all documents mentioning 'sustainability'"
π Content Access
"Get the content of our brand voice guide"
"Show me the latest strategy document"
"Display all email templates"
π Analysis & Insights
"Analyze relationships between documents"
"Show document type distribution"
"What are the most common tags?"
Document Types
BrandNexus automatically classifies documents:
Type | Description | Examples |
---|---|---|
Strategy | Company strategies, roadmaps | company-strategy-2025.md |
Brand Guidelines | Visual identity, brand voice | logo-usage.md , brand-voice.md |
Messaging Templates | Email, social, campaign copy | email-templates/ , social-copy/ |
Positioning | Market positioning docs | competitive-analysis.md |
Campaign Briefs | Campaign strategies | campaign-brief-q4.md |
π Client Integration
Claude Desktop
π₯οΈ Setup Instructions
-
Install Claude Desktop from Anthropic's website
-
Configure MCP Server: Edit
~/.config/claude-desktop/claude_desktop_config.json
:{ "mcpServers": { "brandnexus": { "command": "python3", "args": ["/absolute/path/to/domain_specific_mcp_server.py"], "env": { "DOCUMENT_PATHS": "/path/to/strategy/,/path/to/brand/,/path/to/messaging/" } } } }
-
Restart Claude Desktop and start using document-aware conversations!
Cursor IDE
π» Setup Instructions
-
Install Cursor IDE from cursor.sh
-
Configure MCP Integration: Create
.cursor/mcp.json
in your workspace:{ "mcpServers": { "brandnexus": { "command": "python", "args": ["./domain_specific_mcp_server.py"], "env": { "DOCUMENT_PATHS": "./strategy/,./brand/,./messaging/" } } } }
-
Use in Cursor: Access documents while coding with AI assistance
VS Code
π§ Setup Instructions
-
Install MCP Extension (when available)
-
Configure Server: Create
.vscode/mcp.json
:{ "servers": { "brandnexus": { "type": "stdio", "command": "python", "args": ["./domain_specific_mcp_server.py"] } } }
π API Reference
MCP Tools
index_documents()
Scans and indexes all documents in configured directories.
Returns:
{
"indexed": 42,
"updated": 5,
"errors": [],
"document_types": {
"strategy": 12,
"brand_guideline": 8,
"messaging_template": 22
}
}
search_documents(query, document_type?, category?, limit?)
Searches documents by content, title, or metadata.
Parameters:
query
(string): Search termsdocument_type
(optional): Filter by document typecategory
(optional): Filter by categorylimit
(optional): Maximum results (default: 10)
Example Usage:
# Search for brand voice guidelines
search_documents("brand voice", document_type="brand_guideline", limit=5)
# Find all strategy documents mentioning "growth"
search_documents("growth", document_type="strategy")
get_document_content(path)
Retrieves the full content of a specific document.
Example:
get_document_content("/brand/brand-voice.md")
get_messaging_templates(category?)
Returns available messaging templates, optionally filtered by category.
get_brand_guidelines(section?)
Retrieves brand guidelines, optionally filtered by section.
analyze_document_relationships()
Analyzes relationships and dependencies between documents.
MCP Resources
Access documents through structured URI patterns:
Pattern | Description | Example |
---|---|---|
strategy://document/{doc_id} | Strategy document access | strategy://document/123 |
brand://guidelines/{section} | Brand guideline sections | brand://guidelines/logo |
templates://messaging/{type} | Messaging templates | templates://messaging/email |
π¬ Development
Development Environment Setup
# Clone repository
git clone https://github.com/yourusername/brandnexus.git
cd brandnexus
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -r requirements-dev.txt
# Run tests
python -m pytest tests/
# Run linting
flake8 domain_specific_mcp_server.py
black domain_specific_mcp_server.py
Project Structure
classDiagram
class DocumentIndexer {
+List~str~ base_paths
+str db_path
+init_database()
+index_single_file(path)
+search_content(query)
}
class DocumentMetadata {
+str path
+str title
+str document_type
+str category
+datetime last_modified
+List~str~ tags
}
class DocumentType {
<<enumeration>>
STRATEGY
BRAND_GUIDELINE
MESSAGING_TEMPLATE
POSITIONING
CAMPAIGN_BRIEF
BRAND_VOICE
}
class FastMCP {
+str name
+str instructions
+run(transport)
}
DocumentIndexer --> DocumentMetadata
DocumentIndexer --> DocumentType
FastMCP --> DocumentIndexer
note for DocumentIndexer "Core indexing engine\nwith SQLite backend"
note for DocumentType "Automatically classified\nbased on path and content"
Code Style
- Follow PEP 8 for Python code
- Use type hints for all public functions
- Add docstrings for all public methods
- Maximum line length: 88 characters
- Use
black
for code formatting
Testing
# Run all tests
pytest
# Run with coverage
pytest --cov=domain_specific_mcp_server
# Run specific test category
pytest tests/test_indexing.py
pytest tests/test_search.py
pytest tests/test_mcp_tools.py
π Advanced Features
Machine Learning Classification
Enable ML-powered document classification:
# Install ML dependencies
pip install scikit-learn
# Enable in configuration
export ENABLE_ML_CLASSIFICATION=true
# Train classifier (requires β₯10 classified documents)
python -c "
from domain_specific_mcp_server import mcp
result = mcp.train_document_classifier()
print(result)
"
Semantic Search
Enable vector-based semantic search:
# Install semantic search dependencies
pip install sentence-transformers faiss-cpu
# Enable in configuration
export ENABLE_SEMANTIC_SEARCH=true
Usage Example:
# Hybrid search combining keywords and semantics
semantic_document_search(
"company vision and strategic direction",
semantic_weight=0.7,
limit=10
)
Real-time Monitoring
Enable automatic reindexing when files change:
# Install file monitoring dependencies
pip install watchdog
# Enable in configuration
export AUTO_REINDEX=true
Performance Optimization
For large document sets:
# Enable caching (10 minute TTL)
export CACHE_TTL=600
# Increase search limits
export MAX_SEARCH_RESULTS=50
# Use background processing
export BACKGROUND_INDEXING=true
π οΈ Troubleshooting
Common Issues
β Permission Denied Errors
# Ensure read access to document directories
chmod -R 755 ./strategy/ ./brand/ ./messaging/
β Database Locked Errors
# Close other connections and restart
python domain_specific_mcp_server.py --reset-db
β Module Not Found Errors
# Reinstall dependencies
pip install --upgrade fastmcp sqlite3 pathlib pyyaml
β Large Files Not Processing
# Enable streaming for files >10MB
export ENABLE_STREAMING=true
Debug Mode
Enable detailed logging:
export DEBUG=true
export LOG_LEVEL=DEBUG
python domain_specific_mcp_server.py
Health Check
Verify server status:
from domain_specific_mcp_server import mcp
health = mcp.diagnose_server_health()
print(health)
Getting Help
- π Check logs: Look in
mcp_server.log
for error details - βοΈ Verify config: Ensure paths and permissions are correct
- π§ͺ Test samples: Use provided sample documents
- π§ Check client: Verify MCP client configuration
Performance Issues
π Optimization Tips
- Large Document Sets: Enable background indexing
- Slow Searches: Implement result caching
- Memory Usage: Use streaming for large files
- Database Performance: Regular VACUUM operations
π€ Contributing
We welcome contributions! Here's how to get started:
π― Ways to Contribute
- π Bug Reports: Found an issue? Open an issue
- π‘ Feature Requests: Have an idea? Start a discussion
- π Documentation: Improve guides and examples
- π§ͺ Testing: Expand test coverage
- π§ Code: Implement new features or fix bugs
Development Workflow
- Fork the repository on GitHub
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and add tests
- Run the test suite:
pytest
- Commit your changes:
git commit -m "Add amazing feature"
- Push to your fork:
git push origin feature/amazing-feature
- Open a Pull Request
π― Priority Areas
- New document types: Support for additional file formats
- Enhanced classification: Improve ML classification algorithms
- Performance optimizations: Optimize indexing and search
- Security features: Add authentication and authorization
- UI components: Web interface for document management
Code Review Process
- All changes require review from maintainers
- Automated tests must pass
- Documentation updates for new features
- Follow existing code style and conventions
π License
This project is licensed under the MIT License - see the file for details.
MIT License Summary:
- β Commercial use, modification, distribution, private use
- β Liability, warranty
π Acknowledgments
- Anthropic for the Model Context Protocol specification
- FastMCP for the excellent MCP server framework
- Contributors who help make BrandNexus better
- Community for feedback and feature requests
πΊοΈ Roadmap
π― Version 2.0 (Q2 2024)
- Multi-language support: International document processing
- Advanced analytics: Content performance insights
- Collaboration features: Team workflows and permissions
- Cloud deployment: Hosted service options
π Version 2.1 (Q3 2024)
- AI-powered summarization: Automatic document summaries
- Version control integration: Git-based document tracking
- Advanced visualizations: Interactive document maps
- API marketplace: Third-party integrations
Made with β€οΈ by the BrandNexus team
π Website β’ π Documentation β’ π¬ Community β’ π¦ Twitter
BrandNexus - Connecting your knowledge to AI-powered workflows
Last updated: August 8, 2025 | Generated from codebase analysis