Provides access to ConceptNet's semantic knowledge graph, enabling AI agents to look up concepts, search for related terms, analyze semantic relationships, and calculate concept similarity scores across multiple languages.
ConceptNet MCP Server
A Model Context Protocol (MCP) server that provides seamless access to the ConceptNet knowledge graph through FastMCP framework.
Overview
ConceptNet MCP provides AI assistants and applications with structured access to ConceptNet's semantic knowledge through four powerful MCP tools:
Concept Lookup: Get detailed information about specific concepts
Concept Query: Search and filter concepts with advanced criteria
Related Concepts: Find concepts connected through semantic relationships
Concept Relatedness: Calculate semantic similarity between concepts
Features
๐ FastMCP Integration: Built on the modern FastMCP framework for optimal performance
๐ Comprehensive Search: Advanced querying with language filtering and pagination
๐ Multi-language Support: Access ConceptNet's multilingual knowledge base
๐ Semantic Analysis: Calculate relatedness scores between concepts
๐ Async Operations: Full async/await support for non-blocking operations
๐ Type Safety: Complete Pydantic v2 type validation and IDE support
๐งช Production Ready: Error handling, logging, and testing
โก Optimized Output Formats: Choose between minimal (~96% smaller) or comprehensive responses
Output Formats
ConceptNet MCP Server supports two output formats for all tools to optimize performance and reduce token usage:
Minimal Format (Default - Recommended)
Size: ~96% smaller than verbose format
Optimized: Designed specifically for LLM consumption
Content: Essential data only - concepts, relationships, similarity scores
Performance: Faster processing and reduced API costs
Usage: Perfect for most AI applications and chat interfaces
Verbose Format
Size: Full ConceptNet response data
Content: Complete metadata, statistics, analysis, and original API responses
Usage: Detailed analysis, debugging, or when full context is needed
Backward Compatibility: Maintains compatibility with existing integrations
Setting the Format
All tools accept a verbose
parameter:
Examples of size difference:
Minimal:
{"concept": "dog", "relationships": {"IsA": ["animal", "mammal"]}}
Verbose: Full ConceptNet response with complete metadata, statistics, timestamps, etc.
Quick Start
Installation
Running the MCP Server
The server supports both stdio (for desktop MCP clients) and HTTP (for web clients) transport modes:
Stdio Transport (Default - for desktop MCP clients)
HTTP Transport (for web clients)
Development Modes
MCP Client Integration
For Desktop MCP Clients (stdio transport)
Add to your MCP client configuration:
For Web Applications (HTTP transport)
Add to your MCP client configuration:
Or start the HTTP server manually and connect to:
โ๏ธ Cloudflare Workers Deployment
Deploy ConceptNet MCP Server to Cloudflare's global edge network for worldwide access and automatic scaling using a FastAPI-based implementation optimized for Python Workers.
Architecture
The Cloudflare Workers deployment uses a completely different architecture from the standard FastMCP server:
FastAPI Framework: Manual MCP protocol implementation using FastAPI for HTTP routing
Standard Workers Pattern: Uses
fetch(request, env, ctx)
handler (no Durable Objects)Native HTTP Client: Custom
CloudflareHTTPClient
using Workers' nativefetch()
APIManual MCP Protocol: JSON-RPC 2.0 MCP messages handled directly without FastMCP framework
Benefits
๐ Global Edge Network: Low-latency access worldwide via Cloudflare's CDN
๐ Auto-scaling: Serverless scaling based on demand with zero cold starts
๐ Dual Transport Support: Both SSE and Streamable HTTP endpoints for maximum compatibility
๐ค Remote MCP Access: Enable AI agents to access ConceptNet from anywhere
๐ฐ Cost-effective: Pay only for actual usage with generous free tier
Quick Deploy
Usage After Deployment
Your ConceptNet MCP Server will be available at:
Example remote client connection (direct HTTP):
For detailed deployment instructions, configuration options, and troubleshooting, see the Cloudflare Workers Documentation.
Available Tools
1. Concept Lookup
Get detailed information about a specific concept. Returns all relationships and properties.
Parameters:
term
(required): The concept to look uplanguage
(default: "en"): Language code for the conceptlimit_results
(default: false): Limit to first 20 results for quick queriestarget_language
(optional): Filter results to specific target languageverbose
(default: false): Return detailed format vs minimal format
2. Concept Query
Advanced querying with sophisticated multi-parameter filtering.
Parameters:
start
(optional): Start concept of relationshipsend
(optional): End concept of relationshipsrel
(optional): Relation type (e.g., "IsA", "PartOf")node
(optional): Concept that must be start or end of edgesother
(optional): Used with 'node' parametersources
(optional): Filter by data sourcelanguage
(default: "en"): Language filterlimit_results
(default: false): Limit to 20 results for quick queriesverbose
(default: false): Return detailed format vs minimal format
3. Related Concepts
Find concepts semantically similar to a given concept using ConceptNet's embeddings.
Parameters:
term
(required): The concept to find related concepts forlanguage
(default: "en"): Language code for input termfilter_language
(optional): Filter results to this language onlylimit
(default: 100, max: 100): Maximum number of related conceptsverbose
(default: false): Return detailed format vs minimal format
4. Concept Relatedness
Calculate precise semantic relatedness score between two concepts.
Parameters:
concept1
(required): First concept for comparisonconcept2
(required): Second concept for comparisonlanguage1
(default: "en"): Language for first conceptlanguage2
(default: "en"): Language for second conceptverbose
(default: false): Return detailed format vs minimal format
Configuration
The server can be configured through environment variables:
Development
Setup
API Reference
Core Models
Concept: Represents a ConceptNet concept with URI, label, and language
Edge: Represents relationships between concepts with relation types
Query: Structured query parameters for concept searches
Response: Standardized response format with pagination support
Client Components
ConceptNetClient: Async HTTP client for ConceptNet API
PaginationHandler: Automatic pagination for large result sets
ResponseProcessor: Data processing and normalization
Utilities
Text Processing: Normalize text (underscores to spaces)
Logging: Structured logging with configurable levels
Error Handling: Comprehensive exception hierarchy
Architecture
Contributing
Fork the repository: https://github.com/infinitnet/conceptnet-mcp
Create a feature branch:
git checkout -b feature-name
Make your changes and add tests
Run the test suite:
python run_tests.py
Submit a pull request
Guidelines
Follow PEP 8 style guidelines
Add type hints for all functions
Include docstrings for public APIs
Write tests for new functionality
Update documentation as needed
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Acknowledgments
ConceptNet for providing the semantic knowledge base
FastMCP for the MCP framework
Model Context Protocol specification
Support
๐ Documentation: Read the docs
๐ Bug Reports: GitHub Issues
๐ฌ Discussions: GitHub Discussions
๐ Author's Website: https://infinitnet.io/
Built with โค๏ธ for the AI and semantic web community.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Provides seamless access to the ConceptNet semantic knowledge graph, enabling concept lookup, search, relationship discovery, and semantic similarity calculations across multiple languages.
Related MCP Servers
- -securityAlicense-qualityEnables Language Models to interact with Notion workspaces through standardized tools for searching, reading, creating, and updating pages and databases.Last updated -116MIT License
- AsecurityAlicenseAqualityProvides tools for listing and retrieving content from different knowledge bases using semantic search capabilities.Last updated -226The Unlicense
- -securityAlicense-qualityProvides knowledge graph functionality for managing entities, relations, and observations in memory with strict validation rules to maintain data consistency.Last updated -16MIT License
- AsecurityFlicenseAqualityProvides tools for managing project knowledge graphs, enabling structured representation of projects, tasks, milestones, resources, and team members.Last updated -610