Skip to content

Conversation

@Kryptos666
Copy link
Collaborator

Files Changed:

fast-markdown-mcp/src/fast_markdown_mcp/document_structure.py
Added new Section dataclass to represent document sections
Implemented DocumentStructure class for parsing and managing document sections
Added methods for section ID generation and table of contents creation
Added functionality to extract specific sections by ID
fast-markdown-mcp/src/fast_markdown_mcp/server.py
Added two new MCP tools:
get_table_of_contents: Lists all sections in a document with their IDs
get_section: Retrieves specific sections by ID to avoid loading entire documents
Enhanced MarkdownStore class with section caching and management
Added structure_cache to store parsed document structures
Integrated DocumentStructure for section-based content retrieval
New Features:

Section-based document navigation
Document structure caching for improved performance
Table of contents generation
Section-specific content retrieval
URL-friendly section ID generation
Benefits:

Prevents token limit issues by allowing partial document loading
Improves navigation of large documents
Reduces memory usage by loading only requested sections
Maintains document structure for better content organization

Add FastMarkdownMCP server for markdown file monitoring
Create MCPServerStatus component with real-time status display
Implement backend endpoints for MCP configuration and monitoring
Add setup script for automated installation
Integrate with Claude Desktop configuration
Add continuous file monitoring and synchronization
Implement server status checks and logging
Add configuration copy functionality
Style UI to match application theme
Fast Markdown MCP Server Integration
Features
🔄 Real-time markdown file monitoring and synchronization
📊 Server status dashboard with live updates
🔍 File content and metadata tracking
🚀 One-command setup script
🎨 Modern UI with dark theme
📝 Automatic log collection
⚡ Fast API backend integration
🔌 Claude Desktop MCP integration
Technical Details
Python-based MCP server with FastAPI backend
React component for status display
WebSocket-like updates using polling
Cross-platform path handling
Graceful error handling and recovery
Comprehensive logging system
Setup
Clone the repository
Run ./fast-markdown-mcp/setup.sh
Start services with ./start.sh
Documentation
Full documentation available in:

README.md - Server setup and configuration
MCPServerStatus.tsx - UI component
main.py - Backend implementation
Testing
Server status detection
File monitoring
Configuration management
UI responsiveness
Error handling
Dependencies
Python 3.10+
Node.js
FastAPI
React
MCP SDK
The MCP server configuration endpoint was calculating paths incorrectly by traversing one level too high in the directory structure (parents[3]). This caused paths to miss the 'DevDocs' directory, resulting in ENOENT errors when trying to find the Python virtual environment and markdown storage.

Changed Path(file).parents[3] to parents[2] to ensure paths are relative to the DevDocs root directory instead of the GitHub directory.

Impact:

Fixes ENOENT errors when starting MCP server
Ensures consistent paths between API and MCP settings
Maintains proper virtual environment and storage locations
… issues

Files Changed:

fast-markdown-mcp/src/fast_markdown_mcp/document_structure.py
Added new Section dataclass to represent document sections
Implemented DocumentStructure class for parsing and managing document sections
Added methods for section ID generation and table of contents creation
Added functionality to extract specific sections by ID
fast-markdown-mcp/src/fast_markdown_mcp/server.py
Added two new MCP tools:
get_table_of_contents: Lists all sections in a document with their IDs
get_section: Retrieves specific sections by ID to avoid loading entire documents
Enhanced MarkdownStore class with section caching and management
Added structure_cache to store parsed document structures
Integrated DocumentStructure for section-based content retrieval
New Features:

Section-based document navigation
Document structure caching for improved performance
Table of contents generation
Section-specific content retrieval
URL-friendly section ID generation
Benefits:

Prevents token limit issues by allowing partial document loading
Improves navigation of large documents
Reduces memory usage by loading only requested sections
Maintains document structure for better content organization
This makes MCP server run in Experiment_branch
@Kryptos666 Kryptos666 added the enhancement New feature or request label Jan 31, 2025
@Kryptos666 Kryptos666 self-assigned this Jan 31, 2025
@vercel

This comment was marked as off-topic.

@Shubham-Khichi Shubham-Khichi linked an issue Jan 31, 2025 that may be closed by this pull request
Copy link
Contributor

@Shubham-Khichi Shubham-Khichi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@Shubham-Khichi Shubham-Khichi merged commit 0b90a3c into main Jan 31, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build Strategy to ensure accurate retrieval from MCP server.

3 participants