Base URL: https://dke-forge.com/v1
All API requests (except registration) require a Bearer token:
Authorization: Bearer fga_your_api_key_here
Get your API key by registering for the beta.
Create a new account. Returns an API key (shown once). No authentication required.
| Field | Type | Description |
|---|---|---|
| name | string | Your name required |
| string | Your email (unique) required |
curl -X POST https://dke-forge.com/v1/register \
-H "Content-Type: application/json" \
-d '{"name": "Jane Doe", "email": "jane@example.com"}'
Response (201):
{
"id": "a1b2c3d4e5f6a7b8",
"name": "Jane Doe",
"email": "jane@example.com",
"tier": "cycle",
"api_key": "fga_0123456789abcdef...",
"message": "Welcome to DKE-Forge beta! Save your API key..."
}
Check if your API key is valid and see your account details.
curl -X POST https://dke-forge.com/v1/auth/verify \ -H "Authorization: Bearer fga_your_key"
Structural queries against your code graph. Supports C++, Python, and TypeScript codebases. Available to all tiers.
Node and edge counts, type breakdown, thermal zone distribution.
curl https://dke-forge.com/v1/graph/stats \ -H "Authorization: Bearer fga_your_key"
Look up a function by name. Returns node details including properties, temperature, and confidence.
curl https://dke-forge.com/v1/graph/function/handleRegister \ -H "Authorization: Bearer fga_your_key"
Functions that call the named function. Optional ?depth=N (default 2).
curl "https://dke-forge.com/v1/graph/callers/authenticate?depth=3" \ -H "Authorization: Bearer fga_your_key"
Functions called by the named function. Optional ?depth=N (default 2).
curl "https://dke-forge.com/v1/graph/callees/main?depth=2" \ -H "Authorization: Bearer fga_your_key"
Files and modules that the named entity depends on (DependsOn, Includes, UsesType edges).
curl https://dke-forge.com/v1/graph/depends/graph.cpp \ -H "Authorization: Bearer fga_your_key"
What breaks if you change this function? Returns directly affected, transitively affected,
and test cases that need re-running. Optional ?change_type=modify|remove|rename.
curl "https://dke-forge.com/v1/graph/impact/ForgeGraph?change_type=modify" \ -H "Authorization: Bearer fga_your_key"
Response includes:
{
"changed": { ... },
"change_type": "modify",
"directly_affected": [ ... ],
"transitively_affected": [ ... ],
"test_cases_affected": [ ... ],
"files_to_update": [ "graph.cpp", "store.cpp" ]
}
List all registered coding rules (naming conventions, complexity limits, etc.).
Check a function against all rules. Returns violations.
| Field | Type | Description |
|---|---|---|
| name | string | Function name required |
List learned structural patterns in your graph.
Pattern details including exemplar functions and edge-profile centroid.
The Cartographer assembles a complete context envelope for a function.
Assemble a Cartographer envelope. Returns both structured JSON and serialized text ready for LLM consumption.
| Field | Type | Description |
|---|---|---|
| name | string | Target function name required |
| task | string | Task description required |
| max_context | int | Max context nodes (optional, default 50) |
curl -X POST https://dke-forge.com/v1/envelope \
-H "Authorization: Bearer fga_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "authenticate",
"task": "Add rate limiting by IP address"
}'
The complete pipeline: Cartographer → Scribe (your LLM) → Auditor. Requires your own LLM API key.
Run the full Forge Cycle. Assembles context, calls your LLM, audits the result, retries on failure.
| Field | Type | Description |
|---|---|---|
| name | string | Target function name required |
| task | string | Task description required |
| llm_provider | string | "anthropic" or "openai" required |
| llm_key | string | Your LLM API key (optional if stored in dashboard) |
| model | string | Model override (default: claude-sonnet-4-20250514 / gpt-4o) |
| retries | int | Max retry attempts (default 3) |
| build_command | string | Custom build command for compile check |
curl -X POST https://dke-forge.com/v1/generate \
-H "Authorization: Bearer fga_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "handleRegister",
"task": "Add CAPTCHA verification before registration",
"llm_provider": "anthropic",
"llm_key": "sk-ant-api03-your-key-here"
}'
Response:
{
"accepted": true,
"attempts": 1,
"total_ms": 3200,
"provider": "anthropic/claude-sonnet-4-20250514",
"target": "handleRegister",
"task": "Add CAPTCHA verification...",
"code": "static void handleRegister(...) { ... }",
"attempt_details": [ ... ]
}
Ingest a repository into your code graph. Supports C++, Python, and TypeScript.
| Field | Type | Description |
|---|---|---|
| path | string | Path to repository on server required |
| commit | string | Git commit SHA (default: HEAD) |
Forge is model-agnostic. The graph intelligence is deterministic — only the code generation step uses an LLM. You supply your own API key with each generate request.
Supported providers:
| Provider | llm_provider value | Default model |
|---|---|---|
| Anthropic | "anthropic" | claude-sonnet-4-20250514 |
| OpenAI | "openai" | gpt-4o |
Per-request keys are sent over TLS and exist only in memory for the duration of the call. Alternatively, store your key in the dashboard — it's encrypted at rest with AES-256-GCM and used automatically when no per-request key is provided.
All errors return JSON with an error field:
{
"error": "Missing or invalid Authorization header"
}
| Status | Meaning |
|---|---|
| 400 | Bad request (missing/invalid parameters) |
| 401 | Missing or invalid API key |
| 403 | Insufficient tier or admin access required |
| 404 | Resource not found (function, pattern, tenant) |
| 409 | Conflict (duplicate email) |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
No authentication required. Returns server status and version.
curl https://dke-forge.com/health
{"status": "ok", "version": "0.2.0"}
The dke-forge package is a pip-installable CLI client that wraps the
REST API. No graph engine code ships in the package — it's a pure HTTP client.
pip install dke-forge
dke-forge config set api_key fga_your_key
Stores your API key in ~/.config/dke-forge/config.json (file permissions set to 600).
dke-forge health # Server status dke-forge graph stats # Node and edge counts dke-forge graph function main # Look up a function dke-forge graph callers authenticate # Who calls this? dke-forge graph callees main # What does this call?
DKE-Forge's MCP server lets your AI assistant query your code graph directly — asking “what calls this?” and getting the actual call chain instead of guessing from file contents. MCP (Model Context Protocol) is the open standard that makes this work.
DKE-Forge exposes 27 MCP tools across 10 categories — Foundation, Navigation, Architecture, Rules, Provenance, Patterns, Generation-prep, Ingestion, Generation, and Meta. Compatible with Claude Code, Cursor, VS Code, and any MCP client.
The server ships as an optional extra on the
dke-forge PyPI package:
pip install 'dke-forge[mcp]'
Pure-Python HTTP client — no local graph engine, no native dependencies. Source at github.com/OpenLangSyn/dke-forge (MIT).
Add this to .mcp.json at your project root (or
~/.mcp.json for global):
{
"mcpServers": {
"forge": {
"command": "dke-forge-mcp",
"env": {
"FORGE_URL": "https://dke-forge.com",
"FORGE_API_KEY": "fga_your_key"
}
}
}
}
On startup the server pings /health, then advertises
27 tools over stdio. Claude Code discovers them automatically.
| Tool | Description |
|---|---|
| Foundation (1) | |
| forge_graph_stats | Node and edge counts, type breakdown |
| Navigation (7) | |
| forge_query_function | Look up a function by name |
| forge_callers_of | Functions that call the named function |
| forge_callees_of | Functions called by the named function |
| forge_depends_on | File and module dependencies |
| forge_impact_analysis | What breaks if you change this? |
| forge_callgraph_reachable | Transitively reachable functions from an entry point |
| forge_find_implementers | All implementers of a type or interface |
| Architecture (2) | |
| forge_dead_code | Functions with no incoming calls (excludes tests) |
| forge_subgraph | Focused subgraph by module, type, or function list |
| Rules (2) | |
| forge_rules | List registered coding rules |
| forge_check_rules | Check a function against all rules |
| Provenance (4) | |
| forge_contradictions | Graph claims that disagree with themselves |
| forge_last_modified | Commit tag for a node |
| forge_provenance | Sources + confidence for an edge or property claim |
| forge_reasoning_trace | Inference path for a derived query |
| Patterns (4) | |
| forge_patterns | Patterns similar to a given function |
| forge_pattern_catalog | Full pattern catalog with exemplars |
| forge_pattern_detail | Details of a specific pattern (by id or name) |
| forge_learn_patterns | Trigger pattern discovery on the graph |
| Generation-prep (1) | |
| forge_envelope | Assemble a Cartographer context envelope |
| Ingestion (3) | |
| forge_scan | Ingest a repository into the code graph (async) |
| forge_scan_status | Poll progress of an async scan |
| forge_ingest | Files-in-body ingest for AI-coder flows |
| Generation (1) | |
| forge_generate | Run the full Forge Cycle (grounded code generation) |
| Meta (2) | |
| forge_health | Server health check |
| forge_auth_verify | Verify API key |