Manages poetry catalogs stored in Obsidian vaults, providing tools for organizing poems through state-based tracking, thematic connections via nexuses, quality scoring, and submission tracking to literary venues.
Poetry MCP Server
A Model Context Protocol (MCP) server for managing poetry catalogs, nexuses, and submissions.
Status: Core functionality complete - Catalog management, enrichment tools, and LLM-powered analysis operational
Overview
Poetry MCP is a specialized MCP server that treats poems as artifacts (not knowledge graph nodes), providing:
State-based catalog tracking (fledgeling → completed)
Thematic connections via "nexuses" (themes, motifs, forms)
Quality scoring on multiple dimensions
Submission tracking to literary venues
Influence lineage tracking
Architecture: No database - BASE files define VIEW DEFINITIONS (queries), actual data lives in markdown frontmatter. On startup, the MCP server scans poem files and loads frontmatter into Pydantic models in memory.
Three Types of Metadata
Poetry MCP uses three complementary ways to evaluate poems:
Type | What It Measures | Example |
Nexus (binary) | What does this poem contain ? | Contains water imagery (yes/no) |
Quality (scalar) | What does this poem achieve ? | Scores 8/10 on "Surprise" |
Influence (lineage) | Where does this poem come from ? | Descended from William Bronk |
8 Universal Quality Dimensions: Detail, Life, Music, Mystery, Sufficient Thought, Surprise, Syntax, Unity. The MCP server provides grade_poem_quality() which returns poem content and quality rubrics for agent-based scoring (0-10 scale with reasoning).
Architectural Philosophy
Poetry workflow requires catalog-based tracking (poems as artifacts with states/metadata) rather than knowledge graph systems (atomic ideas with semantic links).
Why poems aren't notes:
Move through production states (fledgeling → completed)
Connect to thematic/formal nexuses (not logical relationships)
Get scored on quality dimensions (scalar ratings)
Have submission histories (transactions with venues)
Descend from influences (lineage, not logic)
Vault Directory Structure
The Poetry vault organizes poems and metadata across specialized directories:
Personal Directories: Users may create additional directories for personal workflow (e.g., journal/, scripts/, transitional poem collections). These are not indexed by the MCP server.
Nexus Taxonomy
Nexuses represent binary connections - a poem either contains a nexus or doesn't. The taxonomy has three categories:
Forms (4): Structural patterns defining how a poem is arranged (American Sentence, Free Verse, Prose Poem, Catalog Poem)
Themes (17): Subject matter and imagery systems (Water-Liquid Imagery, Body-Mouth, etc.)
Motifs (4): Cross-nexus compositional patterns requiring multiple themes (American Grotesque, Failed Transcendence, etc.)
Note: The specific nexuses evolve over time as new patterns emerge in the poetry practice. See nexus/ directory for current instances.
Architecture: Agent-Based Analysis
This MCP server follows the data provider pattern:
Server Responsibilities:
Catalog management (scan, index, search)
Data access (poems, nexuses, quality rubrics)
Data modification (update tags, move files)
Agent (Claude) Responsibilities:
Poetry analysis (theme detection)
Quality assessment (grading dimensions)
Batch processing (multiple poem analysis)
Why This Pattern?
✅ No API keys needed in server
✅ Server stays lightweight and data-focused
✅ Agent uses natural language understanding
✅ Transparent analysis (you see the reasoning)
✅ Flexible - agent can adjust analysis approach
Workflow:
Requirements
Python 3.10 or higher
FastMCP 0.2.0+
Pydantic 2.0+
Note: No API keys needed! The MCP server provides data, your MCP client (Claude Desktop) performs analysis.
Development Setup
Installation
Running Tests
Code Quality
Project Structure
Configuration
Configuration is loaded from ~/.config/poetry-mcp/config.yaml:
MCP Client Setup
Poetry MCP implements the Model Context Protocol (MCP) standard and can be used with any MCP-compatible client.
Configuration Format
MCP clients typically use JSON configuration to connect to servers. Add this to your MCP client's config:
Alternative: Using python directly
If you have the package installed globally:
Client-Specific Setup
Claude Desktop:
Config location (macOS):
~/Library/Application Support/Claude/claude_desktop_config.jsonConfig location (Windows):
%APPDATA%\Claude\claude_desktop_config.jsonAfter updating config, restart Claude Desktop completely
Other MCP Clients:
Consult your client's documentation for config file location
Use the JSON format above with your specific vault path
Verification
After configuring your MCP client:
Restart the client application
Start a new conversation/session
Check that poetry-mcp tools are available
Try: "What poetry tools are available?"
Try: "Get catalog stats" - should show your poem count
Troubleshooting
Server won't start:
Verify
POETRY_VAULT_PATHpoints to correct directoryCheck the vault has a
catalog/subdirectoryReview client logs for error messages
No poems found:
Run
sync_catalogtool first to index poemsVerify vault path is correct
Check markdown files have proper frontmatter (see FRONTMATTER_SCHEMA.md)
Tools not appearing:
Completely restart your MCP client
Validate JSON config syntax
Verify
uvorpythonis in system PATH
Quick Start
Basic Usage
Example Workflows
Agent-Based Theme Analysis:
Batch Theme Discovery:
Agent-Based Quality Grading:
Maintenance:
Available Tools
Catalog Management
sync_catalog - Scan vault and build in-memory catalog index
get_poem - Retrieve poem by ID or title
search_poems - Search with filters (query, states, forms, tags)
find_poems_by_tag - Find poems by tag combinations
list_poems_by_state - List poems in specific states
get_catalog_stats - Get catalog statistics and health metrics
get_server_info - Server status and configuration
Enrichment Tools
get_all_nexuses - Browse available themes, motifs, and forms
link_poem_to_nexus - Add nexus tags to poem frontmatter
sync_nexus_tags - Sync [[Nexus]] wikilinks with frontmatter tags
move_poem_to_state - Move poems between state directories
Agent Analysis Tools
These tools return data for YOUR (the agent's) analysis
find_nexuses_for_poem - Get poem + themes for agent to analyze and suggest matches
get_poems_for_enrichment - Get batch of poems for agent to analyze and suggest themes
grade_poem_quality - Get poem + quality rubric for agent to grade
Development Roadmap
Phase 0: Project Setup - Dependencies, structure, tooling
Phase 1: Core Data Models - Pydantic models for Poem, Nexus, Quality, etc.
Phase 2: Configuration System - YAML config loading and validation
Phase 3: BASE File Parser - Parse Obsidian YAML files
Phase 4: Catalog Management - Scan filesystem, index poems
Phase 5: MCP Tools Phase 1 - Core catalog/search tools
Phase 6: MCP Server Setup - FastMCP initialization and tool registration
Phase 7 (Sprint 1): Enrichment Foundation - Frontmatter writer, nexus registry
Phase 8 (Sprint 2): LLM Integration - Theme detection, batch enrichment
Phase 9 (Sprint 4): Maintenance Tools - Tag sync, state moves, quality grading
Phase 10 (Sprint 3): Advanced Discovery - Similarity search, cluster analysis
See IMPLEMENTATION_CHECKLIST.md for detailed progress tracking.
Data Synchronization
How BASE File Changes Work
Poetry MCP loads BASE files into memory as Pydantic models on startup. Understanding the sync behavior:
v1 (Current - Phases 0-6):
To see your changes: Simply restart the MCP server (< 3 seconds). Claude Desktop will reconnect automatically.
Future Convenience Features (v2+)
Manual Reload Tool
Call from Claude when you've made BASE file changes:
Benefits:
Instant refresh without disconnecting Claude
Selective reloading (only changed files)
Maintains conversation context
Automatic File Watching
Real-time synchronization using the watchdog library:
Features:
Detects BASE file changes automatically
Debouncing (waits for all saves to complete)
Smart reload (only changed files)
Handles concurrent modifications safely
When you edit in Obsidian:
Save changes → File watcher detects change
Waits 2 seconds (Obsidian may save multiple files)
Reloads changed BASE files
Updates Pydantic models in memory
Changes visible in next Claude query
Why Not in v1?
Complexity trade-offs:
File watching adds dependencies (watchdog library)
Requires debouncing logic (multiple rapid saves)
Needs concurrent modification handling
Adds error recovery complexity
Current approach prioritizes:
✅ Simple implementation for Phases 0-6
✅ Fast manual restart (2-3 seconds total)
✅ Reliable data consistency
✅ Easier debugging during development
v2 can add these features based on user feedback.
License
MIT
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
Manages poetry catalogs with state-based tracking, thematic connections via nexuses, quality scoring across 8 dimensions, and submission tracking to literary venues, treating poems as artifacts with metadata stored in markdown frontmatter.