Overview
The MCP integration exposes m87’s functionality to AI agents, allowing them to:- Query device status and metrics
- Execute commands on remote devices
- Manage deployments
- Forward ports
- Access logs and audit trails
- Transfer files
- And more
Setup
1
Verify m87 Installation
Ensure m87 is installed and accessible in your PATH:If not installed, follow the installation guide.
2
Configure Your MCP Client
Add m87 to your MCP client configuration. The configuration varies by client:
Claude Desktop / Claude Code
Edit your MCP settings file:macOS:~/Library/Application Support/Claude/claude_desktop_config.jsonLinux: ~/.config/Claude/claude_desktop_config.jsonAdd the following configuration:3
Authenticate
Ensure you’re logged in to m87:The MCP server will use your existing authentication.
4
Restart Your MCP Client
Restart Claude Desktop or your MCP client to load the new configuration.
Configuration Options
Using Absolute Path
Ifm87 is not in your PATH, specify the full path to the binary:
Custom Environment Variables
You can pass environment variables to the MCP server:Usage Examples
Once configured, you can interact with your devices through natural language in your AI assistant:Device Management
Remote Execution
Logs and Monitoring
Deployments
Available MCP Tools
The m87 MCP server exposes all platform commands as tools, including:- Device Management: List devices, check status, approve devices
- Remote Access: Execute commands, open shells, forward ports
- File Operations: Copy files, sync directories
- Container Management: Docker passthrough, view containers
- Monitoring: View logs, metrics, audit trails
- Deployments: Deploy compose files, check deployment status
- Serial Access: Forward serial mounts
Supported MCP Clients
The m87 MCP server works with any MCP-compatible client:- Claude Desktop
- Claude Code (VS Code extension)
- Any other MCP-compatible application
Troubleshooting
MCP server not appearing in client
MCP server not appearing in client
- Verify the configuration file path is correct for your operating system
- Ensure the JSON syntax is valid
- Restart your MCP client after making changes
- Check that
m87is accessible (runwhich m87or use absolute path)
Authentication errors
Authentication errors
Make sure you’re logged in:The MCP server uses your existing m87 credentials.
Command not found errors
Command not found errors
If you see errors about
m87 not being found:- Find the full path:
which m87 - Use the absolute path in your configuration:
Testing the MCP server
Testing the MCP server
You can test the MCP server directly:This will start the server in stdio mode. Press Ctrl+C to exit.
Security Considerations
- The MCP server uses your existing m87 authentication
- All operations are subject to your device permissions
- Audit logs track all device interactions, including those via MCP
- The MCP server runs with the same privileges as your user account