A modern, lightweight API documentation management system with AI assistant integration.
Features • Quick Start • Documentation • Development • Contributing
中文文档 | English
Knot is a comprehensive API documentation platform that helps teams organize, document, and share their API specifications. Built with Go and Svelte 5, it offers a fast, intuitive interface with native AI assistant support through Model Context Protocol (MCP).
Download the latest release for your platform:
# macOS (Apple Silicon)
curl -LO https://github.com/ProjAnvil/knot/releases/latest/download/knot-macos-arm64
chmod +x knot-macos-arm64
sudo mv knot-macos-arm64 /usr/local/bin/knot
# macOS (Intel)
curl -LO https://github.com/ProjAnvil/knot/releases/latest/download/knot-macos-amd64
chmod +x knot-macos-amd64
sudo mv knot-macos-amd64 /usr/local/bin/knot
# Linux (AMD64)
curl -LO https://github.com/ProjAnvil/knot/releases/latest/download/knot-linux
chmod +x knot-linux
sudo mv knot-linux /usr/local/bin/knot
# Windows (AMD64)
# Download knot-windows.exe from releases page
# Initialize configuration
knot setup
# Start the server (runs in background)
knot start
# Check server status
knot status
# Stop the server
knot stop
# View configuration
knot config
# Get help
knot help
The web interface will be available at http://localhost:3000
Knot stores its configuration at:
~/.knot/config.json%LOCALAPPDATA%\knot\config.jsonExample configuration:
{
"databaseType": "sqlite",
"sqlitePath": "/Users/username/.knot/knot.db",
"port": 3000,
"host": "localhost",
"enableLogging": false
}
| Database | Use Case | Configuration |
|---|---|---|
| SQLite (default) | Personal use, development | sqlitePath: "/path/to/knot.db" |
| PostgreSQL | Production, teams | postgresUrl: "postgresql://..." |
| MySQL | Enterprise | mysqlUrl: "user:pass@tcp(...)/" |
Knot consists of three independent components:
knot/
├── frontend/ # Svelte 5 web application
│ ├── src/
│ │ ├── lib/ # Reusable components
│ │ └── messages/ # i18n translations
│ └── package.json
├── backend/ # Go API server
│ ├── cmd/ # Entry points (CLI & server)
│ ├── internal/ # Core logic
│ └── Makefile
├── mcp-server/ # MCP server for AI integration
│ ├── main.go
│ └── Makefile
└── doc/ # Documentation
cd frontend
# Install dependencies
bun install
# Start dev server with hot reload (port 5173)
bun dev
# Build for production
bun run build
The frontend runs independently and proxies API requests to the backend during development.
cd backend
# Install Go dependencies
go mod download
# Run in development mode
make run
# Build CLI binary
make build
# Build for all platforms
make build-all
# Package with embedded frontend
make package
Available commands:
make run - Run server in development modemake build - Build CLI binary for current platformmake build-all - Build for all platforms (Linux, macOS, Windows)make package - Build complete package with embedded frontendmake clean - Clean build artifactscd mcp-server
# Install dependencies
go mod download
# Build MCP server
make build
# Build for all platforms
make build-all
# Backend tests
cd backend
go test ./...
# Frontend tests (if available)
cd frontend
bun test
Knot includes a Model Context Protocol server that enables AI assistants like Claude to query your API documentation naturally.
Build the MCP server:
cd mcp-server
make build
Configure Claude Desktop to use Knot MCP server. See MCP Usage Guide for detailed instructions.
Start querying your APIs:
"Show me all APIs in the user-service group"
"Find APIs related to authentication"
"Generate an example request for the login API"
Frontend:
Backend:
MCP Server:
groups
├── id (primary key)
├── name
└── apis (has many)
apis
├── id (primary key)
├── group_id (foreign key)
├── name
├── endpoint
├── method (GET/POST/etc)
├── type (HTTP/RPC)
├── note (markdown)
└── parameters (has many)
parameters
├── id (primary key)
├── api_id (foreign key)
├── parent_id (self-referencing for nested)
├── name
├── type (string/number/boolean/array/object)
├── param_type (request/response)
├── required
└── description
# Clone the repository
git clone https://github.com/ProjAnvil/knot.git
cd knot
# Build frontend
cd frontend
bun install
bun run build
cd ..
# Build backend with embedded frontend
cd backend
make package
# Build MCP server
cd ../mcp-server
make build
Binaries will be in:
backend/bin/knotbackend/bin/knot-servermcp-server/bin/knot-mcp# Build for all platforms
cd backend
make package-all
cd ../mcp-server
make build-all
This creates binaries for:
We welcome contributions! Here's how you can help:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)MIT License - see LICENSE for details.
Howe Chen
Made with ❤️ by the Knot team