Skip to main content
Glama
Rello

Nextcloud Developer Documentation MCP

by Rello
README.md
# Nextcloud Developer Documentation MCP (Docker)

This project provides a Dockerized MCP server that fetches and indexes one or more
documentation source URLs recursively, then exposes MCP tools for coding agents.
The first configured sources are:

- `https://github.com/nextcloud-deps/ocp` (full repo, recursive)
- `https://github.com/nextcloud/documentation/tree/master/developer_manual` (subtree, recursive)
- `https://github.com/nextcloud/server/blob/master/openapi.json`
- `https://github.com/nextcloud-libraries/nextcloud-vue` (upstream source for `node_modules/@nextcloud/vue`)

The `nextcloud-developer-documentation-mcp` container runs as a persistent HTTP MCP service on `http://localhost:8000/nextcloud-developer-documentation-mcp`.
On every container start, all configured source URLs are refreshed and the index is rebuilt
before the server begins accepting MCP requests.

The intended end-user configuration is minimal:

- run `docker compose up -d nextcloud-developer-documentation-mcp`
- point your coding agent to `http://localhost:8000/nextcloud-developer-documentation-mcp`

## MCP tools

- `search_docs(query, top_k=5)`
  - Full-text search over indexed files from all configured source URLs.
- `get_doc(path, chunk=None, max_chars=12000)`
  - Fetch full content (chunked) for an indexed file path.
- `answer_docs(question, top_k=6)`
  - Retrieval-based answer with references.
- `refresh_index()`
  - Pull latest state for all configured source URLs and rebuild index.
- `docs_health()`
  - Health/index metadata.
- `list_indexed_files(limit=200, offset=0, prefix=None)`
  - Lists indexed file paths for validation (supports pagination and prefix filtering).

## What gets indexed

By default, these file extensions are indexed from all configured source URLs:

- `.md`, `.php`, `.rst`, `.txt`, `.yml`, `.yaml`, `.json`, `.js`, `.ts`, `.vue`, `.css`, `.scss`

The index is a SQLite FTS5 database persisted in a Docker volume (`nextcloud-docs-data`).


## Run with Docker Compose

Start the persistent HTTP MCP server:

```bash
docker compose up -d nextcloud-developer-documentation-mcp
```

## Add to coding agents (like Claude Code)

Point the agent at the running HTTP MCP endpoint:

```json
{
  "mcpServers": {
    "nextcloud-developer-documentation": {
      "url": "http://localhost:8000/nextcloud-developer-documentation-mcp"
    }
  }
}
```

## Add to coding agent Codex App

```toml
[mcp_servers.nextcloud_developer_documentation]
url = "http://localhost:8000/nextcloud-developer-documentation-mcp"
enabled = true
```
Agents that support HTTP MCP can use the same endpoint directly.