A comprehensive MCP (Model Context Protocol) server with extensive tooling for filesystem operations, diagnostics, scripting, time management, network utilities, context handling, git operations, and user input.
Poly MCP is a production-ready Model Context Protocol server that provides AI assistants with full access to system operations, development tools, and automation capabilities. It bridges the gap between AI models and system-level operations through a clean, well-documented JSON-RPC 2.0 interface.
Every module in Poly MCP is designed to work across multiple programming languages and environments. Whether you're working with Rust, TypeScript, Python, or C++, Poly MCP provides consistent tooling.
Built with robust error handling, comprehensive logging, and battle-tested libraries like libgit2, Poly MCP is ready for production use in critical environments.
Each of the 8 modules operates independently, allowing you to use only what you need. Modules don't have hidden dependencies or unexpected side effects.
Written in Rust for maximum performance, Poly MCP handles concurrent operations efficiently and maintains low memory overhead.
Poly MCP follows the Model Context Protocol specification, communicating via JSON-RPC 2.0 over stdin/stdout. This design allows seamless integration with any MCP-compatible AI system.
βββββββββββββββββββ
β AI Assistant β
ββββββββββ¬βββββββββ
β JSON-RPC 2.0
β (stdin/stdout)
ββββββββββΌβββββββββ
β Poly MCP β
β Server β
βββββββββββββββββββ€
β β’ Filesystem β
β β’ Diagnostics β
β β’ Silent β
β β’ Time β
β β’ Network β
β β’ Context β
β β’ Git β
β β’ Input β
βββββββββββββββββββ
Advanced file and directory operations with snapshot management, permissions handling, and real-time file watching. Perfect for managing codebases, data files, and system configurations.
Key Features:
Language-agnostic error and warning detection that automatically identifies the appropriate diagnostic tool for your project. Supports Rust, TypeScript, JavaScript, Python, C, and C++.
Key Features:
Execute bash scripts with full control over arguments, environment variables, and timeouts. Monitor system resources including GPU, RAM, and CPU usage with detailed process information.
Key Features:
Comprehensive time management and task scheduling with support for multiple timestamp formats and in-memory task scheduling.
Key Features:
HTTP requests with automatic HTML-to-Markdown conversion and package registry queries for Rust, Node.js, Python, and APT packages.
Key Features:
Token counting and cost estimation for various LLM providers, with support for text compression and in-memory data storage.
Key Features:
Complete git operations powered by libgit2, providing reliable version control capabilities without shell command dependencies.
Key Features:
User interaction through prompts, selections, notifications, and clipboard operations. Support for both terminal and desktop notifications.
Key Features:
cargo install poly-mcp
git clone https://github.com/polysystems/mcp
cd poly-mcp
cargo build --release
The binary will be available at target/release/poly-mcp.
poly-mcp
The server will listen on stdin and output to stdout following the MCP protocol.
{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {}}
{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "fs_read",
"arguments": {
"path": "/path/to/file.txt"
}
}
}
Poly MCP can be configured through environment variables:
POLY_MCP_LOG_LEVEL - Set logging level (debug, info, warn, error)POLY_MCP_MAX_SNAPSHOTS - Default maximum number of snapshots to keepPOLY_MCP_TIMEOUT - Default timeout for script execution (seconds)All tools follow a consistent error handling pattern:
{
"jsonrpc": "2.0",
"id": 3,
"error": {
"code": -32000,
"message": "File not found: /path/to/file.txt",
"data": {
"tool": "fs_read",
"path": "/path/to/file.txt"
}
}
}
Every tool call returns a structured response. Always check for errors before processing results.
When executing scripts or long-running operations, set appropriate timeouts to prevent hanging.
Always use absolute paths when possible. Relative paths are resolved from the server's working directory.
Use the silent_resources tool to monitor system resources before running intensive operations.
Use fs_snapshot before making significant file system changes to enable easy rollback.
Poly MCP has full access to the file system. Use appropriate permissions and sandboxing when running in production environments.
The silent_script tool executes bash scripts with full system access. Validate and sanitize script content before execution.
Network tools can access any URL. Consider implementing network policies or firewall rules for production deployments.
When performing multiple file operations, consider using pattern matching with fs_find instead of individual calls.
For large files, consider reading in chunks rather than loading entire contents into memory.
Package registry queries can be slow. Cache results when querying the same packages multiple times.
While Poly MCP supports concurrent operations, limit the number of simultaneous tool calls to avoid resource exhaustion.
Ensure the tool name is spelled correctly. Use tools/list to see all available tools.
Check file permissions and ensure the server process has appropriate access rights.
Increase timeout values for long-running operations or optimize the operation.
Check network connectivity and firewall settings. Some package registries may rate-limit requests.
Contributions are welcome! Please see our GitHub repository for:
Licensed under the MIT License. See LICENSE file for details.