oclif MCP Server Plugin is an MCP server plugin that converts any oclif-based command-line interface into a Model Context Protocol compliant server. It connects developer CLI commands directly to AI environments like Claude Desktop and Cursor. Developers building tools on the oclif framework use this plugin to allow AI assistants to discover commands, validate inputs via type-safe schemas, and execute terminal actions directly from conversation windows. The plugin automatically converts oclif flags and arguments into Zod schemas, exposes static and dynamic resources, and handles prompt templates. It supports both standard input/output (stdio) for local desktop workflows and streamable HTTP with Server-Sent Events for networked or containerized environments. By exposing CLI capabilities through standardized protocol methods, developers can integrate deployment scripts, data queries, and diagnostic tasks into LLM interactions without rewriting their existing CLI architecture.
Category: AI & LLM Tooling
Tags: automation, cli, oclif, plugin
To install and configure the oclif MCP Server Plugin with an existing oclif CLI: 1. Add the plugin to your CLI's package.json under dependencies and oclif.plugins: json { "dependencies": { "oclif-plugin-mcp-server": "latest" }, "oclif": { "plugins": ["oclif-plugin-mcp-server"] } } Alternatively, install it directly using your CLI's plugin manager: your-cli plugins install npjonath/oclif-plugin-mcp-server. 2. Add the server entry to your MCP client configuration (such as Claude Desktop or Cursor's mcp.json): json { "mcpServers": { "your-cli": { "command": "your-cli", "args": ["mcp"] } } } 3. Restart your MCP client to allow the assistant to discover and invoke the CLI commands.
Part of MCP Servers
You can embed the plugin directly into your oclif CLI by adding oclif-plugin-mcp-server to dependencies and the oclif plugins array in package.json. Alternatively, install it directly from GitHub using your CLI plugins install npjonath/oclif-plugin-mcp-server command, then verify it by running your-cli mcp --help.
It automatically discovers your oclif CLI commands and flags, generates Zod schemas for input validation, and exposes them as MCP tools. It also provides MCP resources, prompt templates, workspace root registration, and supports both standard input/output and HTTP streamable transport modes.
The plugin works with any MCP-compliant client. Supported clients include Claude Desktop and Cursor using standard input/output transport, as well as web applications, Docker environments, or HTTP clients connecting via Server-Sent Events and HTTP endpoints.
It supports two main transports: standard input/output (stdio) for local clients like Claude Desktop and Cursor, and streamable HTTP with Server-Sent Events for networked integrations, multi-client sessions, and container deployments.