Claude Document Management MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Claude Document Management MCP ServerRead @document.md and summarize its contents."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CLI Project Ruby
A production-ready Ruby-based interactive CLI that integrates the Model Context Protocol (MCP) with Claude AI for intelligent document management through a natural chat interface.
Description
This application demonstrates enterprise-grade MCP integration by combining a Ruby MCP client/server architecture with Anthropic's Claude API. Users interact with Claude through a sophisticated terminal interface, enabling AI-driven document operations via natural language commands.
Value Proposition:
Zero-friction document management: Edit and read documents through conversational AI
MCP-native architecture: Built on the Model Context Protocol for extensible tool integration
Developer-friendly: Railway pattern services, Zeitwerk autoloading, and comprehensive debugging tools
Production patterns: ServiceResult state management, interface enforcement, and structured logging
Architecture Overview:
Client layer: MCP client + Anthropic API integration with TTY-enhanced console
Server layer: MCP server exposing document tools, resources, and prompt templates
Shared core: Railway-pattern services, abstract interfaces, and dual-output logging
Related MCP server: DocuMCP
Prerequisites
Ruby 4.0.5
Bundler
Overmind (for process management)
Node.js 24.11 (for MCP inspector)
Installation
Clone the repository
Install dependencies:
bundle install npm installConfigure environment variables:
cp .env.example .envEdit
.envand set:ANTHROPIC_API_KEY- Your Anthropic API keyCLAUDE_MODEL- Claude model to use (e.g.,claude-3-5-sonnet-20241022)
Running the Application
Using Overmind (Recommended)
# Start all processes from Procfile
overmind start
# Specific processes
overmind start -l client_server
overmind start -l inspector
# Connect to STDIO of processManual Start
Run the main application:
# Start MCP client-server
bundle exec ruby client_server.rb
# Start MCP server only
bundle exec ruby server.rb
# Start MCP inspector
npx @modelcontextprotocol/inspector bundle exec ruby server.rbUsage Guide
Document References
Check server/docs.json as the single source of truth.
Use @document syntax to reference documents in your messages:
You: Can you read @report.pdf?
Claude: [uses ReadDocument tool to fetch content]
You: Please update @plan.md with the new timeline
Claude: [uses EditDocument tool to modify content]Slash Commands
Execute special commands with the / prefix:
/clear- Clear conversation history/exit- Exit the applicationAdditional local commands can be defined in the client configuration
Additional prompt commands can be defined in the server configuration
Keywords
exit, quit, q: Exit the application
Keyboard Shortcuts
Escape key: Cancel current input and return to prompt
Ctrl+C: Interrupt tool execution or exit application
Ctrl+D: Submit multiline input (in multiline mode)
Input Modes
Single-line mode (default):
Type message and press Enter
Suitable for quick queries and commands
Multiline mode (when needed):
Press Shift+Enter to start multiline input
Type across multiple lines
Press Enter to submit
Press Escape to cancel
MCP Components
The application implements a complete MCP server with the following component layers:
Tools Layer
Executable operations that Claude can invoke to perform actions:
ReadDocument: Retrieve document content by ID
EditDocument: Modify document content with new text
Resources Layer
Discoverable data sources exposed via URI patterns:
Direct resources: Static listings (e.g.,
docs://documentsfor all documents)Templated resources: Dynamic URIs with parameters (e.g.,
docs://documents/{doc_id}for specific documents)
Prompts Layer
Reusable prompt templates for common operations:
FormatPrompt: Template for document formatting instructions
Additional prompts can be defined for specialized workflows
All components follow base class patterns (BaseTool, BaseResource, BasePrompt) enabling consistent implementation and easy extension.
Project Structure
.
├── client_server.rb # Entry point for CLI application (MCP Client + Server)
├── server.rb # MCP server implementation
├── Procfile # Overmind/Foreman process definitions
├── core/ # Core classes
├── application_service.rb # callable service
├── constants.rb # global constants
├── service_result.rb # railway pattern service result
├── interface.rb # interface implementation in Ruby
└── application_logger.rb # text file logger for client/server
├── client/ # Client classes
├── server/ # Server classes
└── lib/ # Shared libraries
└── tty_patch/ # TTY-prompt monkey patchDependencies
anthropic - Anthropic API client
mcp - Model Context Protocol implementation
tty-prompt - Interactive command line prompts
zeitwerk - Code loader
Development
Debug mode is available via the debug gem. Set breakpoints using debugger or binding.break.
Server logs are available in log/server.log.
MCP inspector could be used for debugging server-side tooling.
Troubleshooting
Debug Logging
Enable detailed debug output by setting the LOG_LEVEL environment variable:
# In .env file
LOG_LEVEL=debug # DEBUG level
# Or inline
LOG_LEVEL=debug bundle exec ruby client_server.rbLogs are written to logs/server.log.
Interactive Debugging with binding.break
Insert breakpoints anywhere in the code:
def process_message(message)
binding.break # Execution pauses here
# ... rest of method
endWhen execution hits the breakpoint:
Inspect variables:
message,self, local scopeStep through code:
step,next,continueEvaluate expressions: type any Ruby code
Exit debugger:
continueorc
Common debugging scenarios:
# In client/chat_manager.rb
def handle_tool_use(tool_call)
binding.break # Debug tool execution
# ...
end
# In server/tools/read_document.rb
def call(arguments)
binding.break # Debug tool implementation
# ...
endNB. On server-side debugging could be challenging after server start, due to the asynchronous nature of MCP. Prefer logger or inspector instead
MCP Inspector
The MCP Inspector provides a web UI for testing MCP server components without running the full client:
Start inspector:
# Via Overmind
overmind start -l inspector
# Or manually
npx @modelcontextprotocol/inspector bundle exec ruby server.rbInspector features:
Browse available tools, resources, and prompts
Test tool execution with custom arguments
View resource URIs and content
Inspect prompt templates
Monitor MCP protocol messages
Typical workflow:
Open browser to inspector URL (shown in terminal)
Verify tools are registered correctly
Test
ReadDocumentwith sample document IDsTest
EditDocumentwith content modificationsCheck resource listings for
docs://documentsValidate prompt templates
Common Issues
Issue: "Cannot connect to MCP server"
Try to start the server using
bundle exec ruby server.rbCheck the raised exception
Check
logs/server.logfor server errors
Issue: "Tool execution fails"
Enable DEBUG logging:
LOG_LEVEL=0Repeat your workflow
Check
logs/client.logfor client errorsCheck
logs/server.logfor server errors
Issue: "Multiline input works incorrect"
Try Ctrl+D to submit (not Enter)
Check terminal compatibility (some terminals don't support raw mode)
Issue: "Environment variables not loaded"
Verify
.envfile exists and has correct formatCheck
ANTHROPIC_API_KEYis set (not empty)Restart application after
.envchanges
TODO:
Add Tasks
Add RSpec coverage
Add Rubocop
Add Sorbet
Try HTTP MCP
Add OAuth2
Think how to polish monkey patches
License
MIT License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.15304MIT
- Flicense-quality-maintenanceAn MCP server that enables Claude to generate, search, and manage documentation for codebases using vector embeddings and semantic search, providing tools for creating user guides, technical documentation, code explanations, and architectural diagrams.6
- Flicense-qualityCmaintenanceThis MCP server integrates with Azure AI Foundry's Claude deployment to provide document management functionality. It enables tools for reading, writing, and listing files, allowing Claude to interact with local documents through an Azure-compatible client.
- Alicense-qualityFmaintenanceMCP server that allows you to connect to Google Docs through Claude, enabling listing, reading, creating, updating, searching, and deleting documents.1,40947MIT
Related MCP Connectors
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server giving Claude AI access to 22+ NYC public-record databases for real estate due diligence
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ailecksandr/claude-course-mcp-task'
If you have feedback or need assistance with the MCP directory API, please join our Discord server