MCPKG - Model Context Protocol Knowledge Graph
LocalAbout MCPKG - Model Context Protocol Knowledge Graph
MCPKG is a Go knowledge-graph system for storing, managing, and querying semantic triples. Its MCP interface gives clients tools to insert data and query relationships through a custom URI format.
Key features
- 01Directed graph storage
- 02Semantic triple insertion and queries
- 03Serialized persistence
- 04Custom URI graph queries
- 05Thread-safe access
Use cases
- 01Store entities and their relationships
- 02Query connections between graph entities
MCP support
Exposes the knowledge graph through an MCP server. Clients can insert triples with `insert_triple` and query relationships using the `graph://` URI format.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCPKG - Model Context Protocol Knowledge Graph
MCPKG is a Go implementation of a knowledge graph system that is exposed through the Model Context Protocol (MCP). It provides a simple yet powerful way to store, manage, and query semantic information in the form of subject-predicate-object triples.
Features
- Directed graph implementation for storing structured information
- Support for creating and querying semantic triples
- Persistent storage through serialization
- MCP server interface for programmatic access
- Custom URI format for graph queries
- Thread-safe implementation for concurrent use
Components
Knowledge Graph (KG)
The core data structure that:
- Stores entities as nodes
- Represents relationships as predicates (edges)
- Provides methods for inserting and querying triples
- Supports serialization and deserialization
- Ensures concurrent safety with a read-write mutex
MCP Server
An interface layer that:
- Exposes the knowledge graph as an MCP server
- Provides tools for inserting triples
- Supports graph queries via URI format
- Implements a stateless design for reliability
Usage
Inserting Information
Use the insert_triple tool with subject, predicate, and object parameters to add information to the graph.
Querying Information
Use the graph:// URI format to find relationships between entities.
Dependencies
- Go 1.24+
- github.com/mark3labs/mcp-go
- gonum.org/v1/gonum
- github.com/stretchr/testify (for testing)
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.