- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Documented (README)
- !No description
git clone https://github.com/RanchBot/mcp-server{
"mcpServers": {
"mcp-server": {
"command": "node",
"args": ["/path/to/mcp-server/dist/index.js"]
}
}
}MCP Servers overview
# Ranch.Bot MCP Server
Work with cattle and sheep records from a local stdio MCP client. Requires Node.js 22 or newer,
a Ranch.Bot account and access to a farm. Ranch.Bot does not operate a hosted MCP endpoint.
## Release availability
Check [the release and setup page](https://ranch.bot/connect-your-ai) for verified public versions.
A source checkout or candidate is not evidence that a version is available on npm or in the Registry.
The public CLI has separate [setup instructions](https://ranch.bot/docs/cli-setup).
For everyday records, use [SMS and web setup](https://ranch.bot/docs/getting-started).
## Terminal commands
With the installed `ranchbot-mcp` command, run `ranchbot-mcp login` in a terminal and approve the
URL and code in your browser. Configure your local MCP client to run `ranchbot-mcp` with no arguments.
Use an absolute executable path if the client does not inherit your terminal PATH.
`ranchbot-mcp --help` and `ranchbot-mcp --version` require no authentication.
Run `ranchbot-mcp logout` to revoke the session before removing its local credentials.
## Source development
Requires Node.js 22 or newer and an authorized Ranch.Bot development environment.
```bash
npm install
npm run build
npm test
```
Run the stdio entry directly from a local MCP client:
```text
node /absolute/path/to/mcp-server/dist/index.js
```
Set these environment variables for the development environment:
| Variable | Required state | Purpose |
| --- | --- | --- |
| `RANCHBOT_API_URL` | Explicit development API URL | Ranch.Bot API used by the source server |
| `COGNITO_DEVICE_CLIENT_ID` | Explicit public development OAuth client | Device-flow registration for that API |
| `API_VERSION` | Optional, defaults to `v1` | API version |
The default is the stable public client `ranchbot-mcp`. Deploy its database migration before
using cloud authentication. A local API URL alone does not select installation-local accounts.
Development watch mode:
```bash
npm run dev
```
## Local client configuration
A source checkout can point an MCP client at the built file. Example shape:
```json
{
"mcpServers": {
"ranchbot-development": {
"command": "node",
"args": ["/absolute/path/to/mcp-server/dist/index.js"],
"env": {
"RANCHBOT_API_URL": "http://localhost:7001",
"COGNITO_DEVICE_CLIENT_ID": "development-public-client-id"
}
}
}
}
```
Use a real public OAuth client from the development environment. Never commit API keys, OAuth
tokens, or secret-bearing client registrations.
## Authentication
The stdio transport uses Ranch.Bot's OAuth device flow. Run `node dist/index.js login` in a
terminal before connecting your MCP client. Visit the displayed URL and explicitly approve browser
access. Tool calls without a session return terminal-login instructions and do not start login.
`node dist/index.js logout` revokes the session before clearing the cache; failed revocation retains
credentials for a retry. `--help` and `--version` work without authentication. No arguments starts stdio.
Ordinary login requests `read:farms`, read/write animals, groups and records, and `read:exports`.
Use `list_my_farms` then `set_default_farm`, or supply an explicit `farm_id`, before farm operations.
A replacement session for a different principal clears the in-process farm selection. Tokens are cached locally in `~/.ranchbot-mcp-tokens.json` with restricted file
permissions and refresh when the configured environment supports it.
The optional self-hosted HTTP transport uses bearer API-key auth for development compatibility. API
keys are deprecated and are not part of customer onboarding.
### Admin import sign-in
For internal concierge imports, add `--admin` to the stdio command (or to the local client's
`args` array):
```text
node /absolute/path/to/mcp-server/dist/index.js --admin
```
This selects the named `ranchbot-admin-cli` client and requests `admin:imports` alongside the
eight ordinary scopes. It overrides `COGNITO_DEVICE_CLIENT_ID`; explicitly setting that variable
to `ranchbot-admin-cli` also selects admin mode. The API must have that client registration, and
an admin account must approve the displayed device code in the browser.
Admin sessions use `~/.ranchbot-mcp-admin-tokens.json` and a separate persistent
`~/.ranchbot-mcp-admin-tokens.lock`. Ordinary sessions retain their existing cache and lock.
Run `node dist/index.js login --admin` before using admin mode;
admin refresh and sign-in do not replace the ordinary session.
The `list_pending_imports`, `get_import_request`, and `update_import_request_status` tools require
this admin session. Ordinary device sessions and the HTTP transport's API keys cannot use them.
The API checks both the import capability and current admin status on every request.
## Tool surface
The source server exposes farm-scoped tools for:
- farms and current farm context;
- animals and identifiers;
- groups;
- health, movement, feed, genetic, and other records;
- atomic birth events, linked follow-up tasks, and immutable farm protocol versions; and
- read-only Farm Memory.
External MCP writes execute through the MCP client's granted access. They do not use the Ranch.Bot
app's review-before-saving screen. Ordinary CRUD tools call the farm endpoints and do not create the
Action rows that back Change History today. The source guarantees to preserve are farm scope and
revocation.
`preview_birth_event` returns the complete birth bundle, resolved evidence, and a confirmation hash
without saving farm data. Show every field to the producer and obtain explicit approval before
`confirm_birth_event`, preserving the exact `request_id`, `bundle`, and `confirmation_hash`.
Corrections or changed evidence require a fresh preview and renewed approval. Confirmation requires
EDITOR access and `write:records`, `write:animals`, and `write:groups` scopes.
`list_birth_events` and `get_birth_event` retrieve saved events; `list_farm_tasks` includes undated
TODOs, and `update_farm_task` changes status or the optional due date. `list_protocol_versions` and
`create_protocol_version` use producer-provided immutable steps without inventing care instructions.
`get_birth_source_evidence` reads the source author's retained SMS media status and current-farm
identity candidates. It requires `read:records`, `read:animals`, and current farm access. Partial or
ambiguous matches require producer selection before birth confirmation.
## Checks
```bash
npm run build
npm run typecheck
npm run lint
npm run prettier
npm test
```
Public setup returns only after current OAuth/scopes, npm and Registry read-back, and clean-machine
installation, authentication, farm scope, representative reads/writes, revocation, and upgrades
pass. CLI 1.0.0 is already public and has independent setup guidance; local publication does not imply a hosted
ChatGPT/Gemini connection. Current status:
[ranch.bot/connect-your-ai](https://ranch.bot/connect-your-ai).
## License
MIT
### Token-cache locking and upgrades
Token-cache reads and mutations use exclusive OS-managed locks (Node 22, pinned
`fs-native-extensions@1.5.0`). Lock files at `~/.ranchbot-mcp-tokens.lock` persist after logout
and process exit; their existence does not mean a client holds the lock. The OS releases
ownership when a client exits or crashes, allowing waiting clients to recover automatically.
Do not delete or replace a lock file while clients are running.
Each tool call checks the shared cache so running clients adopt replacement sessions.
Requests already using a revoked session may fail; failed requests are returned to the caller
without automatic replay.
Stop all older CLI/MCP processes before upgrading. Concurrent old/new lock protocols are
unsupported. A legacy file identifying a live process is rejected with an upgrade error;
an abandoned legacy file is reused in place. Acquisition errors fail closed, and contention
times out after 30 seconds.
Caches are bound to the API origin and OAuth client ID. A mismatch is rejected without overwriting
credentials. Stop older clients before upgrading. For a cache without this metadata, run logout with
its original `RANCHBOT_API_URL` and `COGNITO_DEVICE_CLIENT_ID`. Older provider credentials cannot be
revoked by the device-session endpoint: revoke them with the original provider before removing the
cache. A successful HTTP response alone does not establish legacy revocation.
Installation-local accounts retain the CLI-managed installation session: use
`ranchbot login --local --api-url <installation>` and set `RANCHBOT_DEPLOYMENT_MODE=local` plus the
same `RANCHBOT_API_URL` in the MCP client. MCP login/logout directs you to the CLI in that mode.
What people ask about mcp-server
What is RanchBot/mcp-server?
+
RanchBot/mcp-server is mcp servers for the Claude AI ecosystem with 0 GitHub stars.
How do I install mcp-server?
+
You can install mcp-server by cloning the repository (https://github.com/RanchBot/mcp-server) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is RanchBot/mcp-server safe to use?
+
Our security agent has analyzed RanchBot/mcp-server and assigned a Trust Score of 77/100 (tier: Trusted). See the full breakdown of passed checks and flags on this page.
Who maintains RanchBot/mcp-server?
+
RanchBot/mcp-server is maintained by RanchBot. The last recorded GitHub activity is dated 2026-09-16, with 0 open issues.
Are there alternatives to mcp-server?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy mcp-server to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/ranchbot-mcp-server)<a href="https://claudewave.com/repo/ranchbot-mcp-server"><img src="https://claudewave.com/api/badge/ranchbot-mcp-server" alt="Featured on ClaudeWave: RanchBot/mcp-server" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ
The fastest path to AI-powered full stack observability, even for lean teams.