nc-forms-mcp
Provides tools for interacting with Nextcloud Forms API v3, enabling AI agents to manage forms, questions, and options within a Nextcloud instance.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nc-forms-mcpcreate a new feedback form"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nc-forms-mcp
MCP server for the Nextcloud Forms API v3. Create, update, clone, and validate forms β without ever leaking an app password into the agent's context.
π€¨ The Problem
Nextcloud Forms has a REST API at /ocs/v2.php/apps/forms/api/v3/ that uses
HTTP Basic Auth with an app password. When an AI agent calls this API directly:
Issue | What happens | Consequence |
Credential leakage | The password passes through the LLM's context | Stored in logs, prompt caches, conversation history |
Tool sprawl | Every Forms operation is a raw | Inconsistent error handling, no validation |
No isolation | The same credential gets reused for WebDAV, shares, etc. | Scope creep β operations outside Forms API |
Repetition | Auth headers, error parsing, and retry logic in every call | Wasteful tokens and fragile code |
Bottom line: credentials in agent context = risk. Raw API calls in conversation = tech debt.
Related MCP server: mcp-n8n-builder
β The Solution
Wrap the Forms API in an MCP server that:
Reads credentials from environment variables only β the agent never sees them
Exposes 16 focused tools β
forms_get,questions_add,options_update, etc.Runs as a stdio subprocess managed by the Hermes MCP client
Returns structured JSON β no parsing needed
Validates form health with a single tool call
ββββββββββββββββ MCP stdio ββββββββββββββββββββ HTTPS Basic Auth ββββββββββββββββββββ
β β ββββββββββββββββ β ββββββββββββββββββββββ β
β Hermes β ββββββββββββββββ nc-forms-mcp β ββββββββββββββββββββββ Nextcloud Forms β
β Agent β β (Python process) β β API v3 β
β β β NC_FORMS_PASSWORDβ β β
ββββββββββββββββ β (env only, β ββββββββββββββββββββ
β never in chat) β
ββββββββββββββββββββπ¦ Installation
Prerequisites
Python 3.10+
Nextcloud instance with Forms app (v5+)
Nextcloud app password (Settings β Security β Devices & sessions)
Install
git clone https://github.com/erniomaldo/nc-forms-mcp.git ~/Proyectos/nc-forms-mcp
cd ~/Proyectos/nc-forms-mcp
# Hermes uses its own venv β install there:
uv pip install --python ~/.hermes/hermes-agent/venv/bin/python -e .Or use your project's venv:
uv venv && uv pip install -e .π§ Hermes Configuration
Add to ~/.hermes/config.yaml:
mcp_servers:
nc-forms:
command: "uv"
args:
- "run"
- "--directory"
- "/home/ernesto-personal/Proyectos/nc-forms-mcp"
- "nc-forms-mcp"
env:
NC_FORMS_USER: "erniomaldo"
NC_FORMS_PASSWORD: "your-app-password-here"
NC_FORMS_BASE: "https://base.agendasencilla.com"
timeout: 30Restart Hermes after adding. On startup it auto-discovers 16 tools prefixed
mcp_nc_forms_*.
π οΈ Tools
Tool | What it does | Use case |
| List all owned forms | Dashboard / overview |
| Get full form with questions, options, shares | Read current state |
| Create an empty form | Start a new brief/survey |
| Update title, description, settings | Iterate on form metadata |
| Clone a form (no submissions) | V1 β V2 iteration |
| Permanently delete a form | Cleanup |
| List all questions in a form | Overview |
| Get a single question by ID | Check specific question |
| Add a question (multiple choice, text, etc.) | Build form content |
| Update question text, description, isRequired | Refine wording |
| Remove a question | Prune sections |
| Reorder questions by ID array | Reorganize sections |
| Add options to a choice question | Populate answer choices |
| Update a single option's text | Fix typos |
| Remove an option | Cleanup |
| Check all questions have valid optionTypes | QA before publishing |
Tool naming
MCP prefix: mcp_nc_forms_ + tool name (underscores replace hyphens).
Example: mcp_nc_forms_forms_get β get form details.
π Usage (after Hermes integration)
# List all forms
mcp_nc_forms_forms_list()
# Get form 8 with all questions + options
mcp_nc_forms_forms_get({ "form_id": 8 })
# Add a question to form 8
mcp_nc_forms_questions_add({
"form_id": 8,
"type": "multiple_unique",
"text": "π¨ 1.2 ΒΏColores definidos?"
})
# Add options
mcp_nc_forms_options_add({
"form_id": 8,
"question_id": 74,
"option_texts": ["β
De acuerdo", "π‘ Cerca pero ajustes", "β No se parece"],
"option_type": "choice"
})
# Validate before publishing
mcp_nc_forms_forms_validate({ "form_id": 8 })
# β {"healthy": true, "total_questions": 32, "issues": []}π§ͺ CLI Testing (without Hermes)
export NC_FORMS_USER="erniomaldo"
export NC_FORMS_PASSWORD="your-app-password"
export NC_FORMS_BASE="https://base.agendasencilla.com"
nc-forms-mcp forms_list '{}'
nc-forms-mcp forms_get '{"form_id": 8}'
nc-forms-mcp forms_validate '{"form_id": 8}'ποΈ Project Structure
nc-forms-mcp/
βββ pyproject.toml # Project metadata + dependencies
βββ README.md # This file
βββ LICENSE
βββ nc_forms_mcp/
β βββ __init__.py # Package init (re-exports server)
β βββ server.py # MCP server: auth, route, tools, entry points
βββ tests/ # Coming soonπ Security
Credentials live in
envconfig β the agent never seesNC_FORMS_PASSWORDThe app password is scoped to Forms API only β WebDAV, Shares, Calendar, Collectives, and other Nextcloud features use their own MCP tools with their own auth
Error messages redact credential-like patterns
The MCP server process inherits a filtered environment (Hermes strips secrets from the subprocess env except what you explicitly set in
env)
What NOT to do
# β WRONG β password leaks into agent context
mcp_servers:
nc-forms:
command: "python3"
args: ["server.py", "--password", "TEZiJ-..."]# β
CORRECT β password stays in env
mcp_servers:
nc-forms:
command: "uv"
args: ["run", "--directory", "~/Proyectos/nc-forms-mcp", "nc-forms-mcp"]
env:
NC_FORMS_PASSWORD: "TEZiJ-..."π‘ Why not just use curl?
Approach | Secret leaks? | Inconsistent errors? | Token waste? | Reusable? |
Raw curl in conversation | β Always | β Every call | β Headers + parsing | β No |
Python script in /tmp | β In code | β Per script | β Duplicated logic | β Per task |
MCP server | β Never | β Unified | β One setup | β All tasks |
π Comparison with alternative approaches
nc-forms-mcp | Forms web UI | Direct REST API (curl) | Custom script | |
Setup | 5 lines in config.yaml | Zero (browser) | Zero (curl installed) | Python + requests |
Speed | Instant (stdio) | Point-and-click | Fast | Depends on quality |
Repeatability | β Always same tools | β Manual clicks | β Varies per call | β If committed |
Validation | β
| β Manual review | β Never | β Rarely |
CI/CD ready | β Yes | β No | β οΈ Needs auth wrapper | β If committed |
Secret safety | β In env only | β Browser session | β In command args | β οΈ In code or env |
Token cost | Low (one discovery) | N/A | High (per call) | Low (per script) |
π Related Projects
agentcheckpoint β atomic state store for multi-agent coordination (SQLite + MCP)
Hermes Agent β the personal AI agent that runs this MCP server
π License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/erniomaldo/nc-forms-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server