MarkdownLM MCP Server
Provides a persistent memory and governance layer that allows AI coding agents to query documented architecture rules and validate code against team standards. It enables agents to verify compliance across categories like security and testing before suggesting changes to ensure consistency across development sessions.
README
<img src="assets/logo.png" width="48" height="48" style="vertical-align: middle; margin-right: 8px;"> MarkdownLM MCP Server
MarkdownLM is the persistent memory and governance layer between your team and your AI coding agents. Define your rules once. Enforced everywhere. Every session.
Note:
The MarkdownLM knowledge base supports the following categories for all rules, patterns, and decisions:
architecture: Layering, boundaries, system designstack: Frameworks, libraries, versionstesting: Test frameworks, coverage, patternsdeployment: CI/CD, platforms, scriptssecurity: Auth, validation, secretsstyle: Naming, formatting, organizationdependencies: Approved/banned packageserror_handling: Exceptions, logging, monitoringbusiness_logic: Domain rules, workflow constraints, business invariants, pricing logic, subscription rules, permission modelsgeneral: Anything elseWhen using this MCP server, always specify a category.
categoryis a required field onquery_knowledge_base.
How it works
- Your team documents architecture rules, stack decisions, and patterns in MarkdownLM.
- This MCP server gives AI coding agents three focused tools to query and validate against that knowledge.
- Agents validate code against your rules before suggesting changes — violations never reach PRs.
Setup
1. Get your API key
- Log in to MarkdownLM
- Go to Settings → API & MCP
- Generate an API key
2. Configure your AI tool
Pick your tool below. All use the same npm package — one codebase, every platform.
Claude Code (CLI)
claude mcp add markdownlm -e MARKDOWNLM_API_KEY=mdlm_your_key_here -e MARKDOWNLM_API_URL=https://markdownlm.com -- npx -y markdownlm-mcp
Or manually edit ~/.claude/claude_code_config.json:
{
"mcpServers": {
"markdownlm": {
"command": "npx",
"args": ["-y", "markdownlm-mcp"],
"env": {
"MARKDOWNLM_API_KEY": "mdlm_your_key_here",
"MARKDOWNLM_API_URL": "https://markdownlm.com"
}
}
}
}
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows):
{
"mcpServers": {
"markdownlm": {
"command": "npx",
"args": ["-y", "markdownlm-mcp"],
"env": {
"MARKDOWNLM_API_KEY": "mdlm_your_key_here",
"MARKDOWNLM_API_URL": "https://markdownlm.com"
}
}
}
}
Cursor
.cursor/mcp.json in your project root (project-scoped) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"markdownlm": {
"command": "npx",
"args": ["-y", "markdownlm-mcp"],
"env": {
"MARKDOWNLM_API_KEY": "mdlm_your_key_here",
"MARKDOWNLM_API_URL": "https://markdownlm.com"
}
}
}
}
Windsurf
~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"markdownlm": {
"command": "npx",
"args": ["-y", "markdownlm-mcp"],
"env": {
"MARKDOWNLM_API_KEY": "mdlm_your_key_here",
"MARKDOWNLM_API_URL": "https://markdownlm.com"
}
}
}
}
Cline (VS Code)
In the Cline extension settings (MCP Servers):
{
"mcpServers": {
"markdownlm": {
"command": "npx",
"args": ["-y", "markdownlm-mcp"],
"env": {
"MARKDOWNLM_API_KEY": "mdlm_your_key_here",
"MARKDOWNLM_API_URL": "https://markdownlm.com"
}
}
}
}
VS Code (Native/Extension)
.vscode/mcp.json in your project root:
{
"servers": {
"markdownlm": {
"type": "stdio",
"command": "npx",
"args": ["-y", "markdownlm-mcp"],
"env": {
"MARKDOWNLM_API_KEY": "mdlm_your_key_here",
"MARKDOWNLM_API_URL": "https://markdownlm.com"
}
}
}
}
Tools
query_knowledge_base
Query your team's documented rules before writing code. Returns relevant rules with sources and automatically logs gaps for undocumented decisions.
Inputs
| Field | Required | Description |
|---|---|---|
query |
✓ | Natural language question (e.g. "How should I handle auth?") |
category |
✓ | Category of the query: architecture, stack, testing, deployment, security, style, dependencies, error_handling, business_logic, general |
Response — answer, sources[], gap_detected, optional gap_resolution
validate_code
Validate a code snippet against all documented rules. Returns pass/fail with violation details and fix suggestions.
Inputs
| Field | Required | Description |
|---|---|---|
code |
✓ | Code snippet to check |
task |
✓ | What the code is supposed to do |
category |
✓ | The knowledge base category relevant to this code |
Response — status (pass/fail), violations[] (rule, message, fix_suggestion), fix_suggestion
resolve_gap
Log a knowledge gap for an undocumented decision. Returns how to handle it based on your preferences: markdownlm (AI resolves), ask_user (wait for human), agent_decide (proceed independently).
Inputs
| Field | Required | Description |
|---|---|---|
question |
✓ | The undocumented decision or question |
category |
✓ | Category hint |
Response — gap_detected, resolution_mode, optional resolution, gap_id
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
MARKDOWNLM_API_KEY |
✓ | — | API key from Settings → API & MCP |
MARKDOWNLM_API_URL |
— | https://markdownlm.com |
Override for self-hosted or staging |
Rate limiting
100 tool calls per 60 seconds per user.
Logging
All tool calls are logged to stderr as newline-delimited JSON (timestamp, tool name, inputs, outcome). This is safe for stdio MCP transport and can be piped to any log aggregator.
Contributing & Security
This repository is strictly the bridge (the client), not the brain. To protect our intellectual property, infrastructure details, and customer data, please carefully review our Contributing Guidelines and Security Policy before making any modifications.
License
Copyright (c) 2026 MarkdownLM. All Rights Reserved.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.