Poly MCP
A comprehensive MCP (Model Context Protocol) server with 73 tools across 11 modules — filesystem operations, diagnostics, scripting, time management, network utilities, context handling, git operations, user input, agent-centric version control, session clipboard, and text/data transforms.
Features
1. Filesystem Module
Advanced file and directory operations with snapshot management, search, and bulk editing:
- fs_read - Read file contents (with optional line ranges)
- fs_write - Write content to files (with optional line ranges)
- fs_move - Move files or directories
- fs_copy - Copy files or directories recursively
- fs_create - Create files or directories
- fs_delete - Delete files or directories
- fs_move_desktop - Organize items within Desktop directory
- fs_find - Search for files with pattern matching
- fs_ld - Detailed directory listing (like ls -la)
- fs_stat - Get file/directory metadata
- fs_permissions - Get or set Unix file permissions
- fs_watch - Monitor file/directory changes
- fs_snapshot - Create timestamped backups with auto-management
- fs_tree - Visual directory tree with depth control and pattern filtering
- fs_grep - Regex content search across files with context lines
- fs_tail - Read last N lines of a file
- fs_replace - Bulk find/replace across files with regex and dry-run support
2. Diagnostics Module
Language-agnostic error and warning detection:
- diagnostics_get - Get errors/warnings for files or projects
- Auto-detects appropriate diagnostic tool (cargo, tsc, eslint, pylint, etc.)
- Supports Rust, TypeScript/JavaScript, Python, C/C++
- Parses compiler/linter output into structured JSON
3. Silent Module
Bash scripting and system resource monitoring:
- silent_script - Execute bash scripts with arguments, env vars, and timeout
- silent_resources - Monitor GPU/RAM/CPU usage with detailed process info
- Supports nvidia-smi for GPU monitoring
- Process filtering and sorting by resource usage
4. Time Module
Time management, scheduling, and timekeeping:
- time_now - Get current timestamp in multiple formats (Unix, ISO8601, RFC3339, custom)
- time_sleep - Delay execution with configurable duration
- time_schedule - In-memory task scheduler with create/cancel/list/status operations
- time_timezone - Convert timestamps between IANA timezones, list available timezones
- time_stopwatch - Named stopwatches with start/stop/lap/reset/status/list
- time_timer - Countdown timers with check/cancel/list
- time_alarm - Set alarms by time or offset, check/cancel/list
5. Network Module
HTTP requests and package registry queries:
- net_fetch - Fetch URLs with automatic HTML to Markdown conversion
- net_cargo - Query crates.io for Rust package info
- net_node - Query npm registry for Node.js packages
- net_python - Query PyPI for Python packages
- net_apt - Query APT package information
- net_ping - Check network connectivity with statistics
6. Context Module
Token counting and context management for LLMs:
- ctx_context - Track token usage (total/used/left)
- ctx_compact - Compress text using zlib/gzip algorithms
- ctx_remove - Clear context and reset usage
- ctx_token_count - Count tokens for various LLM providers (GPT-4, Claude, etc.)
- ctx_memory_store - Store data in-memory (process lifetime)
- ctx_memory_recall - Retrieve stored data
- ctx_estimate_cost - Estimate API costs for Anthropic, OpenAI, Ollama, GLM
7. Git Module
Complete git operations via libgit2:
- git_status - Repository status with staged/unstaged/untracked files
- git_diff - View changes with patch format
- git_commit - Create commits
- git_branch - List, create, or delete branches
- git_checkout - Switch branches or commits
- git_blame - Show line-by-line authorship
- git_log - View commit history
- git_tag - Manage tags (lightweight and annotated)
8. Input Module
User interaction and notifications:
- input_notify - Send terminal and desktop notifications
- input_prompt - Interactive text prompts (terminal or MCP)
- input_select - Selection menus (terminal or MCP)
- input_progress - Display progress bars
- input_clipboard_read - Read from system clipboard
- input_clipboard_write - Write to system clipboard
9. Gitent Module
Agent-centric version control tracking:
- gitent_init - Initialize or connect to tracking session
- gitent_status - View session and uncommitted changes
- gitent_track - Manually track file changes (create/modify/delete/rename)
- gitent_commit - Commit tracked changes with message
- gitent_log - View commit history
- gitent_diff - View differences in unified or structured format
- gitent_rollback - Rollback to previous commit (preview mode by default)
Track file changes, create commits, view history, and rollback operations during AI agent operations.
10. Clipboard Module
Session-based copy/paste with tagging to save tokens:
- clip_copy_file - Copy text from a file (with optional line ranges) into session clipboard with a tag
- clip_copy - Copy arbitrary text directly into session clipboard with a tag
- clip_paste_file - Paste tagged content into a file (overwrite/append/prepend/line-replace)
- clip_paste - Retrieve tagged content or list all stored entries with metadata
- clip_clear - Clear one or all clipboard entries
11. Transform Module
Text and data processing utilities:
- transform_diff - Compare two texts or files with unified/inline/stats output
- transform_encode - Encode/decode base64, URL, hex, HTML entities
- transform_hash - Cryptographic hashing (SHA256, SHA512, MD5, BLAKE3) for text or files
- transform_regex - Regex operations: match, find_all, replace, split, extract capture groups
- transform_json - JSON manipulation: pretty-print, minify, validate, query, merge, keys, flatten
- transform_text - Text transforms: case conversion, sort/reverse/unique/trim/number lines, wrap, truncate, stats
- transform_archive - Create, extract, and list zip and tar.gz archives
Installation
Usage
Poly MCP supports two transport modes: stdio (default) and HTTP server.
Stdio Mode (Default)
Run the server using stdin/stdout (original MCP behavior):
The server communicates via JSON-RPC 2.0 over stdin/stdout following the MCP protocol. This is useful for piping commands or integrating with tools that expect stdio communication.
Example:
|
HTTP Server Mode
Run as an HTTP server on a specific port:
Options:
--serveror-s- Enable HTTP server mode--port <PORT>or-p <PORT>- Port to bind to (default: 3000)--host <HOST>- Host to bind to (default: 127.0.0.1)
Example usage:
# Start server on default port 3000
# Start server on custom port
# Start server on all interfaces
HTTP Endpoints:
POST /orPOST /jsonrpc- JSON-RPC 2.0 endpointGET /health- Health check endpoint
Example HTTP request:
Health check:
MCP Protocol Messages
Initialize:
List Tools:
Call Tool:
Example Tool Calls
Read a File
Read Specific Line Ranges
Write to Specific Line Ranges
Create a Snapshot
Run Diagnostics
Execute Bash Script
Monitor Resources
Fetch URL as Markdown
Get Latest Package Version
Count Tokens
Estimate API Cost
Git Operations
Send Notification
Clipboard Operations
Gitent Operations
License
Licensed under the MIT License.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.