# osmcp [Health: Active]

**Category:** 🖥️ OS Automation  
**Repository:** https://github.com/KrushnaVardhanReddy/osmcp  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/osmcp

## Description
A typed, policy-controlled OS capability layer for AI agents.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/KrushnaVardhanReddy/osmcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
brew tap KrushnaVardhanReddy/tap
```

2. Install:

```sh
brew install osmcp
```

3. Install:

```sh
make build
```

4. Start the server:

```sh
bin/osmcp --policy policy.toml
```

5. Install:

```sh
npx @smithery/cli install osmcp
```

## Documentation

## What osmcp does

The osmcp MCP server exposes a curated set of operating-system capabilities through MCP JSON-RPC over stdio. Its tools cover file discovery and inspection, directory structure, disk usage, text searching, JSON and text transformation, Git inspection, file changes, and selected Git mutations.

Read-only capabilities include `grep`, `find`, `ls`, `cat`, `stat`, `wc`, `head`, `tail`, `tree`, `du`, `git_status`, `git_diff`, and `git_log`. Transformation tools include `jq`, `sed`, and `diff`. File and Git mutation tools are available separately, including `write_file`, `append_file`, `mkdir`, `rm`, `mv`, `cp`, `patch`, `git_add`, `git_commit`, `git_checkout`, `git_branch`, `git_pull`, and `git_push`.

## How it works

An MCP-compatible client starts the `osmcp` binary and communicates with it through standard input and output. Requests pass through a policy engine before reaching a registered tool. The engine checks whether paths remain within `allowed_root`, whether the requested tool appears in `allowed_tools`, and whether mutations are enabled.

The policy can also impose an invocation timeout, maximum response size, and maximum number of search matches. Each call produces a typed response containing success status, tool name, data or error information, and metadata such as execution time and truncation status. An audit logger writes invocation records as append-only NDJSON to stderr or a configured file.

## Setup and configuration

Install the osmcp MCP server with Homebrew by adding its tap and running `brew install osmcp`, or build it from source with `make build`. Start the binary with `--policy` followed by a TOML policy path.

A policy defines the permitted root directory, visible tools, and mutation setting. A separate limits section controls timeout, output bytes, and search matches. The audit section selects stderr or file output and can specify an NDJSON path. Clients such as Claude Desktop can launch the binary with the policy path in their MCP configuration. Smithery provides an `npx @smithery/cli install osmcp` installation path for Claude Desktop, and the project documents LiteLLM MCP Gateway integration.

## Tools and capabilities

The osmcp MCP server is suitable for agents that need to inspect or modify a bounded project workspace. Tool visibility is policy-controlled: tools omitted from the allowlist are not exposed through MCP discovery. Setting `allow_mutation` to false blocks mutating filesystem operations and Git actions globally, while read and inspection tools can remain available.

The implementation uses typed tool registration and consistent response envelopes. Its documented dependencies include a Go MCP SDK, pure-Go Git handling, JSON processing, patch parsing, regular-expression search, and TOML configuration parsing.

## Limitations and notes

Access is intentionally limited by the configured root and tool allowlist. Path traversal outside the allowed root is rejected, and disabled mutation operations cannot be used even if the client requests them. Output and search limits may truncate results, with truncation reported in response metadata.

The osmcp MCP server communicates over stdio rather than exposing a network endpoint in the documented startup flow. The project is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/osmcp/readme_

