nightshift-grid
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| NIGHTSHIFT_URL | Yes | URL of the Nightshift Grid coordinator, e.g. http://127.0.0.1:8000. | |
| NIGHTSHIFT_CA_FILE | No | Path to a PEM CA file used to verify the coordinator's TLS certificate. | |
| NIGHTSHIFT_MCP_ROOTS | No | Filesystem root(s) the MCP server is allowed to access. Symlinks are resolved and secret files are refused. | |
| NIGHTSHIFT_TLS_FINGERPRINT | No | Pinned TLS certificate fingerprint for connecting to the coordinator, e.g. sha256:… |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Nightshift Grid runs small local LLMs on idle machines to extract entity/relationship triples from text in parallel. Use ingest_directory_to_graph to build a knowledge graph from local docs, query_local_graph to look facts up in it (no LLM call), dispatch_mapreduce_text for ad-hoc text, and grid_status to see capacity. Only directories under the configured roots can be read.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| grid_statusA | Show Nightshift Grid capacity: each worker's id, capability tier (1 embeddings, 2 JSON extraction, 3 heavy), state, model, live tok/s and completed/preempted counts; task queue depth by state; and the most recent jobs with progress. |
| dispatch_mapreduce_textA | Submit text chunks to the grid for entity/relationship extraction (one model call per chunk, spread across idle workers). With wait=true (default) blocks until done, reporting progress, and returns counts, elapsed time, failed chunks, the merged top entities and up to 200 [subject, RELATION, object] triples. With wait=false returns the job_id at once. required_tier: 1 any worker, 2 workers with 8-24GB free RAM, 3 the largest machines. |
| ingest_directory_to_graphA | Build a knowledge graph from local files: chunk every file under directory_path that matches glob_pattern (~chunk_size characters per chunk, with overlap), extract entities/relations on the grid, then write /<job_id>/output_graph.jsonl and the resolved graph.json. Returns their paths, top entities/relations, timings, and every skipped file with the reason. Only reads inside the allowed roots; refuses secret files (.env, keys, credentials). Relative paths are resolved against the first allowed root. With wait=false returns after dispatch; graph.json appears when the job finishes. |
| query_local_graphA | Look up facts in a local Nightshift knowledge graph (no LLM call): entities matching entity_or_keyword (exact name/alias, substring, or keyword overlap) and the [subject, RELATION, object] triples around them - hop 1 touches a match, hop 2 touches a neighbour - strongest first, each with evidence (job_id, chunk_index, source file span). Searches the newest graph.json in the output dir unless graph_path names a graph.json or a coordinator output_graph.jsonl (inside the allowed roots). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 4 tools
Each tool occupies a distinct stage of the workflow: status inspection, text-chunk dispatch, directory ingestion, and local graph querying. The only potential overlap is dispatch_mapreduce_text vs. ingest_directory_to_graph, but they clearly differ by input type and output behavior.
All names use snake_case and are descriptive; the three action tools follow verb_object phrasing, while grid_status is noun-first. This is a minor deviation but remains readable and predictable.
Four tools are well scoped for a grid/KG pipeline: inspect capacity, dispatch extraction, ingest files, and query results. No tool feels redundant or missing for the core purpose.
The surface covers the main lifecycle: status, extraction dispatch, file-to-graph ingestion, and graph lookup. Minor gaps exist around explicit job management, such as checking or canceling a job by job_id and listing available graphs, but core workflows are covered.