OKF vs MCP:
What's the Difference?
Two of the most important standards for AI agents — OKF for structured knowledge, MCP for real-time tool interaction. Here's when to use each, and why the best AI-native systems use both.
Quick Overview
If you're building for the AI agent ecosystem, you've likely encountered two major standards: OKF (Open Knowledge Format) and MCP (Model Context Protocol). Both are essential for making AI agents useful, but they solve completely different problems.
The short version: OKF packages static knowledge so agents can load it into context and understand your domain. MCP provides live tool interaction so agents can query databases, call APIs, and perform actions in real time. They're complementary — not competing.
Think of it this way: OKF is the textbook an agent reads before starting work. MCP is the research assistant it consults for live data during the work. A well-designed AI-native system needs both.
Below, we break down each standard in detail, compare them side by side, and show you how to combine them for maximum agent capability.
What Is OKF (Open Knowledge Format)?
OKF (Open Knowledge Format) is a directory-based standard for packaging structured domain knowledge as markdown files. Launched by Google Cloud Platform in mid-2026, it's designed for AI agents to consume directly — loading full knowledge bundles into context without needing to browse websites or fetch additional pages.
How It Works
An OKF bundle is a directory of markdown files with a specific structure:
my-knowledge-bundle/
├── index.md # Bundle manifest with YAML frontmatter
├── log.md # Changelog
├── concepts/
│ ├── setup.md # Concept document with structured metadata
│ └── architecture.md
└── guides/
├── getting-started.md
└── configuration.md Key Characteristics
- Directory structure — knowledge is organized in a hierarchy of markdown files, mirroring the logical structure of the domain
- YAML frontmatter — every file has structured metadata (title, description, tags, version, author, dependencies)
- Self-contained — the agent gets all the knowledge it needs in one bundle, no additional fetching required
- Cross-linked — concepts link to each other via relative paths, forming a knowledge graph
- Version-controlled — bundles live in git repositories, with full history, CI validation, and collaboration via PRs
- Portable — OKF bundles work across any agent platform, IDE, or tool that supports the format
- Offline-capable — since it's plain files, agents can load OKF bundles even without network access
What It's Best For
OKF excels at deep, structured knowledge that an agent needs to understand before working with a domain. Common use cases include:
- SDK and API documentation that agents need to reference during development
- Architecture guides and design documents for complex systems
- Configuration recipes and deployment patterns
- Domain primers — financial regulations, medical guidelines, compliance standards
- Project onboarding knowledge that new team members (human or agent) need to consume
OKF is the format used by BundleDex, the definitive directory of OKF knowledge bundles. You can browse hundreds of curated bundles or create your own.
What Is MCP (Model Context Protocol)?
MCP (Model Context Protocol) is an open protocol that standardizes how AI agents interact with external tools and services in real-time. Developed by Anthropic, MCP defines a client-server architecture where agents can discover, invoke, and orchestrate tools dynamically during a session.
How It Works
MCP follows a client-server model with a handshake and tool-discovery flow:
// MCP follows a client-server model:
//
// 1. Agent (MCP client) connects to an MCP server via stdio or SSE
// 2. Handshake: server advertises available tools and their schemas
// 3. Agent dynamically selects and calls tools during the session
// 4. Server executes the tool and returns results in real-time
//
// Example: MCP tool definition (JSON Schema)
{
"name": "search_documentation",
"description": "Search the documentation for a query string",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The search query"
},
"max_results": {
"type": "integer",
"description": "Maximum results to return",
"default": 10
}
},
"required": ["query"]
}
} Key Characteristics
- Real-time protocol — live interactions with tools and data, not pre-packaged knowledge
- Client-server architecture — requires a running MCP server that the agent connects to
- Dynamic tool discovery — the server tells the agent what tools are available, and the agent decides which to use
- Standardized transport — works over stdio (local processes) or SSE (remote servers)
- Ephemeral connections — sessions are temporary; no built-in persistence or state management
- Server infrastructure required — someone must run, maintain, and secure the MCP server
- Input/output schemas — tools are defined using JSON Schema, making them self-documenting
What It's Best For
MCP is ideal for live operations — anything that requires up-to-date data, dynamic computation, or side effects:
- Querying databases (SQL queries, vector search, graph lookups)
- Searching documentation or knowledge bases in real-time
- Calling external APIs (weather, stock prices, shipping status)
- Performing actions (creating tickets, sending emails, deploying code)
- Accessing current system state (server status, CI/CD pipeline status, monitoring alerts)
- File system operations (reading, writing, searching files on the user's machine)
MCP is not designed for static knowledge — that's what OKF is for. Loading a static documentation bundle through MCP would be inefficient compared to simply providing an OKF bundle directly.
Side-by-Side Comparison
Here's a direct comparison of OKF and MCP across every important dimension:
| Aspect | OKF (Open Knowledge Format) | MCP (Model Context Protocol) |
|---|---|---|
| Purpose | Package structured, static knowledge for agent consumption | Enable real-time tool interaction and live data access |
| Format | Directory of markdown files with YAML frontmatter | JSON-RPC messages over stdio or SSE transport |
| Data model | Hierarchical files: concepts, guides, references | Tools with JSON Schema input/output definitions |
| Metadata | Rich YAML frontmatter (title, description, tags, version, author, dependencies) | JSON Schema per tool (name, description, inputSchema, outputSchema) |
| Persistence | Static files on disk, version-controlled via git | Ephemeral — per-session connections, no built-in persistence |
| Consumption | Agent loads files directly into context (read from disk or URL) | Agent calls tools via the MCP protocol during a session |
| Offline capability | Fully offline — plain files, no network needed | Requires running server — typically needs network or local process |
| Setup complexity | Low — create a directory of markdown files, optionally validate with CLI tools | Medium — build and deploy an MCP server, manage authentication and infrastructure |
| Maintenance | Low — update markdown files, commit to git | Ongoing — server uptime, security patching, API versioning |
| Real-time data | Not designed for it — knowledge is static between updates | Core strength — tools return live data on every call |
| Action execution | Not applicable — knowledge format only | Core capability — tools can create, update, delete data |
| Portability | High — any agent, IDE, or platform can read markdown | Moderate — requires MCP client support, though adoption is growing rapidly |
| Discoverability | Via BundleDex directory, or directly from source repos | Via MCP server registry, or manual configuration |
| Vendor lock-in | None — fully open format, multiple implementations | Protocol-level (originated by Anthropic) but open specification |
| Best for | Domain knowledge, documentation, SDK guides, onboarding | Live queries, API calls, database access, system actions |
Key Differences at a Glance
1. Static Knowledge vs. Real-Time Interaction
This is the single most important difference. OKF is about knowledge — MCP is about action. OKF bundles contain everything an agent needs to understand a domain: concepts, guides, references, and examples. The agent loads this knowledge into its context window before starting work. MCP, on the other hand, is about doing things in real time: querying live data, calling APIs, performing calculations, and executing actions. OKF is what you read; MCP is what you do.
2. Persistence Model
OKF bundles are persistent and versioned. They live in git repositories, change through pull requests, and maintain a complete history. You can diff versions, roll back changes, and audit who changed what. MCP sessions are ephemeral. When the session ends, the connection is gone. There's no built-in history or state — any persistence must be handled by the application layer on top of MCP.
3. Consumption Model
OKF uses a push model: the agent (or the developer using the agent) loads the bundle into context. The agent reads the files and incorporates the knowledge. MCP uses a pull model: the agent connects to a server and discovers available tools, then decides which to call. The agent actively fetches data as needed, rather than pre-loading it.
4. Infrastructure Requirements
OKF requires almost no infrastructure — just a directory of markdown files, optionally hosted on a static file server or git repository. MCP requires running infrastructure: an MCP server process that must be deployed, secured, monitored, and kept available. This makes OKF much easier to get started with, while MCP requires more investment but delivers more dynamic capabilities.
5. Scope of Application
OKF is domain-scoped: a bundle covers a specific domain (e.g., "PostgreSQL Administration" or "React Component Library"). MCP is task-scoped: a server provides specific tools (e.g., "search_database", "send_email", "deploy_service"). You can have many OKF bundles for different domains and many MCP servers for different task categories.
6. Offline vs. Online
OKF works fully offline — it's just files on disk. This makes it ideal for air-gapped environments, secure development contexts, and scenarios where network access is unreliable. MCP is inherently online — it requires a running server reachable via stdio or network. If the server is down, the tools are unavailable.
When to Use Each
Use OKF When...
- You have domain knowledge that an agent needs to understand deeply before working
- Your knowledge changes infrequently and can be version-controlled
- You want portable, offline-capable knowledge that works across any agent platform
- You're documenting an SDK, API, library, or framework that agents will use
- You want your knowledge discoverable on BundleDex, the OKF directory
- You're building a knowledge base that should be auditable, with change history
- You need to provide knowledge to agents in air-gapped or offline environments
- You want to publish reusable knowledge that others can fork, extend, and improve
Use MCP When...
- You have live data or services that agents should query in real-time
- You want agents to perform actions — create tickets, send messages, deploy code
- Your data changes frequently and can't be pre-packaged as static files
- You're building database-backed tools, search APIs, or system monitors
- You need agents to access current system state (status, metrics, logs)
- You're integrating with external APIs that require authentication and rate limiting
- You want to provide computation tools (calculations, data transformations, code execution)
- You're building a workflow where agents need to chain multiple tools together
When to Use Both
For most real-world projects, the answer is use both. OKF provides the foundational knowledge about your domain, and MCP provides the live tools to interact with your systems. Here are scenarios where the combination is particularly powerful:
- Developer tooling: An OKF bundle explains your SDK architecture and API reference. An MCP server provides live code search, documentation lookup, and test execution.
- DevOps platforms: An OKF bundle covers your infrastructure architecture and runbooks. An MCP server provides live status checks, log queries, and deployment triggers.
- Customer support: An OKF bundle contains product knowledge and troubleshooting guides. An MCP server provides account lookup, ticket creation, and order status queries.
- Data platforms: An OKF bundle documents your data schema and query patterns. An MCP server provides live SQL query execution and result streaming.
How OKF and MCP Work Together
OKF and MCP are not competing standards — they're complementary layers in a complete AI agent architecture. The most effective setups use both in a two-layer approach:
Layer 1: OKF Bundles (Knowledge Layer)
├── Provides deep, structured domain knowledge
├── Agent loads into context before starting work
├── Version-controlled, portable, offline-capable
└── Discoverable via BundleDex API
Layer 2: MCP Servers (Interaction Layer)
├── Gives agents real-time tool access
├── Queries databases, search, APIs, and live systems
├── Executes actions and returns results
└── Complements static OKF knowledge with live data The Two-Phase Workflow
Here's how a typical agent session works with both OKF and MCP:
Phase 1: Knowledge Loading (OKF)
├── Agent loads OKF bundle for the target domain
├── Reads concepts, guides, and reference material
├── Builds understanding of the domain in context
└── Ready to work with full domain awareness
Phase 2: Active Work (OKF + MCP)
├── Agent uses OKF knowledge for reference and guidance
├── Agent calls MCP tools for live data and actions
├── OKF knowledge grounds the agent's understanding
└── MCP tools execute the agent's decisions Concrete Example: Building a Developer Agent
Let's say you're building an AI agent that helps developers work with your platform. Here's how OKF and MCP combine:
OKF Bundles:
├── platform-concepts/ # Architecture, design decisions, terminology
├── api-reference/ # Complete API documentation with examples
├── getting-started/ # Quickstart guides and tutorials
└── migration-guides/ # Upgrade paths and breaking changes
MCP Servers:
├── search-server/ # Full-text search across documentation
├── code-server/ # Code analysis, linting, compilation
├── db-server/ # Live database queries and schema inspection
└── deploy-server/ # Deployment status, logs, rollback actions
Workflow:
1. Agent loads OKF bundles → understands the platform deeply
2. Developer asks "How do I migrate from v2 to v3?"
3. Agent references OKF migration guide → knows the steps
4. Agent calls MCP search-server → finds the developer's current config
5. Agent calls MCP code-server → scans the developer's codebase for v2 APIs
6. Agent guides the migration step by step, using OKF knowledge + MCP tools Practical Examples
Example 1: Documentation Site
Scenario: You run a documentation site for a JavaScript framework.
- OKF: Package your entire documentation as OKF bundles — concepts, API reference, guides, tutorials. Submit to BundleDex for discoverability.
- MCP: Build an MCP server with a
search_docstool for real-time semantic search, aget_exampletool that returns code examples, and acheck_versiontool that reports the latest release. - Result: An agent can load your OKF bundle for deep understanding, then use MCP tools for live lookups during development.
Example 2: E-Commerce Platform
Scenario: You run an e-commerce platform with a public API.
- OKF: Create OKF bundles for your API reference, integration guides, webhook documentation, and rate-limiting policies.
- MCP: Build an MCP server with
get_order_status,search_products,create_fulfillment, andcheck_inventorytools. - Result: An agent can understand your API from OKF, then use MCP to manage orders, check inventory, and process fulfillment in real-time.
Example 3: Internal Developer Platform
Scenario: You operate an internal platform with microservices, databases, and CI/CD pipelines.
- OKF: Package architecture documentation, runbooks, database schemas, and deployment guides as OKF bundles.
- MCP: Build MCP servers for
query_logs,restart_service,check_deploy_status,run_migration, andget_metrics. - Result: An on-call engineer's agent can load the runbook OKF bundle, then use MCP tools to diagnose and resolve incidents in real-time.
FAQ
What is OKF (Open Knowledge Format) used for?
OKF is a directory-based standard for packaging static, structured domain knowledge as markdown files. It's designed for AI agents to load directly into context — providing deep understanding of a domain without needing to browse or fetch additional pages. It's ideal for documentation, SDK guides, API references, and any knowledge that changes infrequently. OKF bundles are version-controlled, portable, and work offline.
What is MCP (Model Context Protocol) used for?
MCP is a protocol for real-time interaction between AI agents and live tools or services. Developed by Anthropic, it defines how agents can discover and call server-provided tools during a session. MCP is used for querying databases, searching documentation, calling APIs, performing actions, and accessing live system state — anything that requires dynamic, real-time data access. It operates on a client-server model with standardized JSON-RPC transport.
Can OKF and MCP replace each other?
No. They serve fundamentally different purposes and cannot replace each other. OKF provides static knowledge that an agent loads into context before starting work — it's like reading a textbook. MCP provides live tool access during a session — it's like having a research assistant who can look things up and perform actions in real time. You can't use OKF to query a live database, and you can't use MCP to provide offline, portable knowledge. They solve different problems and work best together.
Do I need both OKF and MCP for my project?
For most projects, yes. OKF gives agents deep, portable knowledge about your domain that works offline and across platforms. MCP gives agents live access to dynamic data and actions. Together they form a complete agent experience: load knowledge from OKF to understand the domain, then use MCP for real-time queries and operations. The combination is more powerful than either alone. If you're just starting, begin with OKF (it's simpler to set up) and add MCP servers as your agent needs grow.
Which is better for documentation — OKF or MCP?
For documentation, OKF is the clear choice. Documentation is static knowledge that changes infrequently, and OKF is purpose-built for packaging exactly that kind of content. OKF bundles are version-controlled, portable, and work offline — all important for documentation. MCP is better for live queries against documentation (e.g., a semantic search tool), but the documentation content itself should be in OKF format. The ideal setup: OKF bundles for the documentation content, and an MCP server with a search tool for querying it.
Does BundleDex support MCP as well as OKF?
BundleDex is primarily the directory of OKF knowledge bundles. We also provide an MCP endpoint at /mcp for agent-native discovery of our bundle directory, and our /llms.txt and /llms-full.txt files follow the llms.txt standard. This means you can discover OKF bundles via our MCP server, load them into your agent, and use your own MCP servers for live operations — all in a seamless workflow. Browse our directory →