MCP Integration
Model Context Protocol integration for agentic coding environments
Overview
What is MCP Integration?
The MCP (Model Context Protocol) integration enables coding agents to access Cognitor directly. Through a lightweight Node.js bridge, agents can retrieve content, traverse pages, and run contextual search in realtime.
Architecture:
Agent Host (Cursor/Claude/other MCP clients) → Node.js Bridge → Cognitor APIAvailable Features
Content Operations
- • Retrieve content elements and page trees
- • Resolve structured context for agent tasks
- • Multi-site and tenant-aware operations
Search & Planning
- • Full-text search
- • Search suggestions
- • Site discovery for autonomous workflows
Setup & Installation
1. Download Bridge Script
Download:
cognitor_mcp_bridge.js📥 Download2. Configure Your MCP Host
macOS Example (Claude Desktop):
File: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"cognitor-cms": {
"command": "node",
"args": ["/path/to/cognitor_mcp_bridge.js"]
}
}
}Windows Example (Claude Desktop):
File: %APPDATA%\\Claude\\claude_desktop_config.json
{
"mcpServers": {
"cognitor-cms": {
"command": "node",
"args": ["C:\\path\\to\\cognitor_mcp_bridge.js"]
}
}
}3. Restart MCP Host
After configuration, restart your MCP-compatible client so the bridge and tools are discovered correctly.
Cmd+Q → Reopen your clientTask Manager → End client process → RestartAvailable Tools
discover_sites
Discovers available sites in the CMS
Parameters:
No parameters requiredExample Question:
"What sites are available?"content_list_elements
Lists content elements from a site
Parameters:
site_identifier (optional), limit, skip, type_filterExample Question:
"Show me the latest articles"content_get_element
Retrieves a single content element
Parameters:
element_id (required), site_identifier (optional)Example Question:
"Get content element 123"pages_list
Lists all pages from a site
Parameters:
site_identifier (optional), limit, skipExample Question:
"Show me all pages"pages_get
Retrieves a page with all content
Parameters:
page_id (required), site_identifier (optional)Example Question:
"Load page 456 with all content"search_content
Searches all content in a site
Parameters:
query (required), site_identifier, page, sizeExample Question:
"Search for 'AI' in the content"search_suggestions
Generates search suggestions
Parameters:
query (required), site_identifier, limitExample Question:
"Give me search suggestions for 'tech'"Practical Examples
How to Use MCP for Agentic Coding
Prompt examples for coding-agent workflows
🔍 Site Discovery
You: "What sites are available for this workspace?"
Agent: Uses discover_sites and scopes downstream tasks to the right site.
📄 Content Retrieval
You: "Show me the last 5 articles from the demo site"
Agent: Uses content_list_elements with automatic site detection.
🔎 Search
You: "Search all content for 'agentic coding'"
Agent: Uses search_content and returns ranked context with highlights.
📋 Page Management
You: "Load page 123 with all content elements"
Agent: Uses pages_get and returns a complete structured page graph.
Troubleshooting
Common Issues and Solutions
❌ "Server disconnected"
• Restart Claude Desktop
• Check Node.js installation: node --version
• Verify bridge script path in configuration
❌ "No tools available"
• Check configuration file syntax (valid JSON)
• Verify bridge script permissions
• Consult Claude Desktop logs
⚠️ "HTTP Error 404"
• Check backend availability
• Verify site identifier
• Use automatic site discovery