osmcp
Provides tools for inspecting and manipulating Git repositories, including status, diff, log, add, commit, checkout, branch, pull, and push operations.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
osmcp β OS Capabilities for AI Agents
A typed, policy-controlled OS capability layer for AI agents via the Model Context Protocol (MCP).
osmcp exposes a curated set of safe filesystem, git, and text-processing tools to AI agents β all governed by a strict Policy Engine that enforces path boundaries, tool allowlists, output limits, mutation controls, and an immutable audit trail.
π Read the comprehensive Architecture & Design Document for a deep dive into the philosophy, safety boundaries, and design decisions behind osmcp.
Features
Category | Tools | Phase |
π Search |
| 1 |
π File Inspection |
| 1 |
π³ Filesystem |
| 1 |
π Git Intelligence |
| 1 |
π§ Transform |
| 1 |
βοΈ File Mutation |
| 2 |
π Git Mutation |
| 2 |
Related MCP server: nc-tools-mcp
Architecture
AI Agent (Claude, GPT, etc.)
β MCP JSON-RPC (stdio)
βΌ
osmcp binary
βββ Policy Engine β enforces allowed_root, allowed_tools, limits
βββ Audit Logger β append-only NDJSON log of every invocation
βββ Tool Registry β self-registering tools via RegisterMCP()
βββ Envelope Builder β typed {ok, data, error, meta} responsesDemo
A demonstration of Claude Desktop securely editing code via osmcp, safely bounded by a TOML policy engine.
Quick Start
1. Install via Homebrew
brew tap KrushnaVardhanReddy/tap
brew install osmcpAlternatively, build from source:
make build
# Binary: bin/osmcp2. Configure a Policy
# policy.toml
[policy]
allowed_root = "/home/user/myproject"
allowed_tools = ["grep", "ls", "cat", "git_status", "git_log"]
allow_mutation = false
[limits]
timeout_ms = 5000
max_output_bytes = 1048576
max_matches = 100
[audit]
destination = "stderr" # or "file"
path = "/var/log/osmcp-audit.ndjson"3. Run
bin/osmcp --policy policy.tomlThe binary communicates over stdio using MCP JSON-RPC. Connect any MCP-compatible client.
Client Integrations
Claude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"osmcp": {
"command": "osmcp",
"args": ["--policy", "/absolute/path/to/policy.toml"]
}
}
}Smithery (npx)
To install osmcp for Claude Desktop automatically via Smithery:
npx @smithery/cli install osmcpLiteLLM
Integrate osmcp into your enterprise LLM proxy using the LiteLLM MCP Gateway.
5. Test
make test # unit tests
make e2e # end-to-end tests against real binary
make lint # golangci-lintPolicy Security Model
allowed_rootβ All filesystem paths are validated to be inside this root. Traversal outside is blocked withPOLICY_DENIED.allowed_toolsβ Only tools in this list are visible to the MCP client. Unlisted tools do not appear intools/list.allow_mutationβ Whenfalse, mutating tools (write, delete, git commit) are globally blocked.Limits β Per-invocation timeout, output byte cap, and match count cap prevent runaway operations.
Envelope Response Format
All tool responses follow a consistent typed envelope:
{
"ok": true,
"tool": "grep",
"data": { ... },
"error": null,
"meta": {
"execution_time_ms": 12,
"truncated": false
}
}License
MIT
Acknowledgements
osmcp would not be possible without the incredible open-source libraries it is built upon:
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Secure Linux sandboxes for AI agents, as MCP tools.
An MCP gateway for teams deploying AI tools at scale to employee-facing and headless agents.
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
Your company's tools, memory and Automations for ChatGPT, Claude or any MCP agent. Open source.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceRemote execution layer for agentic systems exposing 64 production tools via MCP for file, network, system, text, git, crypto, and monitoring operations.MIT
- AlicenseNot gradedqualityCmaintenanceEnables coding agents to perform file, search, patch, git, process, test, package, network, and system operations through 60 typed MCP tools with structured inputs/outputs, structured errors, and a full event journal, replacing terminal use with a typed machine API.MIT
- AlicenseCqualityBmaintenanceLocal-first MCP runtime for coding agents with bounded workspace access, content-preconditioned writes, AST search, LSP navigation and diagnostics, and Git status/diff. Designed to give coding agents useful repository access without treating unrestricted shell access as the default integration boundary.133MIT
- AlicenseNot gradedqualityBmaintenanceA local-first MCP server that enables AI-assisted coding through workspace-scoped tools for file reading/editing, command execution, jobs, Git, LSP, media, browser, and desktop workflows. It enforces OAuth, workspace ACL, trust policies, and file/secret guards so owners can safely grant inspect, edit, or trusted capabilities.765 npmMIT