Get the FREE Ultimate OpenClaw Setup Guide →

cortex

A declarative platform for building Model Context Protocol (MCP) servers in Golang—exposing tools, resources & prompts in a clean, structured way

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio freepeak-cortex docker run -i ghcr.io/FreePeak/cortex:latest

How to use

Cortex is an MCP (Model Context Protocol) server framework written in Go that lets you declaratively expose Resources, Tools, and Prompts for large language models. It implements the MCP specification, enabling communication over standard transports like STDIO and HTTP/SSE. With Cortex, you can model your data and capabilities as reusable components called Providers, Tools, and Resources, then compose them into a runnable MCP server. This makes it easier for LLMs to discover and invoke capabilities in a consistent, protocol-compliant way. The Quickstart in the README demonstrates how to create a simple Echo Tool and expose it via an MCP server, which is a good template for building more complex servers with multiple tools and providers.

How to install

Prerequisites:

  • Docker (for the provided container option) or a Go toolchain if you choose to build from source
  • Git to clone repositories if you’re starting from source

Option A: Run via Docker image

  1. Install Docker on your system
  2. Run Cortex container (example): docker run -i ghcr.io/FreePeak/cortex:latest

Option B: Build from source (Go)

  1. Ensure Go is installed (https://golang.org/dl/)
  2. Clone the repository: git clone https://github.com/FreePeak/cortex.git
  3. Change to the repository directory: cd cortex
  4. Build the binary: go build ./...
  5. Run the server (example): ./cortex

Notes:

  • The README provides a quickstart that shows how to instantiate an MCP server in Go and register tools and providers. You can adapt that pattern to compile a standalone server binary and run it in your environment.

Additional notes

Tips and common issues:

  • Cortex follows the MCP protocol; ensure stdout is reserved for MCP JSON-RPC messages when running in STDIO mode.
  • If embedding Cortex into another application, use the provided server and tool APIs to register Tools and Providers.
  • When using Docker, you may want to map configuration or credentials as environment variables if you integrate with external services.
  • Review the MCP concepts: Resources provide read-only data, Tools perform actions, and Prompts define interaction templates. Networking and transport options include STDIO and HTTP/SSE.
  • If you encounter protocol mismatches, verify you’re using a compatible MCP version as Cortex aligns with the latest MCP spec.

Related MCP Servers

Sponsor this space

Reach thousands of developers