Shadow Complement Integration MCP
Applies Jungian shadow complement to unified composition parameters, creating psychological depth through systematic visual opposition after multi-domain blending.
README
Shadow Complement Integration MCP
Jungian shadow aesthetic integration for Lushy multi-domain compositions.
Overview
This MCP server applies Jungian shadow complement to unified composition parameters, creating psychological depth through systematic visual opposition. After multi-domain composition (colimit blending), this tool acknowledges what the persona denies.
Three-Layer Architecture
Layer 1: Categorical Structure
↓ YAML Olog with complement_operations section
Layer 2: Deterministic Mapping
↓ MCP loads YAML, computes antipodes (zero LLM cost)
Layer 3: Integration
↓ Linear interpolation via integration_level
Mathematical Formula
integrated = persona + (shadow - persona) × integration_level
integration_level ∈ [0, 1]:
0.0 = pure persona (original aesthetic)
0.5 = balanced acknowledgment
1.0 = pure shadow (inverse aesthetic)
Installation
Option 1: Local Development
# Clone or extract the archive
cd shadow-complement-integration
# Install with pip
pip install -e .
# Or with uv
uv pip install -e .
Option 2: Deploy to FastMCP Cloud
- Package the server:
tar -czf shadow-complement-integration.tar.gz shadow-complement-integration/
- Upload to FastMCP Cloud
- Configure entrypoint:
src/shadow_complement_mcp/server.py:mcp
Option 3: Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"shadow-complement-integration": {
"command": "python",
"args": [
"-m",
"shadow_complement_mcp.server"
],
"env": {
"PYTHONPATH": "/path/to/shadow-complement-integration/src"
}
}
}
}
Configuration
Step 1: Configure Domain Paths
Edit src/shadow_complement_mcp/server.py and update DOMAIN_OLOG_PATHS:
DOMAIN_OLOG_PATHS = {
"heraldic_blazonry": "/path/to/heraldic_blazonry_mcp/olog/heraldic_blazonry.yaml",
"jazz_improvisation": "/path/to/jazz_improvisation_mcp/olog/jazz_improvisation.yaml",
"cocktail_aesthetics": "/path/to/cocktail_aesthetics_mcp/olog/cocktail_aesthetics.yaml",
}
Step 2: Add complement_operations to Domain Ologs
Each domain olog needs a complement_operations section. See examples/heraldic_complement_operations_spec.yaml for template.
Example:
complement_operations:
tincture:
type: categorical
mapping:
gules: argent
azure: or
sable: argent
psychological_principle: "Chromatic opposition reveals denied warmth/coolness"
visual_weight:
type: continuous
range: [0.0, 1.0]
operation: "1 - value"
psychological_principle: "Dominance ↔ submission"
Usage
Basic Usage
from shadow_complement_mcp import integrate_shadow_complement
# After multi-domain composition
unified_params = {
"tincture": "gules",
"visual_weight": 0.85,
"detail_density": 0.7
}
result = integrate_shadow_complement(
unified_parameters=unified_params,
aesthetic_domain="heraldic_blazonry",
integration_level=0.5
)
# Access results
print(result["persona"]) # Original parameters
print(result["shadow_complements"]) # Computed antipodes
print(result["integrated_parameters"]) # Interpolated result
Integration Levels
# Persona-dominant (subtle shadow hints)
result_subtle = integrate_shadow_complement(
unified_parameters=params,
aesthetic_domain="heraldic_blazonry",
integration_level=0.2
)
# Balanced acknowledgment
result_balanced = integrate_shadow_complement(
unified_parameters=params,
aesthetic_domain="heraldic_blazonry",
integration_level=0.5
)
# Shadow-dominant
result_shadow = integrate_shadow_complement(
unified_parameters=params,
aesthetic_domain="heraldic_blazonry",
integration_level=0.8
)
Utility Tools
# List configured domains
domains = list_available_domains()
# Returns: {"heraldic_blazonry": "configured", ...}
# Get complement schema
schema = get_complement_operations_schema("heraldic_blazonry")
# Returns parameter types and operations
# Explain specific complement
explanation = explain_shadow_complement(
parameter_name="tincture",
parameter_value="gules",
aesthetic_domain="heraldic_blazonry"
)
# Returns psychological principle and antipode reasoning
Composition Pipeline
Domain A ──┐
├─→ [Colimit Composition] ──→ Unified Parameters
Domain B ──┤ ↓
Domain C ──┘ [Shadow Integration]
↓
Final Output
Shadow integration is endpoint-only — it applies after all composition is complete, not within the functor chain.
Testing
# Install dev dependencies
pip install -e ".[dev]"
# Run test suite
pytest tests/
# Run specific test file
pytest tests/test_antipode_computation.py
Examples
See docs/EXAMPLE_USAGE.md for complete examples including:
- Heraldic shadow integration
- Jazz improvisation shadow
- Multi-domain colimit + shadow
- Temporal shadow (animation sequences)
Architecture Details
Why Endpoint-Only?
Shadow integration applies only at final output, not during composition:
- Preserves blend's emergent properties
- No naturality squares to verify
- Clean separation: composition logic vs. integration logic
Why Linear Interpolation?
Simple, reversible, intuitive:
integration_level=0→ pure personaintegration_level=0.5→ balancedintegration_level=1.0→ pure shadow
Domain Requirements
Each domain must have:
- Complete olog with categorical structure
complement_operationssection with:- All parameters defined
- Antipode mappings (categorical or continuous)
- Psychological principles documented
Contributing
To add a new domain:
- Create
complement_operationsin domain olog - Add domain to
DOMAIN_OLOG_PATHS - Run test suite to validate
- Document psychological principles
See docs/EXTENSION_GUIDE.md for details.
References
- Jung, C.G. "Psychology and Alchemy" (shadow psychology)
- Fauconnier, G. & Turner, M. "The Way We Think" (vital relations)
- Goguen, J. "Style as Choice of Blending Principles" (pushout formalism)
License
MIT License - see LICENSE file
Contact
- Author: Dal Marsters
- Email: dal@lushy.app
- Project: https://github.com/dmarsters/lushy
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。