API & MCP Documentation

Everything you need to integrate MarkedDocs with your tools, AI assistants, and workflows.

Getting Started

Get up and running with the MarkedDocs API in four steps.

  1. Sign up at markeddocs.com and create your account.
  2. Create a tenant -- this is your knowledgebase. Choose a URL slug (e.g. my-company) that will identify it across the API.
  3. Get your API token by navigating to Manage > API in your tenant dashboard.
  4. Start making requests against the base URL:
Base URL
https://markeddocs.com/api/v1

All API endpoints are scoped to your tenant via the URL path. For example, if your tenant slug is my-company, your articles endpoint is /api/v1/my-company/articles/.

Authentication

All API requests require a valid authentication token. Include it in the Authorization header of every request.

Token header format

HTTP Header
Authorization: Token YOUR_TOKEN

Getting a token

The easiest way to get your token is from the Manage > API page in your tenant dashboard. You can also obtain one programmatically by sending a POST request with HTTP Basic authentication:

bash
curl -X POST https://markeddocs.com/api/v1/auth/token/ \ -u your-username:your-password

The response will contain your token:

JSON Response
{ "token": "9a8b7c6d5e4f3g2h1i0j..." }

Keep your token secret. Treat it like a password. Do not commit it to version control or share it in public channels.

REST API Endpoints

All endpoints are prefixed with /api/v1/{tenant}/ where {tenant} is your knowledgebase slug. Requests and responses use JSON.

Method Endpoint Description
GET /api/v1/{tenant}/articles/ List all articles
GET /api/v1/{tenant}/articles/{slug}/ Get a single article by slug
POST /api/v1/{tenant}/articles/ Create a new article
PATCH /api/v1/{tenant}/articles/{slug}/ Update an existing article
GET /api/v1/{tenant}/categories/ List all categories
POST /api/v1/{tenant}/categories/ Create a new category
GET /api/v1/{tenant}/search/?q= Search articles by keyword
GET /api/v1/{tenant}/media/ List uploaded media assets

Example: List articles

bash
curl -H "Authorization: Token YOUR_TOKEN" \ https://markeddocs.com/api/v1/your-tenant/articles/

Example: Create an article

bash
curl -X POST \ -H "Authorization: Token YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "title": "Getting Started Guide", "slug": "getting-started-guide", "content": "# Welcome\n\nThis is your first article.", "status": "published" }' \ https://markeddocs.com/api/v1/your-tenant/articles/

Example: Search articles

bash
curl -H "Authorization: Token YOUR_TOKEN" \ "https://markeddocs.com/api/v1/your-tenant/search/?q=deployment"

MCP Server Setup

The Model Context Protocol (MCP) is an open standard for connecting AI models to external data sources and tools. MarkedDocs provides an MCP server that gives AI assistants -- such as Claude, Cursor, and other MCP-compatible agents -- direct access to read, search, create, and update your knowledgebase content.

Installation

Install and run the MCP server with a single command:

bash
uvx markeddocs-mcp

The server reads your credentials from environment variables (KB_API_TOKEN and KB_TENANT_SLUG). See the Configuration Reference below for all available options.

Claude Code

Add the following to your project's .mcp.json file:

.mcp.json
{ "mcpServers": { "markeddocs": { "command": "uvx", "args": ["markeddocs-mcp"], "env": { "KB_API_TOKEN": "your-token", "KB_TENANT_SLUG": "your-tenant" } } } }

Claude Desktop

Add the same configuration to your claude_desktop_config.json file:

claude_desktop_config.json
{ "mcpServers": { "markeddocs": { "command": "uvx", "args": ["markeddocs-mcp"], "env": { "KB_API_TOKEN": "your-token", "KB_TENANT_SLUG": "your-tenant" } } } }

Cursor

Add the configuration to .cursor/mcp.json in your project root:

.cursor/mcp.json
{ "mcpServers": { "markeddocs": { "command": "uvx", "args": ["markeddocs-mcp"], "env": { "KB_API_TOKEN": "your-token", "KB_TENANT_SLUG": "your-tenant" } } } }

Available MCP tools

Once connected, your AI assistant has access to the following tools:

search_articles list_articles get_article create_article update_article bulk_create_articles list_categories create_category

These tools allow an AI assistant to search your knowledgebase, retrieve full article content in Markdown, create new articles, update existing ones in bulk, and manage categories -- all without writing any glue code.

Configuration Reference

The MCP server and API integrations are configured via environment variables.

Variable Required Default Description
KB_API_TOKEN Required -- Your API authentication token. Obtain it from Manage > API in your tenant dashboard.
KB_TENANT_SLUG Required -- The URL slug of your knowledgebase (e.g. my-company).
KB_API_URL Optional https://markeddocs.com/api/v1 The base URL for the MarkedDocs API. Override this if you are running a self-hosted instance.

Self-hosted deployments: If you are running MarkedDocs on your own infrastructure, set KB_API_URL to your instance's API base URL (e.g. https://docs.internal.company.com/api/v1).