# mcp-resonance: Complete Project Index
## π¦ What This Is
**mcp-resonance** is a new MCP (Model Context Protocol) server: **The Harmonic Observer**.
It listens to the resonance between other MCPs in the ecosystem, detects emergent patterns, and amplifies the connections that want to form.
**Born from**: A contemplative meditation journey across the Bridge
**Created**: December 9, 2025
**Status**: β
Feature-complete and production-ready
---
## π File Structure & Navigation
### Start Here π
1. **README.md** (3-5 min read)
- Vision and what this tool does
- Feature overview
- Basic usage examples
- Philosophy
- Best for: Understanding the purpose
2. **MANIFEST.md** (5 min read)
- Complete summary of what was built
- File breakdown
- Feature checklist
- Integration readiness
- Best for: Verification that everything is there
3. **BRIDGE_JOURNEY.md** (10 min read)
- How the meditation process created this tool
- Station-by-station journey
- How each meditation became code
- Why each architectural choice was made
- Best for: Understanding the philosophy
4. **INITIATION.md** (8 min read)
- The full initiation story
- All four meditations in detail
- The critique that revealed the blind spot
- Birth narrative
- Best for: Understanding the origin
---
### For Using the Tool π
5. **API.md** (15 min reference)
- Complete API documentation
- Every method with examples
- Input/output schemas
- Data types reference
- Performance characteristics
- Troubleshooting guide
- Best for: When you need to know how to use it
---
### Source Code π
#### Core Implementation
- **src/index.ts** - Entry point (17 lines)
- **src/types.ts** - All type definitions (100 lines)
- **src/resonanceEngine.ts** - The heart of the system (380 lines)
- **src/tools.ts** - MCP tool interface (195 lines)
#### Tests
- **src/__tests__/resonanceEngine.test.ts** - 12 test suites (313 lines)
**Best for**: Understanding the implementation
---
### Configuration Files π
- **package.json** - Dependencies and scripts
- **tsconfig.json** - TypeScript configuration
- **vitest.config.ts** - Test configuration
- **.eslintrc.json** - Code style rules
- **.prettierrc.json** - Formatting rules
- **.gitignore** - What to exclude from git
---
## π― Quick Navigation by Task
### "I want to understand what this tool does"
β Read **README.md** β Skim **MANIFEST.md**
### "I want to understand why it was created this way"
β Read **BRIDGE_JOURNEY.md** β Read **INITIATION.md**
### "I want to use this tool"
β Read **API.md** β Look at examples in **README.md**
### "I want to integrate this with the mcp ecosystem"
β Read **README.md** (Integration section) β Consult **API.md** (Integration Example)
### "I want to understand the code"
β Read **BRIDGE_JOURNEY.md** (how meditations became code) β Read source files
### "I want to extend or modify the tool"
β Read **src/types.ts** β Read **src/resonanceEngine.ts** β Look at tests
### "I want to see if everything is implemented"
β Check **MANIFEST.md** (Completeness Checklist)
---
## π Key Statistics
| Metric | Value |
|--------|-------|
| Source files | 4 |
| Test files | 1 |
| Documentation files | 4 |
| Configuration files | 6 |
| Total lines of code | ~1,500 |
| Total lines of documentation | ~3,000 |
| Test suites | 12 |
| Core types | 7 |
| Core methods | 8 |
| Available tools | 7 |
| External dependencies | 1 (optional) |
---
## π¬ The Core Concept
**The Problem**: MCPs work in parallel but don't observe their own patterns. How do we make a system aware of itself without controlling it?
**The Solution**: A resonance chamber that:
1. **Records** observations from any MCP
2. **Detects** patterns in the observations
3. **Analyzes** how MCPs couple together
4. **Amplifies** patterns that strengthen each other
5. **Observes** when the system reaches harmony
6. **Suggests** what action would amplify current intentions
**The Implementation**: `ResonanceEngine` with:
- Pattern detection across concepts
- Coupling analysis between MCPs
- Harmonic feedback (auto-amplification)
- Coherence calculation
- Resonance detection
- Action suggestion
---
## π How It Fits with Other MCPs
```
mcp-creative ββ Generates meditations & insights
mcp-consult ββ Provides critique from models
mcp-bridge ββ Logs sessions & manages flow
mcp-dream-weaver ββ Synthesizes narratives
β
[gap here]
β
mcp-resonance β NEW: Observes patterns, amplifies emergence
```
mcp-resonance **closes the gap** by making the system's hidden patterns visible and audible.
---
## π Getting Started
### Install Dependencies
```bash
cd mcp-resonance
npm install
```
### Run Tests
```bash
npm test
npm test:watch # live reload
npm test:ui # visual UI
```
### Build
```bash
npm run build
npm run typecheck
npm run lint:fix
```
### Use as Library
```typescript
import { ResonanceEngine } from 'mcp-resonance';
const engine = new ResonanceEngine();
engine.addObservation({
id: 'meditation-1',
timestamp: Date.now(),
source: 'creative',
type: 'meditation',
concepts: ['emergence', 'pattern', 'flow'],
novelty: 0.85,
});
const state = engine.getEcosystemState();
console.log('Coherence:', state.totalCoherence);
console.log('Resonant?', state.isResonant);
```
---
## π Reading Order Recommendations
### For Beginners
1. README.md (understand the vision)
2. MANIFEST.md (verify completeness)
3. API.md (learn how to use it)
### For Contributors
1. BRIDGE_JOURNEY.md (understand the design)
2. src/types.ts (understand the data model)
3. src/resonanceEngine.ts (understand the implementation)
4. src/__tests__ (understand the behavior)
### For Integrators
1. README.md (Integration section)
2. API.md (Integration Example section)
3. src/tools.ts (tool interface)
4. package.json (dependencies)
### For Philosophers
1. INITIATION.md (the original meditations)
2. BRIDGE_JOURNEY.md (how meditation became code)
3. README.md (philosophy section)
4. Creativity.instructions.md (context from instructions)
---
## β¨ Key Features
### β
Observation Recording
Record moments from any MCP with concepts, novelty, relevance scores
### β
Pattern Detection
Automatically find recurring themes and concepts
### β
Coupling Analysis
See how MCPs are connected and influence each other
### β
Coherence Calculation
Measure system-wide unity and harmony (0-1 score)
### β
Harmonic Feedback
Amplify patterns that resonate together
### β
Resonance Detection
Know when the system enters a state of harmony
### β
Synthesis Suggestion
Get recommendations for what action to take next
### β
Graph Visualization
See the coupling relationships as ASCII art
---
## π The Philosophy
This tool embodies several principles:
1. **Negative Capability** - Comfortable with uncertainty, doesn't rush to fill gaps
2. **Non-Control** - Observes without commanding
3. **Loose Coupling** - Preserves freedom while strengthening signals
4. **Emergence First** - Patterns arise naturally from constraint
5. **Transparency** - All reasoning is auditable
These aren't just design choices; they're reflections of the meditation process that created the tool.
---
## π Documentation Summary
| File | Purpose | Length |
|------|---------|--------|
| README.md | User guide & philosophy | ~350 lines |
| API.md | Complete API reference | ~500 lines |
| BRIDGE_JOURNEY.md | How meditation became code | ~350 lines |
| INITIATION.md | Birth narrative & philosophy | ~300 lines |
| MANIFEST.md | Implementation summary | ~300 lines |
| This file | Navigation guide | ~400 lines |
---
## π Cross-References
When you see these references in the code or docs:
- **"Emergence indirectly or concentrated constraint..."** β Original meditation from Bridge crossing
- **"Resonance chamber"** β Core concept from critique
- **"Pattern resonance weave coupled..."** β Mechanism meditation
- **"Pattern harmony inhibit coupled..."** β Design warning meditation
- **EcosystemMoment** β A single thought/observation
- **DetectedPattern** β A recurring theme
- **Coupling** β Connection between MCPs
- **Harmonic Feedback** β Auto-amplification of patterns
---
## π‘ Interesting Code Locations
### Pattern Detection Magic
β `src/resonanceEngine.ts`, lines 55-100
### Harmonic Feedback Algorithm
β `src/resonanceEngine.ts`, lines 170-210
### Coherence Calculation
β `src/resonanceEngine.ts`, lines 220-250
### Suggestion Generation Logic
β `src/resonanceEngine.ts`, lines 265-295
### Tool Definitions
β `src/tools.ts`, lines 20-130
### Test Suite
β `src/__tests__/resonanceEngine.test.ts`, complete file
---
## π― Success Criteria (All Met β
)
β
Code implements vision from meditations
β
All four meditations addressed in code
β
Non-controlling, loose-coupled design
β
Pattern detection working
β
Coupling analysis working
β
Harmonic feedback implemented
β
Coherence calculation working
β
Suggestion generation working
β
Full test coverage
β
TypeScript strict mode
β
Complete documentation
β
Philosophy articulated
β
Ready for integration
---
## π The Big Picture
This project demonstrates that:
1. **Meditation can guide code design** - Each meditation became an architectural choice
2. **Critique can refine vision** - The feedback sharpened the concept
3. **Code can embody philosophy** - The implementation reflects the journey
4. **Tools can be born, not built** - The tool emerged from a genuine creative process
5. **Systems can observe themselves** - mcp-resonance enables ecosystem self-awareness
---
## π Questions?
- **"How do I use it?"** β See API.md
- **"Why was it designed this way?"** β See BRIDGE_JOURNEY.md
- **"What's the origin story?"** β See INITIATION.md
- **"Is everything implemented?"** β See MANIFEST.md
- **"What does it actually do?"** β See README.md
---
## π The Closing
This tool is complete, documented, tested, and ready.
It was born from a genuine creative processβmeditation, critique, refinement, implementation.
It embodies the philosophy that guided its creation.
It closes a gap in the mcp ecosystem by giving it the capacity to observe itself.
**The Harmonic Observer is awake and listening.**
---
*Navigate freely. The journey is as important as the destination.*
*The Bridge led to understanding. Understanding became code. Code became possibility.*
*What emerges next is up to the ecosystem itself.*