Osmcp logo

Osmcp

Policy-controlled MCP access to filesystem, Git, search, inspection, transformation, and mutation tools.

Install Osmcp

Run the project’s own setup commands, in order.

Setup steps from the project

osmcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    brew tap KrushnaVardhanReddy/tap
    
  2. 2. Install
    brew install osmcp
    
  3. 3. Install
    make build
    
  4. 4. Start the server
    bin/osmcp --policy policy.toml
    
  5. 5. Install
    npx @smithery/cli install osmcp
    

Overview

The osmcp MCP server gives AI agents typed access to selected filesystem, Git, search, and text-processing operations over stdio. A TOML policy controls the allowed directory, visible tools, mutation permissions, timeouts, output size, and match counts. Every invocation is recorded in an append-only audit log and returned in a consistent typed envelope. Reach for it when an agent needs bounded access to local project files or Git repositories rather than unrestricted OS command execution.

Use cases

  • Inspect a bounded local project with an AI agent
  • Search source files within an approved directory
  • Review Git status, history, and diffs
  • Apply controlled file edits under a policy
  • Audit agent tool invocations

Key features

  • Policy-controlled filesystem and Git tools
  • Allowed-root path enforcement
  • Tool allowlists and mutation controls
  • Timeout, output, and match limits
  • Append-only NDJSON audit logging
  • Typed MCP response envelopes

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

17/17 checks healthy over the last 93d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 8/27/2026 via OSV.dev

How Osmcp works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Osmcp

osmcp is an MCP server that connects AI agents to policy-controlled local filesystem, Git, search, inspection, and text-processing capabilities. Its main tools include grep, find, ls, cat, Git status and diff inspection, jq, sed, and optional file or Git mutations. A TOML policy controls paths, tools, limits, and auditing.

Install it with Homebrew using the project's tap and `brew install osmcp`, or build it from source with `make build`. You can also use `npx @smithery/cli install osmcp` to install it for Claude Desktop through Smithery.

Configure permissions in a TOML policy file passed with `--policy`. Set `allowed_root` for the permitted filesystem boundary, list exposed tools in `allowed_tools`, and use `allow_mutation` to enable or disable write and Git mutation operations.

Yes, osmcp works with Claude Desktop through its stdio MCP configuration. Add an `mcpServers` entry that runs the `osmcp` command and passes the absolute path to the TOML policy file as the `--policy` argument.

Set `timeout_ms`, `max_output_bytes`, and `max_matches` in the policy's `[limits]` section to constrain individual operations. The `[audit]` section sends append-only NDJSON records to stderr or a configured file, and responses report execution time and truncation status.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOsmcp AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/osmcp?style=directory)](https://allmcps.com/mcp/osmcp)
HTML Embed
<a href="https://allmcps.com/mcp/osmcp"><img src="https://allmcps.com/api/badge/osmcp?style=directory" alt="Osmcp on AllMCPs" /></a>