Skip to main content

AI Tools Integration

Integrate Cognitive Modules with various AI development tools.

Supported Tools

ToolIntegration MethodStatus
Claude DesktopMCP Server
CursorMCP Server
VS CodeExtension (planned)🚧
JetBrainsPlugin (planned)🚧

Claude Desktop

Setup

  1. Start MCP server:
cog mcp
  1. Configure Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"cognitive": {
"command": "cog",
"args": ["mcp"]
}
}
}
  1. Restart Claude Desktop

Usage

In Claude Desktop:

Use the code-reviewer module to review this code:
[paste code]

Cursor

Setup

  1. Start MCP server:
cog mcp --port 3000
  1. Add to Cursor settings

Usage

In Cursor chat:

@cognitive run code-reviewer on the selected code

Generic Integration

HTTP API

Start HTTP server:

cog serve --port 8000 --cors

Call from any tool:

curl -X POST http://localhost:8000/api/run/code-reviewer \
-H "Content-Type: application/json" \
-d '{"code": "def foo(): pass"}'

WebSocket

const ws = new WebSocket('ws://localhost:8000/ws');

ws.send(JSON.stringify({
type: 'run',
module: 'code-reviewer',
input: { code: '...' }
}));

ws.onmessage = (event) => {
const result = JSON.parse(event.data);
console.log(result);
};

Benefits

  • Structured Output - Get predictable JSON responses
  • Validation - Input/output automatically validated
  • Confidence - Know how reliable the result is
  • Audit Trail - Every call has rationale