skosmos-mcp
The skosmos-mcp server provides an MCP interface for AI assistants to browse, search, and traverse SKOS vocabularies via the Skosmos REST API.
Vocabulary Management
list_vocabularies: List all available vocabularies, optionally filtered by language.get_vocabulary: Retrieve metadata and top concepts for a specific vocabulary.
Concept Lookup
get_concept: Full concept details including broader, narrower, and related concepts.get_concept_label/labels: All labels (prefLabel, altLabel, hiddenLabel) for a concept URI.concept_path: Hierarchy path from a concept up to its root.
Search & Discovery
search_concepts: Full-text search across one or all vocabularies, with wildcard, pagination, and language filtering support.autocomplete: Prefix-based concept label suggestions.resolve_label: Map a plain-text label back to matching concept URIs.
Hierarchical & Graph Traversal
broader_concepts,narrower_concepts,related_concepts: BFS traversal up, down, or across concept relationships with configurable depth.traverse_concepts: Mixed BFS traversal combining any combination of broader, narrower, and/or related relationships in one query.All traversal tools include cycle detection and duplicate elimination.
Additional Capabilities
Multi-instance support: All tools accept an optional
server_urlparameter (whenSKOSMOS_TOOL_SERVER_URL_ALLOWED=true) to query different Skosmos instances in the same session.Performance: In-memory caching with configurable TTL, retry logic with exponential backoff, and HTTP timeouts.
Deployment: Supports stdio (local) or HTTP server (remote/web) modes.
Resources: Direct URI-based access via
skosmos://vocabularies,skosmos://{vocid}, andskosmos://{vocid}/{encodedUri}.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@skosmos-mcpsearch for 'climate' in the yso vocabulary"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
skosmos-mcp
A production-quality Model Context Protocol (MCP) server that wraps the Skosmos REST API, enabling AI assistants to navigate and query SKOS vocabularies.
Features
13 MCP tools covering vocabulary browsing, concept lookup, full-text search, label resolution, and BFS traversal
3 MCP resources for direct URI-based access to vocabularies and concepts
BFS traversal engine with configurable depth cap, cycle detection, and duplicate elimination
TTL-based in-memory cache to avoid redundant API calls
Retry logic with exponential backoff for 5xx and network errors
AbortController timeout on every HTTP request
Strict TypeScript (strict mode,
noUncheckedIndexedAccess,exactOptionalPropertyTypes)Zod-validated inputs on all tools
stdio transport — reads from stdin, writes to stdout; all logging goes to stderr
StreamableHTTP transport — HTTP server at
/mcpfor remote or web-based MCP clients
Related MCP server: skill4agent MCP Server
Installation
npm install
npm run buildOr run directly with tsx:
npm run devConfiguration
Copy .env.example to .env and fill in values:
SKOSMOS_BASE_URL=https://skosmos.example.org # required
SKOSMOS_DEFAULT_VOCABULARY= # optional
SKOSMOS_DEFAULT_LANGUAGE=en
SKOSMOS_TIMEOUT=30000
SKOSMOS_USER_AGENT=skosmos-mcp/0.1.0
SKOSMOS_CACHE_TTL=300
SKOSMOS_MAX_TRAVERSAL_DEPTH=3
SKOSMOS_TOOL_SERVER_URL_ALLOWED=falseVariable | Default | Description |
| (required) | Base URL of the Skosmos instance |
| — | Default vocabulary id when not specified in a tool call |
|
| Default language code for labels |
|
| HTTP request timeout in milliseconds |
|
| User-Agent header sent with API requests |
|
| Cache entry TTL in seconds |
|
| Hard cap on BFS traversal depth |
|
| When |
|
| Log level: debug, info, warn, error (written to stderr) |
|
| TCP port for the StreamableHTTP server |
|
| Bind address for the StreamableHTTP server |
MCP Tools Reference
Vocabulary Tools
list_vocabularies
List all available vocabularies.
Parameter | Type | Required | Description |
| string | no | Language code for labels |
get_vocabulary
Get vocabulary metadata and top concepts.
Parameter | Type | Required | Description |
| string | yes | Vocabulary identifier (e.g. |
| string | no | Language code |
Concept Tools
get_concept
Fetch full concept details: labels, broader, narrower, related.
Parameter | Type | Required | Description |
| URL | yes | Concept URI |
| string | no | Vocabulary identifier (required if no default set) |
| string | no | Language code |
get_concept_label
Get all labels for a concept URI.
Parameter | Type | Required | Description |
| URL | yes | Concept URI |
| string | yes | Vocabulary identifier |
| string | no | Language code |
concept_path
Get the hierarchy path from a concept to its root.
Parameter | Type | Required | Description |
| URL | yes | Concept URI |
| string | yes | Vocabulary identifier |
| string | no | Language code |
Search Tools
search_concepts
Full-text search across one or all vocabularies.
Parameter | Type | Required | Description |
| string | yes | Search string (supports trailing |
| string | no | Limit to this vocabulary |
| string | no | Language code |
| integer | no | Max results |
| integer | no | Pagination offset |
autocomplete
Autocomplete concept labels by prefix.
Parameter | Type | Required | Description |
| string | yes | Label prefix |
| string | no | Limit to this vocabulary |
| string | no | Language code |
| integer | no | Max suggestions |
resolve_label
Resolve a label text to concept URIs.
Parameter | Type | Required | Description |
| string | yes | Label text to resolve |
| string | yes | Vocabulary identifier |
| string | no | Language code |
Labels Tool
labels
Get all labels (prefLabel, altLabel, hiddenLabel) for a concept URI.
Parameter | Type | Required | Description |
| URL | yes | Concept URI |
| string | yes | Vocabulary identifier |
| string | no | Language code |
Traversal Tools
All traversal tools use BFS with cycle detection. Depth is capped at Math.min(depth, SKOSMOS_MAX_TRAVERSAL_DEPTH).
broader_concepts
Traverse broader (parent) concepts.
Parameter | Type | Required | Description |
| URL | yes | Starting concept URI |
| string | yes | Vocabulary identifier |
| integer | no | Max traversal depth |
| string | no | Language code |
narrower_concepts
Traverse narrower (child) concepts.
Parameter | Type | Required | Description |
| URL | yes | Starting concept URI |
| string | yes | Vocabulary identifier |
| integer | no | Max traversal depth |
| string | no | Language code |
related_concepts
Traverse related concepts.
Parameter | Type | Required | Description |
| URL | yes | Starting concept URI |
| string | yes | Vocabulary identifier |
| integer | no | Max traversal depth |
| string | no | Language code |
traverse_concepts
BFS using a mix of relationship types.
Parameter | Type | Required | Description |
| URL | yes | Starting concept URI |
| string | yes | Vocabulary identifier |
| array | yes | One or more of: |
| integer | no | Max traversal depth |
| string | no | Language code |
MCP Resources
URI Pattern | Description |
| JSON list of all vocabularies |
| Vocabulary metadata for |
| Concept data (labels, broader, narrower, related) |
Traversal Examples
Get all ancestors of a concept (depth 3)
{
"tool": "broader_concepts",
"args": {
"uri": "http://www.yso.fi/onto/yso/p8966",
"vocabulary": "yso",
"depth": 3,
"lang": "en"
}
}Response includes nodes (with depth), edges (directed relationships), rootUri, and maxDepth.
Mixed traversal (broader + related)
{
"tool": "traverse_concepts",
"args": {
"uri": "http://www.yso.fi/onto/yso/p8966",
"vocabulary": "yso",
"relationships": ["broader", "related"],
"depth": 2
}
}Using Optional Server URL Parameter
All 13 MCP tools support an optional server_url parameter. When SKOSMOS_TOOL_SERVER_URL_ALLOWED=true is set in the environment, you can pass a server_url parameter to any tool to make it query a different Skosmos instance instead of the configured SKOSMOS_BASE_URL.
Example: Query a different Skosmos instance
{
"tool": "get_concept",
"args": {
"uri": "http://www.yso.fi/onto/yso/p8966",
"vocabulary": "yso",
"lang": "en",
"server_url": "https://alternative-skosmos.example.org"
}
}This allows a single MCP session to interact with multiple Skosmos instances. The server_url parameter is:
Optional on all tools
Ignored unless
SKOSMOS_TOOL_SERVER_URL_ALLOWED=true(default:false)Can be any valid URL pointing to a Skosmos instance with a compatible REST API
Why use this feature?
Query multiple Skosmos instances in parallel within a single session
Test against different Skosmos servers without restarting the MCP
Support scenarios where vocabularies are distributed across multiple instances
stdio (standard MCP deployment)
SKOSMOS_BASE_URL=https://skosmos.example.org node dist/index.jsStreamableHTTP
SKOSMOS_BASE_URL=https://skosmos.example.org MCP_HTTP_PORT=3000 node dist/http.jsThe server listens on http://<MCP_HTTP_HOST>:<MCP_HTTP_PORT>/mcp (default: http://127.0.0.1:3000/mcp).
Each POST request is handled as a stateless MCP session (no session ID). The SkosmosClient and CacheManager instances are shared across requests for the lifetime of the process.
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"skosmos": {
"command": "node",
"args": ["/path/to/skosmos-mcp/dist/index.js"],
"env": {
"SKOSMOS_BASE_URL": "https://skosmos.example.org",
"SKOSMOS_DEFAULT_LANGUAGE": "en"
}
}
}
}Development
npm run dev # run with tsx (no build)
npm run typecheck # check types without emitting
npm run test # run tests
npm run test:watch # watch mode
npm run build # compile to dist/
npm run lint # lint src/ and tests/Architecture
MCP Client (AI Assistant)
│ stdio (JSON-RPC)
▼
McpServer (SDK)
├── 13 Tools (Zod-validated)
└── 3 Resources
│
┌────┴────┐
│ │
TraversalEngine CacheManager
(BFS + cycle (TTL, per-type)
detection)
│
SkosmosClient
(fetch + retry
+ timeout)
│
Skosmos REST APIKey Design Decisions
No global mutable state: config, client, cache, and traversal engine are created once in
src/index.tsand passed via dependency injection.BFS traversal: uses a queue (not recursion) to ensure breadth-first ordering and avoid stack overflows.
Depth capping:
Math.min(requestedDepth, config.maxTraversalDepth)is applied in both the traversal engine and tool handlers.Cache keys include all relevant parameters:
vocabulary:${vocid}:${lang},label:${vocab}:${uri}:${lang}, etc.All logging to stderr — stdout is reserved exclusively for MCP JSON-RPC.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jsilvanus/skosmos-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server