Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

A knowledge graph MCP server for Moleculer and Go microservice projects that scans codebases, extracts service metadata, seeds Neo4j, and exposes tools for LLM clients to query and understand service architecture.

README.md

gpkg-mcp

Standalone knowledge graph MCP server for Moleculer/Go microservice projects. Scans a project directory, extracts service metadata (actions, commands, queries, routes, events, dependencies), seeds Neo4j, and exposes everything via a Python MCP server that any LLM client (Claude Desktop, Cursor, the gp-langchain bot) can call.

---

What it does

  • Scans TypeScript/JavaScript Moleculer services (layered, CQRS, gateway) and Go services
  • Extracts per-action metadata: handler type, params validator, ctx.call dependencies (regex + variable resolution)
  • Seeds Neo4j knowledge graph and writes per-service markdown docs
  • Serves a FastMCP server over Streamable HTTP or stdio
  • Caches scan fingerprints with a schema_version so improved extractors always trigger a re-scan

---

Quick start (with sample data)

# One-shot bootstrap: checks prereqs, seeds sample services, starts MCP
./start.sh

The script: checks uv + Neo4j, runs uv sync, seeds sample/ data into Neo4j, then starts the server on http://localhost:8000/mcp.

---

Manual setup

cp .env.sample .env
# edit .env — set GPKG_NEO4J_URI / GPKG_NEO4J_PASSWORD at minimum

uv sync

# Scan a project
uv run gpkg scan ../my-project

# Query the knowledge graph
uv run gpkg query "payment transfer"

# Start the MCP server
uv run gpkg serve

---

Commands

| Command | Description | |---------|-------------| | gpkg scan <dir> | Scan all services under <dir>, seed Neo4j, write markdown KB | | gpkg scan <dir> --use-llm | Enable LLM validation for low-confidence architecture detections | | gpkg scan <dir> --force | Bypass fingerprint cache, rescan everything | | gpkg scan <dir> --concurrency N | Set parallel scan concurrency (default: 5) | | gpkg query "<text>" | Full-text query against the seeded KG | | gpkg query "<text>" --service NAME | Filter results to one service | | gpkg serve | Start MCP server (streamable-http on port 8000) | | gpkg serve --transport stdio | Start for Claude Desktop / Cursor local use |

---

MCP tools

| Tool | Description | |------|-------------| | scan_project(project_dir, use_llm, force) | Scan all services; returns {scanned, seeded, skipped, failed, services} | | scan_service(project_dir, service_path, use_llm) | Scan a single service; returns EnhancedServiceScanResult | | query_knowledge_graph(query, service_name?) | Full-text search; returns {services, actions, relationships} | | get_service(service_name) | Full stored knowledge for one service | | list_services() | All known services with arch type + confidence |

Resource: kb://{service_name} — the generated markdown doc for a service.

---

Configuration

Copy .env.sample to .env:

| Variable | Default | Description | |----------|---------|-------------| | GPKG_NEO4J_URI | bolt://localhost:7687 | Neo4j bolt URI | | GPKG_NEO4J_USER | neo4j | Neo4j username | | GPKG_NEO4J_PASSWORD | _(empty)_ | Neo4j password | | GPKG_KB_DIR | ./knowledge_base | Markdown KB output directory | | GPKG_SCAN_CONCURRENCY | 5 | Parallel scan workers | | GPKG_LLM_ENABLED | false | Enable LLM validation pass | | GPKG_LLM_MODEL | claude-haiku-4-5-20251001 | Model for architecture validation | | GPKG_LLM_CONFIDENCE_THRESHOLD | 0.7 | Only run LLM when confidence is below this | | GPKG_API_KEY | _(empty)_ | Bearer token for MCP server (empty = unauthenticated) | | ANTHROPIC_API_KEY | _(empty)_ | Required when GPKG_LLM_ENABLED=true |

---

Docker

# Build
docker build -t gpkg-mcp .

# Run with a local .env and data volume
docker run --env-file .env -p 8000:8000 -v $(pwd)/knowledge_base:/data/knowledge_base gpkg-mcp

# Scan a project (mount it read-only)
docker run --env-file .env \
  -v $(pwd)/knowledge_base:/data/knowledge_base \
  -v /path/to/my-project:/project:ro \
  gpkg-mcp uv run gpkg scan /project

---

Architecture detection

| Type | Detection signal | |------|-----------------| | layered-moleculer | actions: block with inline handlers in start.ts or *.service.ts | | cqrs-moleculer | CQRSContainer, CommandBus, QueryBus keywords | | gateway-moleculer | integrate-services/ directory with RestRoute() definitions | | golang-moleculer | go-moleculer in go.mod + Publisher pattern | | discrete-golang-moleculer | go-moleculer in go.mod, no Publisher | | external-api-service | No Moleculer; Express / Gin / Echo / Fiber |

Confidence levels: highmediumlow. LLM validation runs when confidence is below GPKG_LLM_CONFIDENCE_THRESHOLD.

---

Cache schema version

knowledge/cache.py has a CACHE_SCHEMA_VERSION constant (currently 4). Bump it whenever an extractor changes — the next scan will ignore all cached fingerprints and re-scan everything.

---

Running tests

uv run pytest

Tests cover: LayeredMoleculerExtractor action/handler/call extraction, cache schema version invalidation, and MCP tool shapes (mocked store, no Neo4j needed).

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Vector & Memory servers.