← 返回
未分类 中文

Socraticode Mcp

Install and configure SocratiCode MCP server for semantic code search and codebase indexing
安装配置 SocratiCode MCP 服务器,用于语义代码搜索和代码库索引
adelpro
未分类 clawhub v1.2.0 1 版本 99441.3 Key: 无需
★ 0
Stars
📥 178
下载
💾 0
安装
1
版本
#code-search#indexing#latest#mcp#openclaw#search#socraticode

概述

SocratiCode MCP

Install and configure SocratiCode for semantic code search and codebase intelligence on OpenClaw.

What is SocratiCode?

MCP server providing:

  • Hybrid search - Semantic + keyword search via RRF
  • Code indexing - AST-aware chunking at function/class boundaries
  • Dependency graphs - Import analysis for 18+ languages
  • Live updates - File watcher keeps index current

Prerequisites

RequirementPurpose
----------------------
Docker runningQdrant vector database
npx (Node.js 18+)Execute socraticode package
mcporterManage MCP servers

Installation

Step 1: Install mcporter

npm install -g mcporter

Step 2: Configure mcporter

Create ~/.openclaw/workspace/config/mcporter.json:

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

Verify:

mcporter list

Step 3: Start Qdrant

docker run -d --name socraticode-qdrant \
  -p 16333:6333 -p 16334:6334 \
  qdrant/qdrant:v1.17.0

Per-Project Indexing

To index a specific project (not the config directory), create mcporter.json in project root:

cd /path/to/your-project

echo '{
  "mcpServers": {
    "socraticode": {
      "command": "npx",
      "args": ["-y", "socraticode"]
    }
  }
}' > mcporter.json

Then use --config mcporter.json:

# Index
mcporter --config mcporter.json call socraticode.codebase_index

# Check status
mcporter --config mcporter.json call socraticode.codebase_status

# Search
mcporter --config mcporter.json call socraticode.codebase_search query="auth" limit=5

Commands

CommandPurpose
------------------
codebase_indexStart indexing
codebase_statusCheck progress
codebase_searchSemantic search
codebase_graph_queryFind imports/dependents
codebase_graph_visualizeMermaid diagram
codebase_graph_circularDetect cycles
codebase_watchToggle file watcher
codebase_stopStop indexing

Troubleshooting

Indexing Wrong Directory

Use per-project mcporter.json + --config flag.

Qdrant Not Running

docker start socraticode-qdrant
# Or recreate:
docker run -d --name socraticode-qdrant -p 16333:6333 -p 16334:6334 qdrant/qdrant:v1.17.0

Slow on macOS/Windows

Install native Ollama:

brew install ollama
ollama serve

Or use OpenAI:

export OPENAI_API_KEY=your-key
export EMBEDDING_PROVIDER=openai

Agent Integration

Add to your AGENTS.md:

## Codebase Search (SocratiCode)
- Use `codebase_search` for exploration
- Check `codebase_status` if no results
- Search before reading files

版本历史

共 1 个版本

  • v1.2.0 当前
    2026-05-20 05:57 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Openclaw Continuous Learning

adelpro
OpenClaw的本能学习系统。分析会话、检测模式、生成带置信度评分的原子学习并提供优化建议。
★ 0 📥 859
developer-tools

Private Web Search Searchxng

adelpro
使用 SearXNG 的自托管私有网页搜索。适用于注重隐私、外部 API 受阻、需要无追踪搜索或希望避免付费限制的场景。
★ 0 📥 801
ai-intelligence

Self Improvement

adelpro
Generic agent self-improvement skill built on OpenClaw-RL research (arxiv.org/abs/2603.10165). Captures evaluative signa
★ 1 📥 3,453