farmos-mcp
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.
farmos-mcp
MCP server for a farmOS 4.x site. It speaks JSON:API, so the same server works in Cursor over stdio and in ChatGPT or Gemini over Streamable HTTP.
Reads are on by default. Creates and updates stay off until FARMOS_ALLOW_WRITES=true. There is no delete tool. The server will not create users, roles, or configuration, and it will only call the host in FARMOS_URL.
Tools
Tool | What it does |
| Farm name, version, units, and whether writes are on |
| Entity types and bundles on this server |
| Equipment, land, animals, and other assets |
| One record by UUID |
| Logs by type, status, asset, text, or date |
| Plans by status, name, or archived flag |
| Taxonomy terms (units, categories, …) |
| Record or correct a log (writes) |
| Assets, plans, quantities, terms (writes) |
Related MCP server: drupal-mcp
farmOS setup
farmOS 4 does not enable the API at install.
Enable
farm_api,farm_api_oauth, and a role module such asfarm_worker.Generate OAuth keys under Administration → Configuration → Web Services → Consumers → Settings. Keep the private key outside the public files directory.
Create a consumer with the client credentials grant, a secret, the
farm_workerscope, and a dedicated user who has that role.
Password grant also works (FARMOS_USERNAME / FARMOS_PASSWORD) if simple_oauth_password_grant is enabled. Client credentials are the better fit for an unattended server.
Configure
cp .env.example ~/.config/farmos-mcp/dunslaw.env
chmod 600 ~/.config/farmos-mcp/dunslaw.envCursor (~/.cursor/mcp.json):
{
"mcpServers": {
"farmos": {
"command": "npx",
"args": ["-y", "farmos-mcp"],
"env": {
"FARMOS_ENV_FILE": "/home/you/.config/farmos-mcp/dunslaw.env"
}
}
}
}Claude Desktop uses the same command shape. From a checkout, node dist/bin/cli.js after npm run build works the same way.
Remote HTTP
FARMOS_ENV_FILE=~/.config/farmos-mcp/dunslaw.env \
FARMOS_MCP_HTTP_TOKEN="$(openssl rand -hex 32)" \
FARMOS_MCP_PUBLIC_URL=https://farmos-mcp.example.com \
farmos-mcp --httpThe process listens on 127.0.0.1:8787 unless FARMOS_MCP_HOST says otherwise. Binding anything other than loopback requires FARMOS_MCP_HTTP_TOKEN.
Cursor and other hosts that can send a header use
Authorization: Bearer <token>againsthttps://<public-host>/mcp.ChatGPT and Gemini, which sign in with OAuth, open
/authorize. The login form asks for that same token. The server advertises/.well-known/oauth-protected-resourceand/.well-known/oauth-authorization-server.Redirects are accepted for
chatgpt.com,chat.openai.com,claude.ai,gemini.google.com, and loopback. Add an exact URI withFARMOS_MCP_OAUTH_REDIRECTSif a client uses another callback.
Do not put the HTTP listener on the public internet without the token. See docs/homelab.md and docs/connect.md.
Develop
npm install
npm test
FARMOS_ENV_FILE=~/.config/farmos-mcp/dunslaw.env npm run smokenpm test uses a mock farmOS. npm run smoke talks to the instance in the env file, creates one asset and one observation, then deletes them.
License
MIT
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
Connect AI clients to biomedical data and tools.
Official Fibery MCP server: query and update your workspace from any AI client via OAuth.
Read-only AI access to HAVN properties, leads, tasks, files, media, and analytics.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI models to interact with Drupal 10+ sites via JSON:API for querying, searching, and retrieving content. It supports listing content types, searching by title across all types, and fetching detailed node information including relationships.4ISC
- AlicenseAqualityCmaintenanceMCP server for Drupal sites via JSON:API, enabling CRUD operations on nodes, taxonomy terms, and users using natural language.8MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to access and manage CiviCRM data, including contacts, activities, contributions, events, and memberships, with full custom field support.5MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI models to manage a Drupal-shaped content store over MCP, including nodes, vocabularies, terms, tag filtering, and trigram/semantic search, while logging every tool call for observability.MIT