This MCP (Model Content Protocol) server provides access to @Appwrite.Io/Repo API API functionality through HTTP, HTTPS, and STDIO transport modes.
- transport mode support (HTTP and STDIO)
- Dynamic configuration through HTTP headers
- Automatic tool generation from API documentation
- Ensure you have Go 1.24.6 or later installed
- Clone the repository
- Build the project:
go build -o mcp-serverThe server can run in three modes based on the TRANSPORT environment variable:
To run in HTTP mode, set the transport environment variable to "http" or "HTTP":
export TRANSPORT="http" # or "HTTP" or "HTTPS"
export PORT="8181" # requiredRun the server:
./mcp-serverTRANSPORT: Set to "HTTP" (Required)PORT: Server port (Required)
In HTTP mode, API configuration is provided via HTTP headers for each request:
API_BASE_URL: (Required) Base URL for the APIBEARER_TOKEN: Bearer token for authenticationAPI_KEY: API key for authenticationBASIC_AUTH: Basic authentication credentials
Cursor mcp.json settings:
{ "mcpServers": { "your-mcp-server-http": { "url": "http://:/mcp", "headers": { "API_BASE_URL": "https://your-api-base-url", "BEARER_TOKEN": "your-bearer-token" } } } }
The server will start on the configured port with the following endpoints:
/mcp: HTTP endpoint for MCP communication (requires API_BASE_URL header)/: Health check endpoint
Note: At least one authentication header (BEARER_TOKEN, API_KEY, or BASIC_AUTH) should be provided unless the API explicitly doesn't require authentication.
To run in HTTPS mode, set the transport environment variable to "https" or "HTTPS":
export TRANSPORT="https" # or "HTTPS"
export PORT="8443" # required
export CERT_FILE="./certs/cert.pem" # required
export KEY_FILE="./certs/key.pem" # requiredRun the server:
./mcp-serverTRANSPORT: Set to "HTTPS" (Required)PORT: Server port (Required)CERT_FILE: Path to SSL certificate file (Required)KEY_FILE: Path to SSL private key file (Required)
In HTTPS mode, API configuration is provided via HTTP headers for each request:
API_BASE_URL: (Required) Base URL for the APIBEARER_TOKEN: Bearer token for authenticationAPI_KEY: API key for authenticationBASIC_AUTH: Basic authentication credentials
Cursor mcp.json settings:
{ "mcpServers": { "your-mcp-server-https": { "url": "https://:/mcp", "headers": { "API_BASE_URL": "https://your-api-base-url", "BEARER_TOKEN": "your-bearer-token" } } } }
The server will start on the configured port with the following endpoints:
/mcp: HTTPS endpoint for MCP communication (requires API_BASE_URL header)/: Health check endpoint
Note: At least one authentication header (BEARER_TOKEN, API_KEY, or BASIC_AUTH) should be provided unless the API explicitly doesn't require authentication.
### STDIO Mode
To run in STDIO mode, either set the transport environment variable to "stdio" or leave it unset (default):
```bash
export TRANSPORT="stdio" # or leave unset for default
export API_BASE_URL="https://your-api-base-url"
export BEARER_TOKEN="your-bearer-token"
Run the server:
./mcp-serverTRANSPORT: Set to "stdio" or leave unset (default)API_BASE_URL: Base URL for the API (Required)BEARER_TOKEN: Bearer token for authenticationAPI_KEY: API key for authenticationBASIC_AUTH: Basic authentication credentials
Note: At least one authentication environment variable (BEARER_TOKEN, API_KEY, or BASIC_AUTH) should be provided unless the API explicitly doesn't require authentication.
Cursor mcp.json settings:
{ "mcpServers": { "your-mcp-server-stdio": { "command": "/", "env": { "API_BASE_URL": "", "BEARER_TOKEN": "" } } } }
The server supports both uppercase and lowercase transport environment variables:
TRANSPORT(uppercase) - checked firsttransport(lowercase) - fallback if uppercase not set
Valid values: "http", "HTTP", "https", "HTTPS", "stdio", or unset (defaults to STDIO)
Authentication is provided through HTTP headers on each request:
BEARER_TOKEN: Bearer tokenAPI_KEY: API keyBASIC_AUTH: Basic authentication
Authentication is provided through environment variables:
BEARER_TOKEN: Bearer tokenAPI_KEY: API keyBASIC_AUTH: Basic authentication
When running in HTTP mode, you can check server health at the root endpoint (/).
Expected response: {"status":"ok"}
- Uses streamable HTTP server
- Configuration provided via HTTP headers for each request
- Requires API_BASE_URL header for each request
- Endpoint:
/mcp - Port configured via PORT environment variable (defaults to 8080)
- Uses streamable HTTPS server with SSL/TLS encryption
- Configuration provided via HTTP headers for each request
- Requires API_BASE_URL header for each request
- Endpoint:
/mcp - Port configured via PORT environment variable (defaults to 8443)
- Requires SSL certificate and private key files (CERT_FILE and KEY_FILE)
- Uses standard input/output for communication
- Configuration through environment variables only
- Requires API_BASE_URL environment variable
- Suitable for command-line usage