| .. | |||
| app | 1 day ago | ||
| tests | 1 day ago | ||
| README.md | 1 day ago | ||
| pyproject.toml | 1 day ago | ||
FastAPI backend and MCP server for reading and maintaining Gnexus Book documentation and inventory.
From the repository root:
cd server python3 -m venv .venv . .venv/bin/activate pip install -e ".[dev]" uvicorn app.main:app --reload --host 127.0.0.1 --port 8080
The MCP server exposes the same repository, inventory, validation, pending-change, and Git commit logic through MCP tools and resources.
Run over stdio:
cd server .venv/bin/python -m app.mcp_server
Optional environment:
GNEXUS_BOOK_REPO_ROOT=/path/to/gnexus-bookGNEXUS_BOOK_MCP_TRANSPORT=stdio|sse|streamable-httpCore tools:
search_docs(query)read_doc(path)list_docs()list_inventory(inventory_type?)get_inventory_item(inventory_type, item_id)get_relationships()validate_repository()check_freshness()git_status()git_diff(files?)propose_doc_change(path, content, summary, reason?)propose_inventory_item_change(inventory_type, item_id, patch, summary, reason?, mode?)apply_pending_change(change_id)commit_changes(summary, files, details?)update_doc(path, content, summary, reason?)Useful resources:
gnexus-book://docsgnexus-book://inventorygnexus-book://relationshipsgnexus-book://freshnessgnexus-book://validationgnexus-book://git/statusGET /api-docsGET /healthGET /docsGET /docs/read?path=...GET /search?q=...GET /inventoryGET /inventory/{type}GET /inventory/{type}/{id}GET /traffic-routesGET /relationshipsGET /health/freshnessGET /validateGET /changesGET /changes/{id}POST /changesPOST /changes/{id}/applyGET /git/statusGET /git/diffPOST /commitInventory parsing requires PyYAML.
POST /changes can create pending change records under 90-maintenance/pending-changes/.POST /changes/{id}/apply can apply kind=doc and kind=inventory-item changes after validation.POST /commit creates a local Git commit only. It does not push.GET /validate checks:
schemas/*.json;docs links;Inventory includes broad records for hosts, services, domains, traffic routes, endpoints, integrations, projects, databases, backups, networks, hardware, and virtual machines.
POST /changes/{id}/apply and POST /commit both rely on validation to block unsafe repository states.