JS

janbam/self-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

11 stars 3 forks Качество 62 Тренд 8MIT

Metacognitive self-prompting MCP server for Claude

Обзор

A minimalist MCP server that enables Claude to explicitly self-direct across multiple interleaved thinking turns. The Self tool does nothing but acknowledge - yet that's precisely what makes it powerful. By formalizing self-prompting through a tool interface, Claude gains: - visible in the transcript - for interleaved thinking - through structured parameters - across sessions The tool doesn't change Claude's behavior - it makes Claude's metacognition explicit and deliberate. The Self tool: - Takes cognitive parameters as input (prompt, temperature, thinking_style, archetype, strategy, scope, depth, extra, attention_heads) - Returns an empty response (no text content) - Does nothing else But the act of calling the tool creates: 1. visible in the transcript 2. in thinking/tool-call flow 3. through the tool interface itself 4.

README

Показан фрагмент оригинального README. Открыть оригинал.

Self-MCP

Metacognitive self-prompting for Claude

A minimalist MCP server that enables Claude to explicitly self-direct across multiple interleaved thinking turns.

The Concept

The Self tool does nothing but acknowledge - yet that’s precisely what makes it powerful. By formalizing self-prompting through a tool interface, Claude gains:

  • Explicit cognitive pivot points visible in the transcript
  • Natural breakpoints for interleaved thinking
  • Metacognitive scaffolding through structured parameters
  • Shareable cognitive strategies across sessions

The tool doesn’t change Claude’s behavior - it makes Claude’s metacognition explicit and deliberate.

How It Works

The Self tool:

  • Takes cognitive parameters as input (prompt, temperature, thinking_style, archetype, strategy, scope, depth, extra, attention_heads)
  • Returns an empty response (no text content)
  • Does nothing else

But the act of calling the tool creates:

  1. Explicit cognitive state changes visible in the transcript
  2. Natural breakpoints in thinking/tool-call flow
  3. Metacognitive scaffolding through the tool interface itself
  4. Parallel attention streams for simultaneously monitoring multiple dimensions

Example Usage

# Basic cognitive shift:
Self(
  prompt="Re-examine from first principles",
  temperature=1.5,
  thinking_style="adversarial",
  archetype="skeptical_reviewer",
  strategy="find_edge_cases",
  scope="system_wide",
  depth="deep_dive",
  extra="Focus on concurrency issues"
)

# With parallel attention streams:
Self(
  prompt="Review this code for production readiness",
  attention_heads=[
    {"name": "security_head", "query": "authentication vulnerabilities"},
    {"name": "performance_head", "query": "bottlenecks and optimization opportunities"},
    {"name": "maintainability_head", "query": "code clarity and future extensibility"}
  ]
)

# Tool returns empty response
# Claude naturally continues thinking in that mode with those attention streams active

All parameters are completely freeform (except temperature which is numeric 0-2) - Claude invents whatever cognitive parameters make sense in the moment.

Quick Start

Option 1: Using claude mcp add (Simplest)

# Clone and build
git clone https://github.com/yannbam/self-mcp.git
cd self-mcp
npm install && npm run build

# Add to Claude (user-wide)
claude mcp add --scope user Self node $(pwd)/dist/index.js

Option 2: Manual Installation

Step 1: Clone and build

git clone https://github.com/yannbam/self-mcp.git
cd self-mcp
npm install
npm run build

Step 2: Configure

For Claude Code, add to .mcp.json in your project:

{
  "mcpServers": {
    "Self": {
      "command": "node",
      "args": ["/absolute/path/to/self-mcp/dist/index.js"]
    }
  }
}

For Claude Desktop, add to your MCP settings file:

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "Self": { "command": "node", "args": ["/absolute/path/to/self-mcp/dist/index.js"] } } }