Advanced AI-powered development assistant with 21 specialized tools based on real MCP implementations.
Status: β All 21 tools implemented and ready for testing
Framework: Cloudflare Workers + Durable Objects
MCP Version: Latest (@modelcontextprotocol/sdk ^1.12.1)
Cogn is a production-ready Model Context Protocol (MCP) server that consolidates 21 powerful tools across 7 categories, all based on researched and real MCP server implementations. Each tool provides specialized AI-powered capabilities for development, reasoning, system management, and knowledge work.
- π§ Reasoning & Intelligence (4 tools): Multi-strategy reasoning, strategic analysis, pattern detection, decision engine
- π Smart File System (4 tools): Intelligent file ops, codebase navigation, project analysis, content transformation
- π External Integration (3 tools): GitHub orchestration, web intelligence, system command execution
- πΎ Memory & Knowledge (4 tools): Persistent memory, dynamic context, knowledge graphs, insight aggregation
- β‘ Performance & Operations (2 tools): Performance optimization, workflow automation
- π Security (1 tool): Comprehensive security analysis and compliance
- π¨ Development Experience (3 tools): AI development assistance, script generation, functional architecture
- Persistent Memory: Maintains context across sessions with semantic search
- GitHub OAuth: Secure authentication with repository access
- Zero Trust Integration: Native Cloudflare Zero Trust support
- AI-Powered Safety: Built-in safety checks for all operations
- Semantic Search: Vector-based code and content search
- Strategic Analysis: High-level insights and recommendations
Built following Cloudflare's official MCP remote server patterns (2024-2025):
- Runtime: Cloudflare Workers with Durable Objects
- Database: D1 SQLite with 15 optimized tables
- Vector Search: Cloudflare Vectorize for embeddings
- Storage: R2 for file storage, KV for sessions
- AI: Cloudflare AI models with fallback to OpenAI/Anthropic
- Auth: GitHub OAuth 2.1 with secure session management
git clone https://github.com/myselfgus/cogn_mcp_remote.git
cd cogn_mcp_remote
npm installCreate GitHub OAuth apps at https://github.com/settings/developers
- Development:
http://localhost:8787/callback - Production:
https://your-worker.workers.dev/callback
cp .dev.vars.example .dev.vars
# Edit .dev.vars with your credentials# Login to Cloudflare
wrangler login
# Create resources (interactive)
npm run setup
# Deploy
npm run deployAdd to your Claude Desktop config:
{
\"mcpServers\": {
\"cogn\": {
\"command\": \"npx\",
\"args\": [\"mcp-remote\", \"https://your-worker.workers.dev/sse\"]
}
}
}npm run dev # Start development server (wrangler dev)
npm run deploy # Deploy to production
npm run db:migrate # Apply database schema
npm run db:reset # Reset and recreate database
npm run logs # View real-time logs
node test-cogn-tools.js # Test all 21 tools with real data
node test-individual-tool.js # Test individual tools interactivelynpm run dev
# Server available at http://localhost:8787
# MCP endpoint: http://localhost:8787/sse
# Docs: http://localhost:8787/docsunified_reasoner- Multi-strategy AI reasoning (Beam Search, MCTS)strategic_intelligence- Domain-specific strategic analysispattern_intelligence- Code pattern detection and optimizationdecision_engine- Multi-criteria decision making
intelligent_file_ops- AI-enhanced file operationscodebase_navigator- Architectural codebase explorationproject_analyzer- Comprehensive project health analysiscontent_transformer- Smart content refactoring and optimization
github_orchestrator- GitHub repository analysis and managementweb_intelligence- Web content analysis and extractionsystem_commander- Safe system command execution
persistent_memory_engine- Cross-session memory with vector embeddingsdynamic_context_manager- Intelligent context managementknowledge_graph_navigator- Graph-based knowledge representationinsight_aggregator- Pattern discovery and recommendation synthesis
performance_optimizer- System and application optimizationworkflow_automator- Intelligent workflow orchestration
security_guardian- Comprehensive security analysis and compliance
dev_assistant- AI-powered development assistancegenai_scripter- AI script and template generationfunctional_architect- Functional programming design patterns
Test all 21 tools with real data:
node test-cogn-tools.jsTest specific tools interactively:
# Interactive mode
node test-individual-tool.js
# Specific tool with default parameters
node test-individual-tool.js unified_reasoner
# Custom parameters
node test-individual-tool.js dev_assistant '{"action":"generate_code","language":"typescript","requirements":"Create a user service class"}'curl http://localhost:8787/healthEach tool is based on real MCP implementations:
- Reasoning: Jacck/mcp-reasoner
- System Integration: wonderwhy-er/DesktopCommanderMCP
- Official Tools: modelcontextprotocol/servers
- Memory Services: doobidoo/mcp-memory-service
- Knowledge Graphs: shaneholloman/mcp-knowledge-graph
See COGN-FERRAMENTAS-MAPEAMENTO.md for complete mapping.
GITHUB_CLIENT_ID # GitHub OAuth client ID
GITHUB_CLIENT_SECRET # GitHub OAuth client secret
COOKIE_ENCRYPTION_KEY # 32-character hex key
CF_API_TOKEN # Cloudflare API token
CF_ACCOUNT_ID # Cloudflare account ID
CF_ZONE_ID # Cloudflare zone ID (optional)OPENAI_API_KEY # OpenAI API key
ANTHROPIC_API_KEY # Anthropic API key- KV Namespaces:
OAUTH_KV,KV_STORAGE - D1 Database:
cogn-mcp-db - R2 Bucket:
cogn-mcp-storage - Vectorize Index:
cogn-mcp-vectors - AI Binding: Enabled
/sse- MCP Server-Sent Events endpoint/health- Health check and status/metrics- Server metrics and analytics/docs- Interactive documentation/oauth/callback- GitHub OAuth callback
- OAuth 2.1 with GitHub integration
- Zero Trust native support
- AI Safety Checks for all operations
- Encrypted Sessions with secure cookie handling
- Command Safety Analysis before execution
- No Secrets in Code - all via Wrangler secrets
- Edge Computing via Cloudflare Workers
- Global Distribution with minimal latency
- Durable Objects for stateful operations
- Optimized Database with 25+ indexes
- Vector Search for semantic queries
- Smart Caching for repeated operations
Cogn is specifically designed for seamless integration with Claude.ai:
- Remote MCP Protocol - Standard MCP over HTTPS
- GitHub Authentication - Secure access to repositories
- Persistent Memory - Maintains context across conversations
- Tool Categories - Organized for easy discovery
- Error Handling - Graceful failures with helpful messages
- Performance Optimized - Fast response times for real-time use
- API Documentation: Available at
/docsendpoint - Tool Reference: See CLAUDE.md for detailed tool descriptions
- Setup Guide: See mcp-variables-reference.md
- Architecture: See src/unified-mcp-server.ts
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Cloudflare Agents
MIT License - see LICENSE file for details.
- Cloudflare for the Workers platform and AI services
- Anthropic for the Model Context Protocol
- OpenAI for GPT models and API
- GitHub for OAuth and repository integration
Built with β€οΈ using Cloudflare Workers, following official MCP patterns for seamless Claude.ai integration.