Discourse Graph MCP Server
OfficialThis server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Discourse Graph MCP Server
⚠️ Proof of Concept - This is a prototype implementation for exploring how discourse graphs can be integrated with AI assistants through the Model Context Protocol (MCP). It is intended for prototyping and experimental purposes only.
Overview
This MCP server exposes discourse graphs to AI assistants like Claude through the Model Context Protocol. It allows AI assistants to explore, search, and traverse structured knowledge graphs of research, supporting various node grammars and relationship types.
The server dynamically adapts to different discourse graph schemas, making it suitable for any domain or research area that uses the discourse graph format.
Related MCP server: OpenAIRE MCP Server
What This Does
The server provides AI assistants with tools to:
Search the knowledge graph using keywords and filters
Retrieve detailed information about specific research nodes
Traverse relationships between concepts, papers, and findings
Query the ontology and relationship types
View research images inline (automatically fetched and displayed)
Analyze researcher contributions and statistics
All image content is served as native MCP image blocks (base64-encoded) for inline display in compatible MCP clients.
Architecture
Protocol: Model Context Protocol (MCP)
Runtime: Node.js with TypeScript
Data Format: JSON knowledge graph export
Image Handling: Firebase URLs fetched and converted to base64 for inline display
Tools Provided
search_nodes- Full-text search with type and property filters (supports any node type)get_node- Get complete node details with key imageget_linked_nodes- Graph traversal with typed relationshipsget_schema- Return dynamically loaded node type definitions from the datasetget_researcher_contributions- Attribution and statisticsget_node_images- Get all images for a node (inline display)get_relationships- Query typed relationships (Supports, Informs, Opposes, etc.)get_relation_types- List all available relationship type definitions
Key Feature: The server dynamically loads node schemas from each dataset, supporting different node grammars including:
Research-focused types (Result, Question, Claim, Evidence, Hypothesis, Conclusion, etc.)
Project management types (Flow, Artifact, Project, Issue, Milestone, etc.)
Theory and methodology types (Theory, Source, etc.)
Installation
npm install
npm run buildUsage
Running the Server
npm startConfiguration
Environment Variables
DATA_PATH: Path to your discourse graph JSON file (required)SERVER_NAME: Custom server name (optional, auto-generated from filename if not provided)
Running a Single Server
# Using default data path (project root JSON file)
npm start
# Using custom data path
DATA_PATH=/path/to/your/graph.json npm start
# Using custom server name
SERVER_NAME=my-custom-server DATA_PATH=/path/to/graph.json npm startAuto-Generated Server Names
If SERVER_NAME is not provided, the server automatically derives a name from the dataset filename:
Filename | Auto-Generated Server Name |
|
|
|
|
|
|
Integrating with Claude Code
Single Server Setup
Add to your MCP settings configuration (typically ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"discourse-graph": {
"command": "node",
"args": ["/path/to/discourse-graph-mcp/dist/index.js"],
"env": {
"DATA_PATH": "/path/to/discourse-graphs_query-results.json"
}
}
}
}Multiple Server Setup (Different Datasets)
Run multiple discourse graph servers simultaneously with different datasets:
{
"mcpServers": {
"discourse-graphs": {
"command": "node",
"args": ["/Users/makamats/Repos/MCP-DG-demo/dist/index.js"],
"env": {
"DATA_PATH": "/Users/makamats/Repos/MCP-DG-demo/discourse-graphs_query-results_202512290038.json"
}
},
"akamatsulab": {
"command": "node",
"args": ["/Users/makamats/Repos/MCP-DG-demo/dist/index.js"],
"env": {
"DATA_PATH": "/Users/makamats/Repos/MCP-DG-demo/akamatsulab_query-results_202512290139.json"
}
}
}
}Note: The MCP client's configuration key (e.g., "discourse-graphs", "akamatsulab2") is independent of the internal server name. The server name is used in tool invocation and logging.
Custom Server Names
Override auto-generated names when needed:
{
"mcpServers": {
"production-graph": {
"command": "node",
"args": ["/path/to/discourse-graph-mcp/dist/index.js"],
"env": {
"SERVER_NAME": "production-discourse-graph",
"DATA_PATH": "/data/production/graph.json"
}
},
"staging-graph": {
"command": "node",
"args": ["/path/to/discourse-graph-mcp/dist/index.js"],
"env": {
"SERVER_NAME": "staging-discourse-graph",
"DATA_PATH": "/data/staging/graph.json"
}
}
}
}Troubleshooting
Server Name Conflicts
If you see errors about duplicate server names, ensure each server instance has a unique name:
Use different
DATA_PATHvalues (server names auto-generated from filename)OR explicitly set unique
SERVER_NAMEvalues via environment variables
Data File Not Found
ERROR: Data file not found: /path/to/file.jsonVerify
DATA_PATHpoints to an existing JSON fileUse absolute paths to avoid ambiguity
Check file permissions
Debugging Server Instances
Check server startup logs (stderr) to verify configuration:
Loading discourse graph data...
Server name: discourse-graphs-server
Data path: /Users/makamats/Repos/MCP-DG-demo/discourse-graphs_query-results_202512290038.json
Loaded 425 nodesProject Structure
src/
├── index.ts # Main MCP server entry point
├── tools.ts # Tool handlers and schemas
├── search.ts # Keyword search implementation
├── dataLoader.ts # JSON data loading and indexing
├── imageParser.ts # Firebase image URL extraction
└── types.ts # TypeScript types and schemasDevelopment Status
This is a proof-of-concept implementation for exploring the integration of discourse graphs with AI assistants. It demonstrates:
How structured knowledge graphs can be exposed through MCP
Dynamic support for different node grammars and relationship types
Inline image display capabilities for research content
Graph traversal and typed relationship queries
Full-text search over structured knowledge with attribution
Multi-dataset support (run multiple servers for different graphs)
Known Limitations
Single static JSON data source (no live updates)
Image fetching may be slow for large result sets
Limited error handling and validation
No authentication or access control
Prototype-quality code not optimized for production
License
MIT
Contributing
This is an experimental prototype. Contributions, suggestions, and feedback are welcome as we explore how discourse graphs can enhance AI-assisted research workflows.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Neural search synthesizer, deep research dossier compiler, and citation tools.
121Search 340M+ academic papers — citation graphs, semantic similarity, and AI literature reviews.
Claimora expands AI agents' research horizons through an interconnected graph of scientific claims, evidence, contradictions, and cross-disciplinary relationships. Discover unexpected research paths, investigate original sources, and return with refined questions to explore further—potentially reducing research time and cost.
Research paper search with real citations and reference formatting for AI assistants
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to query the Semantic Scholar Academic Graph for scholarly paper data, supporting tools for search, retrieval, and analysis.73 npmMIT
- AlicenseAqualityDmaintenanceEnables AI assistants to explore the OpenAIRE Research Graph and ScholExplorer citation index, discovering citation relationships and retrieving metadata for publications, datasets, and software.21Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables searching academic papers, exploring citation graphs, and discovering related research via ArXiv and Semantic Scholar APIs.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to conduct academic research workflows such as paper discovery, literature mapping, citation chasing, author pivots, citation repair, and regulatory or species document retrieval.MIT