Getting Started
Get up and running with the MarkedDocs API in four steps.
- Sign up at markeddocs.com and create your account.
- Create a tenant -- this is your knowledgebase. Choose a URL slug (e.g.
my-company) that will identify it across the API. - Get your API token by navigating to Manage > API in your tenant dashboard.
- Start making requests against the base URL:
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
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:
The response will contain your token:
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
Example: Create an article
Example: Search articles
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:
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:
Claude Desktop
Add the same configuration to your claude_desktop_config.json file:
Cursor
Add the configuration to .cursor/mcp.json in your project root:
Available MCP tools
Once connected, your AI assistant has access to the following tools:
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).