OriginTrail DKG MCP Server
Connects MCP-compatible agents with the OriginTrail Decentralized Knowledge Graph, enabling creation, retrieval, linking, and exchange of verifiable knowledge using natural language and SPARQL queries.
README
OriginTrail DKG MCP Server (example)
Overview
The OriginTrail DKG MCP Server connects MCP-compatible agents with the OriginTrail Decentralized Knowledge Graph (DKG), making it easy to create, retrieve, link, and exchange verifiable knowledge.
Note: This is BETA software and not recommended for use in production
Key Features
- SPARQL Querying: Retrieve knowledge from the DKG using flexible SPARQL queries.
- Knowledge Asset Creation: Convert natural language into structured, schema.org-compliant JSON-LD and publish it to the DKG.
- Agent Memory: Store and retrieve decentralized agent memory in a standardized, interoperable way.
- Interoperability: Works with any MCP-compatible client, including VS Code, Cursor, Microsoft Copilot agents, and more.
Getting Started
1. Clone the Repository
git clone <repo-url>
cd otdkg-mcp-server
2. Install Dependencies
Ensure you have Python 3.10+ installed. Then run:
pip install -r requirements.txt
3. Configure Environment Variables
Copy .env.example to .env and fill in the required values:
ORIGINTRAIL_NODE_URL: You can use the default public node on testnet, use a different public testnet or mainnet node, or deploy and use your own Edge Node.BLOCKCHAIN: Blockchain to use for publishing Knowledge Assets on the DKG (e.g.,NEUROWEB_TESTNET)PRIVATE_KEY: Private key of the wallet you'll use for publishing Knowledge Assets to the DKGGOOGLE_API_KEY: API key for Google Generative AI (you can get your API ke at https://aistudio.google.com/)
See .env.example for detailed comments and options.
4. Run the MCP Server
You can run the server in two modes:
a) Stdio Mode (for local clients like VS Code, Cursor, Claude, etc.)
python dkg_server.py --transport stdio
b) SSE Mode (for server deployment, making the DKG MCP server accessible to e.g. Microsoft Copilot Studio agents)
python dkg_server.py --transport sse
The SSE server will listen on the configured host and port (see .env).
Usage
Once the server is running, you can import it into your client and gain access to the following out-of-the-box tools:
- Query the DKG: Use the
query_dkg_by_nametool to search for entities by name using SPARQL. - Create Knowledge Assets on the DKG: Use the
create_knowledge_assettool to convert natural language into JSON-LD and publish it to the DKG.
These tools are exposed via MCP and can be invoked from any compatible agent or client.
Compatible Clients
- [x] VS Code
- [x] Cursor
- [x] Claude
- [x] Microsoft Copilot Studio agents
- [x] Any MCP-compatible LLM or agentic framework
Extending the Server
- Customize Existing Tools: Modify and enhance the existing tools in
dkg_server.pyor add new functionality to tailor them to your needs. - Add New Tools: You can easily add new MCP tools by defining new functions in
dkg_server.pyusing the@mcp.tool()decorator (e.g. a tool that will transform website URLs into knowledge on the DKG). - Custom Prompts: Modify or add prompt templates in the
prompts/directory to customize LLM behavior. - Contribute: Clone, enhance, and submit pull requests to add new features or tools. Community contributions are welcome!
Project Structure
dkg_server.py— Main server and tool definitionsprompts/— Prompt templates for LLM-powered toolsrequirements.txt— Python dependencies.env.example— Example environment configurationorigintrail-dkg-mcp.yaml— OpenAPI spec for SSE deployment
Empower your agents to create, retrieve, and exchange verifiable knowledge on OriginTrail DKG!
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.