Skip to content
kilimanPublic

About

The Self-Improving MCP Server - Agents write code to orchestrate multiple MCP servers with intelligent TypeScript execution and auto-augmentation

Topics

Resources

Contributing

Stars

26 stars

Watchers

0 watching

Forks

Repository files navigation

CodeMesh Logo

CodeMesh

Agents Write Code. Orchestrate Everything.

npm version License Documentation

The world's first self-improving MCP server

📺 See It In Action

CodeMesh Demo

Watch: How Agent A explores and documents, then Agent B one-shots the same task - 2.6x faster!

📖 Read the story: Building CodeMesh - From Idea to Self-Improving Intelligence

What is CodeMesh?

CodeMesh lets AI agents write TypeScript code to orchestrate ANY MCP server. One prompt. One code block. Multiple servers working together.

Instead of exposing dozens of individual tools, CodeMesh provides just 3 tools:

  1. discover-tools - See what's available (context-efficient overview)
  2. get-tool-apis - Get TypeScript APIs for specific tools
  3. execute-code - Execute TypeScript that calls multiple tools

🎉 The Innovation: Auto-Augmentation

When agents encounter unclear tool outputs, CodeMesh forces documentation before proceeding. This creates compound intelligence - each exploration helps ALL future agents.

Proven: Agent A explored and documented. Agent B one-shot the same task. 2.6x faster! 🚀

Installation

1. Add CodeMesh to Claude Desktop

claude mcp add codemesh npx -y codemesh

Or manually add to your Claude Desktop MCP settings:

{
  "mcpServers": {
    "codemesh": {
      "command": "npx",
      "args": ["-y", "codemesh"]
    }
  }
}

2. Create Configuration

Create a .codemesh/config.json file in your project directory to configure which MCP servers CodeMesh should connect to:

{
  "logging": {
    "enabled": true,
    "level": "info",
    "logDir": ".codemesh/logs"
  },
  "servers": [
    {
      "id": "filesystem",
      "name": "File System",
      "type": "stdio",
      "command": ["npx", "@modelcontextprotocol/server-filesystem", "/path/to/directory"],
      "timeout": 30000
    },
    {
      "id": "brave-search",
      "name": "Brave Search",
      "type": "stdio",
      "command": ["npx", "-y", "@modelcontextprotocol/server-brave-search"],
      "env": {
        "BRAVE_API_KEY": "${BRAVE_API_KEY}"
      }
    },
    {
      "id": "weather",
      "name": "Weather Server",
      "type": "http",