forgemcp
Provides tools for searching GitHub repositories and code, retrieving repository overviews, files, and trees, enabling code discovery and intelligence.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@forgemcpfind the best retry with backoff implementation"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ฅ GeniusMCP
Quality-aware code intelligence that turns GitHub search into ranked, explainable, import-ready recommendations.
Not another grep. An intelligence layer.
Quick Start ยท How It Works ยท Soul ยท Tools ยท Architecture

The Problem
Every code search tool answers "where is this string?"
None of them answer "what is the best implementation, why, and can I safely use it?"
When you ask genius.hunt("retry with backoff"), GeniusMCP returns:
Archetype 1 โ Minimal inline helper
โ
12 LOC, zero deps, copy-paste ready
Exemplar: owner/repo โ score 0.87 (battle_tested)
Why: test-adjacent, MIT license, 3 years stable
Archetype 2 โ Configurable utility
โ
Options-driven, max attempts + jitter strategy
Exemplar: owner/repo2 โ score 0.82
Why: 14K stars, active maintenance, comprehensive docs
Archetype 3 โ Middleware pattern
โ
Express/Fastify compatible, interceptor-based
Exemplar: owner/repo3 โ score 0.79
Tradeoff: framework-coupled
Coverage: 3 sources searched, 2 blind spots, confidence: 0.83That's the gap GeniusMCP fills.
Related MCP server: Smart Code Search MCP Server
โจ Key Features
Feature | What it does |
๐ฏ Archetype Search | Finds 3-5 structural families, not 200 raw matches |
๐ 6-Bucket Quality Scoring | queryFit ยท durability ยท vitality ยท importability ยท codeQuality ยท evidenceConfidence |
๐ Multi-Source Discovery | grep.app (free, 1M repos) + GitHub Code Search (200M repos) + searchcode (75B lines) |
๐งฌ 3-Level Dedup | Exact SHA โ normalized AST hash โ winnowing fingerprint families |
๐ Provenance-First Import | License gate ยท dependency closure ยท policy checks ยท attribution |
๐ง Persistent Memory | Every search enriches local evidence graph. Session 50 is smarter than session 1. |
๐ช Auto-Capture Hooks | Claude Code hooks capture patterns from every file you read/write |
๐ Pre-Prompt Injection | Relevant memories injected BEFORE the AI responds |
๐๏ธ 7 Archetype Categories | minimal ยท configurable ยท middleware ยท context-aware ยท distributed ยท enterprise ยท wrapper |
๐ Transparent Uncertainty | Every result shows blind spots + evidence confidence |
โก Tiered Responses | L1 (80 tokens) / L2 (300) / L3 (2000) โ adaptive detail level per result count |
๐ก๏ธ Circuit Breakers | Per-source fault isolation: GitHub/grep.app/searchcode fail independently |
๐ฐ Thompson Sampling | Multi-armed bandit learns which sources produce best results per query type |
๐ค SAC Matching |
|
๐ฆ Signature Compression | Repomix-style 70% token reduction โ strips bodies, keeps signatures |
๐ Dynamic Discovery |
|
๐ Why GeniusMCP
GitHub MCP | grep.app MCP | DeusData | GeniusMCP | |
Multi-source search | 1 source | 1 source | local only | 3 sources |
Quality scoring | no | no | no | 6-bucket |
License verification | no | no | no | yes |
Import with provenance | no | no | no | yes |
Persistent memory | no | no | knowledge graph | Bayesian + decay |
Cross-convention matching | no | no | no | SAC algorithm |
Fault tolerance | no | no | no | circuit breakers |
Token efficiency | no | no | no | L1/L2/L3 tiers |
๐ Quick Start
# 1. Clone and install
git clone https://github.com/geniussigmaskibidi-gif/geniusmcp
cd geniusmcp && pnpm install && pnpm build
# 2. Optional: GitHub auth (enables GitHub Code Search + metadata)
export GITHUB_TOKEN=ghp_your_tokenAdd to Claude Code (.mcp.json in your project root)
{
"mcpServers": {
"forgemcp": {
"command": "node",
"args": ["/path/to/forgemcp/apps/mcp-server/dist/index.js"],
"env": { "GITHUB_TOKEN": "ghp_your_token" }
}
}
}Server auto-indexes your project on start. code.reach, code.map, code.symbols work immediately.
Optional: Claude Code Hooks (auto-capture + injection)
{
"hooks": {
"PostToolUse": [
{ "matcher": "Read|Write|Edit", "command": "node hooks/genius-capture.js" }
],
"UserPromptSubmit": [
{ "command": "node hooks/genius-inject.js" }
]
}
}๐ก Usage Examples
Find the best implementation of a concept
You: "Find me a good rate limiter implementation"
Agent calls: genius.hunt("rate limiter", language: "typescript", tier: "L1")
โ 5 ranked archetypes in 130 tokens, with stars/license/test signalsImport code with license verification
You: "Import that circuit breaker from the best result"
Agent calls: import.extract("owner/repo", "src/circuit-breaker.ts", symbol: "CircuitBreaker")
โ Full code + MIT license verified + provenance hash + attribution commentCompare approaches across repos
You: "Should I use Zod or Ajv for validation?"
Agent calls: research.deep_compare("validation", ["colinhacks/zod", "ajv-validator/ajv"])
โ Side-by-side: Zod 42K stars vs Ajv 14K, both MIT+CI, structured quality signalsRemember and recall across sessions
Session 1: genius.hunt("retry backoff") โ auto-stores top 3 results
Session 2: memory.recall("retry") โ instant recall, no API calls neededExplore unfamiliar repository
You: "How does Hono handle errors?"
Agent calls: research.archaeology("honojs/hono", "error handling")
โ Found .onError() handler, JWT error middleware, 29K stars, TypeScriptRead soul.md for the complete AI agent reasoning guide โ search strategies, anti-patterns, and token budget optimization.
๐ How It Works
graph TD
Q["genius.hunt('retry backoff')"] --> C[QueryCompiler]
C --> |grep.app queries| G[grep.app MCP]
C --> |GitHub queries| GH[GitHub Code Search]
C --> |hydration queries| SC[searchcode.com]
G --> D[Dedup Engine]
GH --> D
SC --> D
D --> |"180 hits โ 60 blobs"| E[Symbol Extractor]
E --> F[Winnowing Fingerprint]
F --> |"60 โ 8 families"| CL[Archetype Classifier]
CL --> R[Quality Scorer]
R --> |"6-bucket ranking"| OUT["3-5 ranked archetypes<br/>with explanations"]
OUT --> MEM[(Evidence Graph<br/>SQLite)]
MEM --> |"next search: instant recall"| QThe Magic Loop
Session 1: "Find best rate limiter" โ searches 3 sources โ 60 unique blobs โ 5 archetypes
โ Results cached in evidence graph
Session 2: "Rate limiter for Express" โ local memory: 40 instant hits + 20 new
โ Faster, smarter, more relevant
Session 10: "Throttle middleware" โ 120 cached patterns, <100ms response
โ Compound intelligence๐ ๏ธ Tools (28 MCP Tools)
๐ฏ Hunt Intelligence (flagship)
Tool | Description |
| Find best implementations with archetype clustering, quality scoring, coverage report |
| Full signal breakdown: why this ranked #1 |
| Head-to-head comparison with bucket deltas |
| Policy-aware import with provenance manifest |
๐ง Memory (compound intelligence)
Tool | Description |
| Search past patterns by concept |
| Save pattern to persistent memory |
| Create improved version linked to parent |
| Find connected patterns |
| Create relationships between patterns |
| Memory size, coverage, confidence distribution |
| Remove outdated patterns |
๐งญ Code Navigation (1 call = 10 Read/Greps)
Tool | Description |
| Jump to symbol with full context: callers, callees, deps |
| Instant project architecture map |
| Call chain between functions |
| Compressed module understanding |
| All exports with signatures |
๐ฌ Research (persistent reasoning chains)
Tool | Description |
| Trace code evolution |
| Structured comparison with metrics |
| Begin research thread |
| Record reasoning step |
| Mark chain completed |
| Search past research |
๐ GitHub
Tool | Description |
| Search by query, language, stars |
| Code search across GitHub |
| Stars, CI, license, health |
| Get file content |
| Recursive file tree |
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ GeniusMCP Server โ
โ โ
โ Layer 1: DISCOVERY โ
โ grep.app MCP ยท GitHub Code Search API โ
โ โ
โ Layer 2: HYDRATION โ
โ GitHub Trees/Contents ยท searchcode analysis โ
โ โ
โ Layer 3: EVIDENCE GRAPH โ
โ SourceHit โ Blob โ SymbolSlice โ PatternFamily โ
โ โ
โ Layer 4: PATTERN INTELLIGENCE โ
โ 3-level dedup ยท archetype classifier ยท scorer โ
โ โ
โ Layer 5: IMPORT & POLICY โ
โ License gate ยท provenance ยท dep closure โ
โ โ
โ Layer 6: EVALUATION โ
โ Coverage confidence ยท blind spots ยท metrics โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโQuality Scoring (RFC v2)
overall = 0.35 ร queryFit + 0.50 ร qualityComposite + 0.15 ร evidenceConfidence
qualityComposite = weights[preset] ร {durability, vitality, importability, codeQuality}Presets: battle_tested ยท modern_active ยท minimal_dependency ยท teaching_quality
Hard caps: snippet_only โ evidence โค 0.60 ยท archived โ vitality โค 0.20 ยท license_unknown โ importability โค 0.20
๐ฆ Monorepo Structure
forgemcp/
packages/
core/ โ Types, config, errors (Zod-validated)
db/ โ SQLite WAL, blob store, search index, evidence graph
ast-intelligence/ โ Symbol extraction, call graph, architecture detection
repo-memory/ โ Bayesian confidence + Ebbinghaus decay engine
github-gateway/ โ Octokit + 4-bucket rate governor + ETag cache
data-sources/ โ grep.app + searchcode + source orchestrator
hunt-engine/ โ Winnowing, clustering, scoring, archetype classifier
importer/ โ License policy + provenance + style adaptation
apps/
mcp-server/ โ MCP server + 5 skill modules + hook daemon + dynamic tools
hooks/ โ Claude Code auto-capture scripts
tests/ โ 252 tests (vitest)
.github/workflows/ โ CI (Node 20/22, build + typecheck + test)๐งช Testing
npx vitest run
# 22 test suites, 252 tests, all passing (<1s)Suite | Tests | What it covers |
foundation | 19 | ForgeResult, Logger, Health, Context |
blob-store | 10 | Content-addressable storage, dedup, file refs |
blob-lifecycle | 11 | GC, pinning, integrity scrub |
symbol-extractor | 13 | TypeScript, Python, Go extraction + fingerprinting |
parser-registry | 6 | Multi-backend precision routing |
search-index | 4 | FTS5 trigram, BM25, RRF fusion |
simhash | 14 | Near-duplicate detection, Hamming distance |
chunker | 8 | Semantic code chunking, symbol boundaries |
query-planner | 14 | Query classification, lane planning |
ranking-v2 | 13 | BM25F weights, retrieval scoring, lexical+structural |
memory-engine | 15 | Store, recall, capture, Bayesian confidence, Ebbinghaus decay |
memory-v2 | 6 | L1/L2/L3 capsule builder, token estimation |
call-graph | 9 | 2-pass resolution, BFS reachability, path tracing |
winnowing | 12 | Fingerprints, Jaccard similarity, clone clustering |
policy-engine | 11 | 4-mode import policy, license gates, provenance |
evidence-graph | 8 | v2 schema: query runs, slices, families, versioned scores |
job-queue | 10 | Durable job queue, priority, backoff, dead-letter |
circuit-breaker | 19 | Circuit breaker state machine, bulkhead, resilient search |
token-budget | 22 | Token estimation, tier selection, truncation, compression |
source-selector | 5 | Thompson Sampling, convergence, discounting |
early-terminator | 6 | Welford online stats, adaptive saturation |
sac | 17 | Subword Affine Canonicalization, cross-convention matching |
๐ฏ Design Principles
Evidence, not opinions โ every score has signals you can inspect
Local-first โ works offline for indexed repos
Zero ML in core โ lexical + structural, semantic is opt-in
Provenance always โ every import traced to source + license
Progressive learning โ every search enriches the evidence graph
Transparent uncertainty โ blind spots shown, not hidden
๐ Tech Stack
Component | Technology |
Protocol | MCP SDK 1.28 (stdio + Streamable HTTP) |
Database | SQLite (WAL mode, better-sqlite3) |
Search | FTS5 trigram + BM25F + Reciprocal Rank Fusion |
AST | Regex multi-language + ast-grep upgrade path |
Dedup | Winnowing fingerprints (Schleimer 2003) + Jaccard clustering |
GitHub | Octokit + throttling + retry + 4-bucket rate governor |
External | grep.app MCP + searchcode.com |
Validation | Zod |
Resilience | Circuit breakers + bulkheads + decorrelated jitter |
Ranking | SAC cross-convention matching + Thompson Sampling source routing |
Token Efficiency | L1/L2/L3 tiered responses + signature compression |
Tests | Vitest (252 tests, <1s) |
Monorepo | pnpm + Turborepo |
๐ License
MIT
Built for AI agents that never forget.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/geniussigmaskibidi-gif/geniusmcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server