Skip to content

Commit c06e7f5

Browse files
tlgimenesclaudecubic-dev-ai[bot]
authored
docs: comprehensive documentation restructuring and improvements (#2413)
* docs: refactor MCP Mesh to decocms branding Renamed product from "MCP Mesh" to "decocms" across all documentation, removed MCP Studio references, and updated navigation. This establishes consistent branding before other documentation work. Changes: - Replaced all "MCP Mesh" references with "decocms" in en/ and pt-br/ - Removed MCP Studio documentation and navigation entries - Updated sidebar labels and navigation structure - Fixed internal links from mcp-gateways to virtual-mcps - Preserved Legacy Admin documentation as requested Closes beads-main-km6 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: refactor agents/gateways terminology to Virtual MCPs Update English documentation to use consistent "Virtual MCPs" terminology: - Replace all "Agent" and "Gateway" references with "Virtual MCP" - Update endpoints: /mcp/gateway/:gatewayId → /mcp/virtual/:virtualId - Update tool names: GATEWAY_* → VIRTUAL_* - Establish Virtual MCPs as foundational concept This aligns documentation with planned system architecture and unblocks narrative documentation work in main-54j. Closes beads-main-o55 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: document virtual MCPs with narrative structure Created comprehensive documentation for Virtual MCPs following clear narrative: - MCP compliance and benefits (protocol for action) - Challenge of traditional MCP servers (infrastructure overhead) - Solution: Virtual MCPs (on-demand, no server code) - Two approaches: Composition (mix existing) + Inline (create directly) - Hybrid capability combining both approaches - Configuration and tool exposure strategies - Code examples for all three patterns Target: 700-900 words, achieved exactly 900 words Fixed broken links, clarified terminology throughout Closes beads-main-54j Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: simplify virtual MCPs configuration section Removed exclusion mode documentation - only document inclusion mode Removed tool exposure strategies section (planned for removal in future) Simplified default virtual MCP explanation Word count: 830 (within 700-900 target) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: document MCP Mesh projects concept Create comprehensive documentation for projects as virtual MCPs at the organization level. Projects are organizational units that ARE virtual MCPs themselves and can aggregate capabilities from other virtual MCPs within their scope. Key sections: - Projects as virtual MCPs with composition capabilities - Configuration hierarchy (project-level vs org-admin) - Project scope and routing (/:org/projects/:project_id) - CLAUDE.md and AGENTS.md support at both levels - MCP client operation within project scope - Practical examples and use cases Includes planned architecture callout and comparison to Claude Code's .claude/ configuration pattern. Closes beads-main-ko2 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: document agents as single-purpose virtual MCPs Create comprehensive documentation for agents concept in MCP Mesh. Agents are single-purpose virtual MCPs designed for specific tasks, distinguished from general-purpose projects. Key content: - Agent fundamentals as virtual MCPs - Distinction between agents and projects - Creating agents (composition, inline, hybrid modes) - Agent configuration and AGENTS.md support - Built-in agents and mesh MCP concept (self-referential) - Agent types and patterns (research, development, testing, deployment) - Single-purpose design philosophy - Agent scope and usage Includes 8 TypeScript configuration examples and comprehensive documentation of 5 built-in agents (agent management, connection management, permission management, MCP store, user management). Note: Documents PLANNED decopilot architecture for development guidance. Closes beads-main-589 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: document decopilot scope concept Create comprehensive documentation explaining scope as the fundamental concept in decopilot. Covers three scope types (org, project, agent), route-to-scope mapping, scope-sensitive operations, and virtual MCPs at every level. Includes Mermaid diagram, route mapping table, and practical code examples. Closes beads-main-8f1 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: document decopilot overview with Claude Code comparison Create comprehensive decopilot overview documentation that establishes the fundamental architecture: decopilot only works with virtual MCPs (editable environments). Includes comparison table for Claude Code users, explains scope-sensitive operations (org/project/agent), task-based agent spawning, and links to foundational concepts. Key sections: opening hook, why virtual MCPs, Claude Code comparison, key capabilities, how it works, examples, and next steps. Closes beads-main-pas Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: document decopilot core architecture Create comprehensive architecture documentation covering core architectural concepts including Virtual MCPs Only constraint, scope-based architecture, task-based agent spawning, and tool scope sensitivity. Key sections: - Architectural constraint explaining why decopilot requires virtual MCPs - Virtual MCP foundation (org/projects/agents) - Scope-based architecture with route determination - Task/thread system with lifecycle and UI integration - External vs virtual MCP comparison - Dynamic virtual MCP features and extensibility - 4 Mermaid diagrams illustrating architecture - 5 TypeScript code examples Closes beads-main-4lk Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: document decopilot context management Create mcp-mesh/decopilot/context-management.mdx explaining how decopilot manages context window, CLAUDE.md/AGENTS.md support, and context isolation. Key content: - Context window composition and priority order - CLAUDE.md support (project and org-admin levels) - AGENTS.md support for agent-specific instructions - Context cost management and tool filtering strategies - Context isolation via agent spawning Closes beads-main-s5c Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: document decopilot built-in tools Create comprehensive reference documentation for decopilot's 11 built-in tools: - Org-related tools (agent_spawn, agent_search, user_ask_question) - Current virtual MCP tools (resource_*, prompt_*, tools_*) - Target virtual MCP tools (discovery and enablement workflow) Includes tool specifications, scope-sensitive behavior examples, and complete workflows for discovering and enabling external MCP tools. Closes beads-main-ifv Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: document decopilot agent spawning mechanism Create mcp-mesh/decopilot/spawning-agents.mdx explaining how decopilot spawns agents as tasks using agent_spawn tool. Key content: - Task spawning overview and benefits (parallel execution, context isolation) - Tasks vs threads terminology (UI uses "tasks", codebase uses "threads") - agent_spawn tool signature and behavior - Task states and lifecycle (Active, Needs Input, Successful, Failed) - Task variants: top-level vs child (tool availability differences) - Context isolation and inheritance patterns - Agent selection and discovery using agent_search - UI integration and task management - Spawning workflows: single, parallel, sequential patterns - Best practices for effective agent spawning Includes 7 code examples demonstrating: - agent_spawn usage with explicit task_id return - agent_search for discovering agents - Handling "Needs Input" state transitions - Single, parallel, and sequential spawning patterns Closes beads-main-iuu Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: restructure agents.mdx to match projects.mdx concise style Restructure agents documentation for consistency and scannability: - Reduce agents.mdx from 490 to 88 lines, matching projects.mdx style - Move "Agents vs. Projects" comparison to concepts.mdx as foundational context - Remove detailed composition examples, AGENTS.md config, and agent types - Keep focus on essential information: what agents are, how they work, and when to use them - Maintain all cross-references (7 page-level links remain valid) Both projects.mdx and agents.mdx now follow parallel structure with clear, scannable sections. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: make agents.mdx more user-friendly Replace technical implementation details with user-facing language: - Remove endpoint reference (/:org/agents/:agent_id) - Add "Agents provide" section with clear benefits - Mention agents are available in sidebar under "Agents" section - Remove "agent scope" jargon in favor of plain language - Remove technical "direct connection" usage pattern Focus on how users interact with agents rather than implementation details. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: align agents with SKILL.md pattern and clarify fields Key corrections: - Change "Purpose" field to "Description" and "Instructions" (actual agent fields) - Draw parallel between agents and SKILL.md files for familiarity - Clarify that decopilot uses description to learn when to spawn agents - Note that agents are organization-wide - Add cross-reference to decopilot documentation - Update "Clear purpose statement" to "Clear description" in design principles - Add "Detailed instructions" principle referencing SKILL.md pattern This makes the agent concept more intuitive by connecting it to familiar SKILL.md patterns. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: replace MCP Mesh with decocms in agents.mdx Update product name references for consistency. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: implement decopilot documentation improvements plan Complete rewrite of decopilot documentation to emphasize MCP orchestration and agentic workflows. Key changes: - Rewrite overview.mdx with agentic loop focus (gather → act → verify) - Create new quickstart.mdx with 4 practical workflow examples - Enhance scopes.mdx with workflow examples and decision guides - Enhance tools.mdx with patterns, use cases, and troubleshooting - Enhance spawning-agents.mdx with advanced patterns and agent selection - Enhance context-management.mdx with optimization strategies and budget examples - Update navigation.ts to prioritize practical content (overview → quickstart → concepts) - Update architecture.mdx to map agentic loop to implementation Documentation now positions decopilot as an MCP orchestration layer rather than a development tool, emphasizing distributed MCP coordination over HTTP (or stdio for local servers). Virtual MCPs presented as enabler for liquid MCP creation/modification, distributable across the web. All beads tasks completed: main-6pc, main-tzu, main-qpk, main-ds5, main-cxu, main-3kg, main-frw, main-dfb Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(decopilot): improve overview scopes section for clarity Refactored the Scopes section in decopilot overview to be more concise and user-friendly: - Condensed Organization/Project/Agent scope descriptions from 3 subsections with bullet points into 3 brief paragraphs - Simplified "How Scopes Layer" section to remove incorrect "Org + Project + Agent" combination that isn't supported - Replaced detailed "Loading Context" section with brief transitional paragraph pointing to dedicated context-management page - Added cross-references between Scopes and Context Management pages - Maintained technical accuracy while focusing on user capabilities rather than implementation details This change keeps the overview concise while detailed technical information is available in the dedicated context-management page. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(decopilot): add scope-specific context loading section Enhanced context-management.mdx with detailed scope-based loading information: - Replaced "What Gets Included in Context" with enhanced "How Context Loading Works" section with priority explanations - Added new "Scope-Specific Context Loading" section with detailed breakdowns of Organization, Project, and Agent scopes - Added context inheritance table showing what loads at each scope level - Updated CLAUDE.md section to clarify org vs project scope behavior - Updated AGENTS.md section to emphasize agent-scope-only loading - Added cross-references between overview Scopes section and context-management technical details - Updated Strategy 4 in optimization section with scope-specific links This provides the technical depth on context loading that was removed from the overview, creating better separation between user-facing concepts (overview) and implementation details (context-management). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(nav): reorder decopilot menu to match overview structure Updated sidebar navigation and page navigation order for decopilot section to follow the logical flow from overview's "Next Steps": New order: 1. Overview 2. Quick Start (was missing from sidebar order) 3. Context Management (moved up) 4. Tasks and Agent Spawning 5. Tools 6. Scopes (moved down) 7. Architecture Also improved sidebar comments to document the information architecture structure (Getting Started → Core Concepts → Working with MCP → Monitoring → Security → Reference). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: implement comprehensive documentation restructuring Major documentation improvements across multiple areas: **New pages:** - Added connections.mdx to document MCP connection management - Added tasks-and-spawning.mdx for decopilot task lifecycle **Removed/consolidated pages:** - Removed connect-clients.mdx (consolidated into connections.mdx) - Removed spawning-agents.mdx (consolidated into tasks-and-spawning.mdx) - Removed mcp-servers.mdx (content moved to connections.mdx) **Updated documentation:** - AGENTS.md: Updated agent documentation structure - Sidebar.tsx: Component updates for navigation - introduction.mdx: Improved introduction content (en + pt-br) - quickstart.mdx: Enhanced quick start guides (mcp-mesh + decopilot) - overview.mdx: Updated overview content - projects.mdx: Improved project documentation - virtual-mcps.mdx: Enhanced virtual MCP explanations - authorization-and-roles.mdx: Updated auth documentation - monitoring.mdx: Improved monitoring docs - deployment.mdx: Updated deployment guide - creating-agents.mdx: Enhanced agent creation guide - ui.ts: Updated i18n translations This restructuring improves information architecture by consolidating related content, removing redundancy, and creating clearer navigation paths through the documentation. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(decopilot): simplify page titles and update cross-references - Rename "Context Management" → "Context" for brevity - Rename "Tasks and Agent Spawning" → "Tasks" for clarity - Update all internal links and navigation references - Maintain content structure and information hierarchy Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(decopilot): simplify scopes page for non-technical users Significantly condensed and simplified the scopes documentation: - Reduced from 444 lines to 74 lines (83% reduction) - Removed technical implementation details (route patterns, code examples) - Replaced "organization settings" with "organization view" and "project view" - Simplified scope determination to two factors: view location + agent selection - Removed Virtual MCP technical sections - Made language more user-friendly and accessible Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(api): add decopilot built-in tools reference Added comprehensive documentation for decopilot's built-in tools: - Tool discovery & enablement (tool_search, tool_enable) - Agent management (agent_search) - Task management (subtask_run) - User interaction (user_ask) - Context access (resource_read, prompt_read) Includes descriptions, restrictions, and expected output for each tool. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(decopilot): simplify context page for non-technical users Significantly condensed and simplified the context documentation: - Reduced from 442 lines to 141 lines (68% reduction) - Introduced accessible "context window" and "working memory" metaphors - Added clear "40/80 rule" for context health monitoring - Removed technical scope inheritance tables and code examples - Simplified language around context slots and compactification - Made content more user-friendly and less implementation-focused Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(decopilot): simplify tasks page for non-technical users Significantly condensed and simplified the tasks documentation: - Reduced from 645 lines to 191 lines (70% reduction) - Replaced technical "agent spawning" language with user-friendly "tasks and subtasks" - Added clear task state explanations (In Progress, Requires Action, Success, Failed) - Introduced task timeout behavior (30 minutes) with practical guidance - Removed internal implementation details (threads vs tasks terminology) - Made content more accessible to non-technical users Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(decopilot): simplify tools page for non-technical users Dramatically condensed and simplified the tools documentation: - Reduced from 1608 lines to 103 lines (94% reduction) - Introduced clear two-tier model: built-in tools vs scope tools - Added concise reference table for built-in tools with task/subtask availability - Removed extensive code examples and technical implementation details - Simplified explanation of tool discovery and enablement workflow - Made content significantly more scannable and user-friendly Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(decopilot): remove architecture page Removed the architecture page as part of documentation simplification. Content was overly technical and redundant with other pages. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(nav): restructure documentation navigation and ordering - Update sidebar to reflect new documentation structure - Reorder MCP Mesh pages: Quickstart → Overview → Core Concepts - Add special sorting for api-reference section - Update navigation utilities and i18n keys Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(structure): consolidate authentication and deployment content - Remove redundant introduction.mdx (content merged into overview) - Remove separate authentication.mdx and authorization-and-roles.mdx pages - Add consolidated user-management.mdx covering auth, roles, and API keys - Remove old deploy/ directory (kubernetes-helm-chart, local-docker-compose) - Deployment content consolidated into self-hosting section Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(self-hosting): add comprehensive self-hosting guides - Add overview.mdx with deployment strategy guide - Add docker-compose.mdx with local setup instructions - Add kubernetes.mdx with production deployment guide - Add environment-variables.mdx reference - Organize deployment documentation in dedicated section Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(api): restructure API reference documentation - Add REST API endpoints documentation - Add MCP tools reference organized by domain - Add authentication flows guide - Split large api-reference.mdx into focused sections - Improve discoverability of API documentation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(content): update core documentation pages - Update overview.mdx with improved structure and clarity - Update quickstart.mdx with streamlined onboarding flow - Update concepts.mdx with clearer explanations - Update connections.mdx, projects.mdx, agents.mdx with consistent style - Update virtual-mcps.mdx with current architecture - Update api-keys.mdx and api-reference.mdx to align with new structure Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(branding): update decocms to deco CMS throughout documentation - Standardize branding from "decocms" to "deco CMS" (with space) - Update references in api-keys, connections, monitoring, user-management - Update decopilot overview and virtual-mcps pages - Improve consistency and brand presentation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(decopilot): update branding in quickstart and tasks pages - Update "decocms" references to "deco CMS" in decopilot documentation - Ensure consistent branding across all decopilot pages Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: finalize branding updates across remaining pages - Update agents.mdx, projects.mdx with "deco CMS" branding - Update self-hosting quickstart with consistent terminology - Complete branding consistency pass Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(api): restructure API reference navigation and add connection proxy documentation - Moved API Reference section earlier in navigation (before Self-Hosting) - Expanded API reference with detailed Connection Proxy endpoint documentation - Added comprehensive documentation for /mcp/:connectionId endpoint including: - Authentication and authorization flows - Request/response formats with examples - Streaming support and monitoring - Security considerations - Use cases and configuration options - Removed placeholder api-reference.mdx in favor of detailed subsections Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(api): update built-in tools with correct parameter signatures - Updated resource_read examples to use correct signature (uri as first parameter, options as second) - Updated prompt_read examples to use correct signature (name as first parameter, arguments as second) - Updated user_ask examples with proper parameter structure - Fixed code samples to reflect actual tool implementations Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(decopilot): update code examples with correct resource_read signatures - Fixed resource_read call signatures across all decopilot examples - Changed from object parameter to (uri, options) signature - Added lineStart and lineEnd parameters where appropriate - Ensures code examples match actual implementation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: update branding and fix minor inconsistencies - Updated deployment documentation branding from "decocms" to "deco CMS" - Fixed minor formatting and consistency issues in docker-compose and kubernetes docs - Updated references in api-keys and connections documentation - Cleaned up pt-br introduction formatting Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Update apps/docs/client/src/content/en/mcp-mesh/quickstart.mdx Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * fix(docs): resolve SSR hydration issues and improve sidebar structure - Fixed GitHub Stars component to fetch from decocms/mesh repo - Resolved SSR hydration mismatch by: - Initializing state with server-matching defaults - Loading localStorage state after hydration in useEffect - Using window instead of globalThis for browser APIs - Adding proper client-side guards - Refactored TreeItem component: - Extracted icon rendering logic into shared renderIcon function - Unified styling between collapsible and non-collapsible items - Improved semantic HTML structure (proper use of <a> vs <button>) - Reduced code duplication Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix(docs): add React keys to hydrated components in DocsLayout Added key props to LanguageSelector and ThemeToggle components during client-side hydration to prevent React warnings and ensure proper reconciliation. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: change landing page redirect to quickstart Update the documentation landing page to redirect users to /en/mcp-mesh/quickstart instead of /en/introduction. This provides a better first experience by immediately guiding users to the quickstart guide. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * wip quickstart * docs(examples): update documentation examples to focus on e-commerce use cases Replace generic DevOps/tech examples (GitHub, deployments, Slack notifications) with concrete e-commerce scenarios (Shopify orders, inventory management, fulfillment operations, payment processing) across all documentation. Changes: - MCP Mesh docs: Updated agents, projects, and virtual MCPs with order fulfillment, inventory, and multi-brand store examples - Code guides: Replaced generic tool examples (email, weather, notifications) with e-commerce tools (order confirmation, inventory check, payment processing) - Quickstart: Added more e-commerce specific example queries Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: add decopilot quickstart redesign plan Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(quickstart): redesign decopilot quickstart for non-technical users Complete rewrite of the decopilot quickstart guide: - Progressive learning approach (simple → advanced) - Focus on practical e-commerce use cases - Removed technical implementation details - Added ASCII art conversation examples - Organized by progressive feature introduction: 1. Simple requests 2. Subtasks for heavy work 3. Specialist agents 4. Context management 5. Scope switching Target audience: e-commerce teams (designers, content creators, PMs) who need practical guidance without technical complexity. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(decopilot): update examples to use e-commerce scenarios Update decopilot documentation examples: - overview.mdx: Replace GitHub/Figma/Slack with Shopify/inventory/customer service - tools.mdx: Update scope tools examples to use e-commerce integrations - virtual-mcps.mdx: Change examples from GitHub connections to Shopify/ShipStation Examples now focus on order fulfillment, inventory management, and customer service workflows instead of software development tasks. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs(api-reference): update built-in tools examples to e-commerce context Update examples in built-in tools documentation: - subtask-run.mdx: Change from GitHub/Slack to inventory/orders/shipping - tool-enable.mdx: Replace GitHub/deployment with Shopify/inventory/shipping - tool-search.mdx: Update from GitHub/deploy to order/inventory searches Maintains technical accuracy while making examples more relevant to e-commerce teams using MCP Mesh. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: remove completed quickstart redesign plan Remove the design plan file now that the quickstart redesign has been implemented. The plan served its purpose in guiding the restructuring of the documentation. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(docs): enable Astro client-side routing in docs layout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(docs): prevent keydown listener accumulation across navigations Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(docs): use client-side navigation for version switching * wip * wip * final fixes * more docs fixes * wip * fix(docs): preserve sidebar scroll position across client-side navigations Astro's transition:persist keeps the same DOM node but resets scrollTop when the element is detached/reattached during the DOM swap. Save scroll position in astro:before-swap and restore it via requestAnimationFrame in astro:page-load (after React finishes re-rendering treeState). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(docs): fix Callout import path depth in api-reference MDX files Files nested one level deeper (api-reference/) need 5 ../ levels to reach src/components, not 4. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fmt * Update apps/docs/client/src/content/latest/en/getting-started/developers.mdx Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
1 parent 7050ddb commit c06e7f5

124 files changed

Lines changed: 11680 additions & 328 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This file provides guidance when working with code in this repository, including for Claude Code (claude.ai/code) and other AI coding assistants.
44

5+
## Documentation Philosophy
6+
7+
**IMPORTANT**: The documentation in `apps/docs/` describes the **intended system design and behavior**, not necessarily the current implementation state. Documentation represents the target architecture and how the system should work, serving as both specification and aspiration. When implementation and documentation differ, the documentation defines the goal, not a bug to be "fixed" in the docs.
8+
59
## Overview
610

711
MCP Mesh is an open-source control plane for Model Context Protocol (MCP) traffic. It provides a unified layer for authentication, routing, and observability between MCP clients (Cursor, Claude, VS Code) and MCP servers. The system is built as a monorepo using Bun workspaces with TypeScript, Hono (API), and React 19 (UI).

apps/docs/astro.config.mjs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ export default defineConfig({
4141
server: {
4242
port: 4000,
4343
},
44-
redirects: {},
44+
redirects: {
45+
"/": "/latest/en/introduction",
46+
"/en/[...slug]": "/latest/en/[...slug]",
47+
"/pt-br/[...slug]": "/latest/pt-br/[...slug]",
48+
},
4549
outDir: "dist/client/",
4650
srcDir: "client/src",
4751
i18n: {
@@ -57,6 +61,11 @@ export default defineConfig({
5761
// @ts-ignore: tailwindcss plugin type issue
5862
tailwindcss(),
5963
],
64+
server: {
65+
hmr: {
66+
clientPort: 4000,
67+
},
68+
},
6069
},
6170
markdown: {
6271
shikiConfig: {

apps/docs/client/src/components/atoms/Select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { SelectHTMLAttributes } from "react";
2-
import { Icon } from "./Icon.tsx";
2+
import { Icon } from "./Icon";
33

44
interface SelectOption {
55
value: string;
Lines changed: 62 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,85 @@
11
import React from "react";
2+
import { navigate } from "astro:transitions/client";
3+
import { Icon } from "../atoms/Icon";
24
import { Select } from "../atoms/Select";
35

46
interface LanguageSelectorProps {
57
locale: string;
68
className?: string;
9+
compact?: boolean;
10+
disabled?: boolean;
711
}
812

9-
export function LanguageSelector({ locale, className }: LanguageSelectorProps) {
10-
const languageOptions = [
11-
{ value: "en", label: "English" },
12-
{ value: "pt-br", label: "Português" },
13-
];
13+
export function LanguageSelector({
14+
locale,
15+
className,
16+
compact,
17+
disabled,
18+
}: LanguageSelectorProps) {
19+
const languageOptions = compact
20+
? [
21+
{ value: "en", label: "EN" },
22+
{ value: "pt-br", label: "PT" },
23+
]
24+
: [
25+
{ value: "en", label: "English" },
26+
{ value: "pt-br", label: "Português" },
27+
];
1428

1529
const handleChange = (event: React.ChangeEvent<HTMLSelectElement>) => {
30+
if (disabled) return;
1631
const newLocale = event.target.value;
17-
// Navigate to the new locale URL
32+
// Path is /{version}/{locale}/{...slug} - replace only the locale segment
1833
const currentPath = globalThis.location.pathname;
19-
const pathWithoutLocale = currentPath.replace(/^\/[^/]+/, "");
20-
globalThis.location.href = `/${newLocale}${pathWithoutLocale}`;
34+
const newPath = currentPath.replace(/^(\/[^/]+)\/[^/]+/, `$1/${newLocale}`);
35+
navigate(newPath);
2136
};
2237

38+
if (compact) {
39+
return (
40+
<div className="relative">
41+
<select
42+
value={disabled ? "en" : locale}
43+
onChange={handleChange}
44+
disabled={disabled}
45+
className={`h-8 pl-2 pr-6 text-xs bg-transparent border border-border rounded-md appearance-none focus:outline-none focus:ring-1 focus:ring-ring ${
46+
disabled
47+
? "text-muted opacity-50 cursor-not-allowed"
48+
: "text-muted-foreground cursor-pointer"
49+
}`}
50+
>
51+
{languageOptions.map((opt) => (
52+
<option key={opt.value} value={opt.value}>
53+
{opt.label}
54+
</option>
55+
))}
56+
</select>
57+
<div className="absolute right-1.5 top-1/2 -translate-y-1/2 pointer-events-none">
58+
<Icon
59+
name="ChevronDown"
60+
size={12}
61+
className={
62+
disabled ? "text-muted opacity-50" : "text-muted-foreground"
63+
}
64+
/>
65+
</div>
66+
</div>
67+
);
68+
}
69+
2370
return (
2471
<Select
2572
options={languageOptions}
26-
value={locale}
73+
value={disabled ? "en" : locale}
2774
icon="Languages"
2875
className={className}
29-
selectClassName="text-muted-foreground"
76+
selectClassName={
77+
disabled
78+
? "text-muted opacity-50 cursor-not-allowed"
79+
: "text-muted-foreground"
80+
}
3081
onChange={handleChange}
82+
disabled={disabled}
3183
/>
3284
);
3385
}

apps/docs/client/src/components/ui/RenderDocument.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ const { doc } = Astro.props;
2424
const { Content } = await render(doc);
2525
2626
// Extract breadcrumb from the path
27-
const pathParts = doc.id.split("/").slice(1);
28-
const locale = doc.id.split("/")[0] as keyof typeof ui;
27+
// doc.id format: "version/locale/...path" (e.g. "latest/en/mcp-mesh/overview")
28+
const pathParts = doc.id.split("/").slice(2);
29+
const locale = doc.id.split("/")[1] as keyof typeof ui;
2930
const translations = ui[locale] || ui.en;
3031
3132
// Get translated breadcrumb if available

apps/docs/client/src/components/ui/Sidebar.astro

Lines changed: 140 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
---
22
import { getCollection } from "astro:content";
33
import { ui } from "../../i18n/ui";
4-
import SidebarComponent from "./Sidebar.tsx";
4+
import SidebarComponent from "./Sidebar";
55
6+
const version = Astro.params.version || "latest";
67
const locale = Astro.params.locale;
78
89
const allDocs = await getCollection("docs");
9-
const docs = allDocs.filter((doc) => doc.id.split("/")[0] === locale);
10+
// Filter docs by version and locale: docs are organized as version/locale/...
11+
const docs = allDocs.filter((doc) => {
12+
const parts = doc.id.split("/");
13+
return parts[0] === version && parts[1] === locale;
14+
});
1015
1116
interface TreeNode {
1217
name: string;
@@ -21,7 +26,8 @@ function buildTree(docs: any[]): TreeNode[] {
2126
const root: TreeNode[] = [];
2227
2328
docs.forEach((doc) => {
24-
const pathParts = doc.id.split("/").slice(1);
29+
// doc.id is now version/locale/...path, so skip first 2 parts (version and locale)
30+
const pathParts = doc.id.split("/").slice(2);
2531
let currentLevel = root;
2632
2733
pathParts.forEach((part: string, index: number) => {
@@ -58,31 +64,68 @@ function buildTree(docs: any[]): TreeNode[] {
5864
5965
// For files only - custom ordering
6066
if (a.type === "file" && b.type === "file") {
61-
// Force introduction to be first
62-
if (a.name.includes("introduction")) return -1;
63-
if (b.name.includes("introduction")) return 1;
64-
6567
// Get parent folder to determine which order to use
6668
const parentPath = a.path[a.path.length - 2];
6769
68-
// Custom order for MCP Mesh top-level pages
70+
// Custom order for decocms top-level pages
6971
if (parentPath === "mcp-mesh") {
7072
// NOTE: doc IDs do not include ".mdx" (e.g. "overview", not "overview.mdx")
71-
const mcpMeshOrder = [
73+
// Order follows: Quickstart → Overview → Core Concepts → Working with MCP → Monitoring → User Management → Reference
74+
75+
// Version-aware ordering
76+
const mcpMeshOrder =
77+
version === "latest"
78+
? [
79+
// Latest version (origin/main structure)
80+
"overview",
81+
"quickstart",
82+
"concepts",
83+
"connect-clients",
84+
"authentication",
85+
"authorization-and-roles",
86+
"mcp-servers",
87+
"mcp-gateways",
88+
"api-keys",
89+
"monitoring",
90+
"api-reference",
91+
]
92+
: [
93+
// Draft version structure
94+
"quickstart",
95+
"overview",
96+
"concepts",
97+
"connections",
98+
"virtual-mcps",
99+
"projects",
100+
"agents",
101+
"monitoring",
102+
"api-keys",
103+
"user-management",
104+
"api-reference",
105+
];
106+
107+
const aIndex = mcpMeshOrder.indexOf(a.name);
108+
const bIndex = mcpMeshOrder.indexOf(b.name);
109+
if (aIndex !== -1 && bIndex !== -1) {
110+
return aIndex - bIndex;
111+
}
112+
if (aIndex !== -1) return -1;
113+
if (bIndex !== -1) return 1;
114+
}
115+
116+
// Custom order for decopilot subfolder
117+
if (parentPath === "decopilot") {
118+
const decopilotOrder = [
72119
"overview",
73120
"quickstart",
74-
"concepts",
75-
"connect-clients",
76-
"authentication",
77-
"authorization-and-roles",
78-
"mcp-servers",
79-
"mcp-gateways",
80-
"api-keys",
81-
"monitoring",
82-
"api-reference",
121+
"context",
122+
"tasks-and-spawning",
123+
"tools",
124+
"scopes",
125+
"architecture",
83126
];
84-
const aIndex = mcpMeshOrder.indexOf(a.name);
85-
const bIndex = mcpMeshOrder.indexOf(b.name);
127+
const aIndex = decopilotOrder.indexOf(a.name);
128+
const bIndex = decopilotOrder.indexOf(b.name);
86129
if (aIndex !== -1 && bIndex !== -1) {
87130
return aIndex - bIndex;
88131
}
@@ -120,10 +163,58 @@ function buildTree(docs: any[]): TreeNode[] {
120163
if (bIndex !== -1) return 1;
121164
}
122165
123-
// Custom order for MCP Mesh deploy docs
166+
// Custom order for self-hosting section
167+
if (parentPath === "self-hosting") {
168+
const selfHostingOrder = ["quickstart", "authentication"];
169+
const aIndex = selfHostingOrder.indexOf(a.name);
170+
const bIndex = selfHostingOrder.indexOf(b.name);
171+
if (aIndex !== -1 && bIndex !== -1) {
172+
return aIndex - bIndex;
173+
}
174+
if (aIndex !== -1) return -1;
175+
if (bIndex !== -1) return 1;
176+
}
177+
178+
// Custom order for api-reference section
179+
if (parentPath === "api-reference") {
180+
const apiRefOrder = ["built-in-tools"];
181+
const aIndex = apiRefOrder.indexOf(a.name);
182+
const bIndex = apiRefOrder.indexOf(b.name);
183+
if (aIndex !== -1 && bIndex !== -1) {
184+
return aIndex - bIndex;
185+
}
186+
if (aIndex !== -1) return -1;
187+
if (bIndex !== -1) return 1;
188+
}
189+
190+
// Custom order for built-in-tools section
191+
if (parentPath === "built-in-tools") {
192+
const builtInToolsOrder = [
193+
"tool-search",
194+
"tool-enable",
195+
"agent-search",
196+
"subtask-run",
197+
"user-ask",
198+
"resource-read",
199+
"prompt-read",
200+
];
201+
const aIndex = builtInToolsOrder.indexOf(a.name);
202+
const bIndex = builtInToolsOrder.indexOf(b.name);
203+
if (aIndex !== -1 && bIndex !== -1) {
204+
return aIndex - bIndex;
205+
}
206+
if (aIndex !== -1) return -1;
207+
if (bIndex !== -1) return 1;
208+
}
209+
210+
// Custom order for deploy docs (now under self-hosting)
124211
const rootPath = a.path[0];
125212
if (rootPath === "mcp-mesh" && parentPath === "deploy") {
126-
const deployOrder = ["local-docker-compose", "kubernetes-helm-chart"];
213+
// Version-aware deploy file names
214+
const deployOrder =
215+
version === "latest"
216+
? ["local-docker-compose", "kubernetes-helm-chart"]
217+
: ["docker-compose", "kubernetes"];
127218
const aIndex = deployOrder.indexOf(a.name);
128219
const bIndex = deployOrder.indexOf(b.name);
129220
if (aIndex !== -1 && bIndex !== -1) {
@@ -137,12 +228,14 @@ function buildTree(docs: any[]): TreeNode[] {
137228
// For folders - custom ordering
138229
if (a.type === "folder" && b.type === "folder") {
139230
const folderOrder: Record<string, number> = {
140-
// Put Mesh docs first
141-
"mcp-mesh": 0,
142-
"getting-started": 1,
143-
"no-code-guides": 2,
144-
"full-code-guides": 3,
145-
"mcp-studio": 4,
231+
// Order follows improved information architecture
232+
"mcp-mesh": 0, // decocms docs (main product)
233+
"getting-started": 1, // Getting Started (after intro)
234+
decopilot: 2, // Decopilot (elevated section within mcp-mesh)
235+
"self-hosting": 3, // Self-hosting section
236+
deploy: 4, // Deploy section (under self-hosting)
237+
"no-code-guides": 5, // Legacy admin guides
238+
"full-code-guides": 6, // Legacy admin guides
146239
};
147240
148241
const aOrder = folderOrder[a.name] ?? Number.POSITIVE_INFINITY;
@@ -198,16 +291,26 @@ function groupLegacyAdminSections(nodes: TreeNode[]): TreeNode[] {
198291
}
199292
: null;
200293
201-
// Make "Introduction" the primary entry point, then product docs.
202-
const introduction = files.find((f) => f.name === "introduction");
203-
const otherFiles = files.filter((f) => f.name !== "introduction");
204-
294+
// Flatten mcp-mesh folder - bring its children to the top level
295+
// mcp-mesh children will be shown at the top level
205296
const next: TreeNode[] = [];
206-
if (introduction) next.push(introduction);
207-
if (mcpMesh) next.push(mcpMesh);
208-
if (mcpStudio) next.push(mcpStudio);
209-
next.push(...otherFiles);
297+
298+
// Add any top-level files first (e.g. introduction.mdx)
299+
next.push(...files);
300+
301+
// Add all mcp-mesh children directly at top level (order controlled by mcpMeshOrder array)
302+
if (mcpMesh && mcpMesh.children.length > 0) {
303+
next.push(...mcpMesh.children);
304+
}
305+
306+
// Add mcp-studio as its own top-level section
307+
if (mcpStudio) {
308+
next.push(mcpStudio);
309+
}
310+
311+
// Add legacy admin section at the end
210312
if (legacyFolder) next.push(legacyFolder);
313+
211314
return next;
212315
}
213316
@@ -253,4 +356,5 @@ const flatTree = flattenTree(tree);
253356
tree={flatTree}
254357
locale={locale || "en"}
255358
translations={ui[locale as keyof typeof ui] || ui.en}
359+
currentVersion={version}
256360
/>

0 commit comments

Comments
 (0)