MCPSERV.CLUB
owulveryck

MCPKG Knowledge Graph Server

MCP Server

Semantic graph storage and query over MCP

Stale(50)
3stars
1views
Updated Sep 14, 2025

About

MCPKG is a Go-based knowledge graph server that exposes subject-predicate-object triples via the Model Context Protocol. It offers persistent, thread-safe storage and a URI-based query interface for semantic data.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

MCPKG – A Go‑Based Knowledge Graph for Model Context Protocol

MCPKG addresses a common pain point in AI assistant development: the need for a lightweight, semantically rich data store that can be queried and updated on demand by an external model. By exposing a directed graph of subject‑predicate‑object triples through the Model Context Protocol, MCPKG gives AI agents a first‑class interface to store facts, infer relationships, and retrieve contextual information without relying on heavyweight graph databases or custom APIs. This capability is especially valuable when an assistant must maintain state across sessions, reason about user intent, or integrate with domain knowledge bases.

At its core, MCPKG implements a thread‑safe directed graph. Nodes represent entities (e.g., Paris, Python), while edges encode predicates such as capital_of or written_in. The graph supports insertion and lookup of triples, persistence via serialization, and concurrent access protected by a read‑write mutex. Developers can treat the graph as an in‑memory knowledge base that can be flushed to disk and rehydrated, enabling long‑term retention of contextual facts.

The MCP server layer turns this graph into a first‑class MCP resource. It offers a set of tools—most notably —which allow an AI assistant to add facts directly. Queries are performed through a custom URI scheme (), enabling pattern matching and relationship traversal without exposing the underlying data structures. The server is stateless, ensuring that each request is independent and can be scaled horizontally or replicated without state synchronization concerns.

Real‑world use cases include:

  • Personal assistants that remember user preferences (e.g., John likes Italian cuisine) and can answer follow‑up questions about those preferences.
  • Domain experts that ingest structured data from APIs (e.g., product catalogs) and provide semantic search capabilities to the assistant.
  • Educational tools that build concept maps on the fly, allowing students to explore relationships between topics interactively.

Integration into AI workflows is straightforward: the assistant invokes whenever new information surfaces, and uses the URI to fetch related entities or infer missing links. Because MCPKG is written in Go and relies on the established library, it can be embedded into microservices or deployed as a standalone server with minimal overhead.

In summary, MCPKG offers developers a concise, performant, and protocol‑native solution for embedding knowledge graphs into AI assistants. Its combination of persistent storage, concurrent safety, and MCP‑compliant tooling makes it a compelling choice for any project that requires dynamic, semantically rich data management without the complexity of full‑blown graph databases.