MCP server that exposes the Knora institutional-memory platform to AI agents
Project description
Knora MCP Server
An MCP (Model Context Protocol) server that exposes the full Knora institutional-memory platform to AI agents. Once connected, Claude (or any MCP-compatible agent) can search, query, create, and manage your organisation's knowledge base directly from a conversation.
What the server does
The Knora MCP server wraps the Knora REST API and exposes it as ~80 MCP tools organised into these categories:
| Category | What agents can do |
|---|---|
| Query & Search | Ask natural-language questions (RAG), semantic search, view query history, find documentation gaps |
| Knowledge Management | Create/read/update/delete entries, verify, flag, relate, bulk import/export, manage tags and departments |
| Capture | Quick notes, manual entries, voice upload (Whisper), document upload (PDF/Word/Excel/image), interviews, shift logs |
| Admin | Invite/manage members, update roles, org settings, API keys, webhooks, integrations |
| Analytics | Dashboard overview, bus factor risk, knowledge health score, staleness report, query analytics |
Installation
# From the repo root
pip install -e ./mcp
# Or install directly from the mcp/ directory
cd mcp
pip install -e .
Requirements: Python 3.11+, a running Knora backend.
Configuration
All configuration is via environment variables. No config file is required.
Required — API endpoint
| Variable | Default | Description |
|---|---|---|
KNORA_API_URL |
http://localhost:5001/api/v1 |
Base URL of the Knora REST API |
Required — Authentication (one of the following)
Authentication is resolved in this priority order:
Option 1 — API key (recommended for production)
export KNORA_API_KEY=knora_live_xxxxxxxxxxxxxxxxxxxx
API keys are long-lived and org-scoped. Create one via knora_create_api_key or the Knora web app (Growth plan required).
Option 2 — JWT token
export KNORA_JWT_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Short-lived access token. The client refreshes it automatically when it expires.
Option 3 — Email + password (development)
export KNORA_EMAIL=admin@acme.com
export KNORA_PASSWORD=your-password
The server logs in on startup and acquires a JWT automatically.
Optional — HTTP client tuning
| Variable | Default | Description |
|---|---|---|
KNORA_TIMEOUT |
30 |
Request timeout in seconds |
KNORA_MAX_RETRIES |
3 |
Max retries on 429 / 5xx |
KNORA_RETRY_BACKOFF |
1.0 |
Initial back-off delay in seconds |
Running the server
# Stdio transport — default for agent integrations
python -m knora_mcp
# Equivalent: run the server module directly
python -m knora_mcp.server
# Via the MCP CLI (after pip install)
mcp run knora-mcp
# Direct CLI entry point (after pip install)
knora-mcp
The server communicates over stdio (stdin/stdout), which is the standard transport for Claude Desktop and Claude Code integrations.
Adding to Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"knora": {
"command": "python",
"args": ["-m", "knora_mcp"],
"env": {
"KNORA_API_URL": "https://your-knora-instance.com/api/v1",
"KNORA_API_KEY": "knora_live_xxxxxxxxxxxxxxxxxxxx"
}
}
}
}
If you installed into a virtual environment, use the full path to the Python interpreter:
{
"mcpServers": {
"knora": {
"command": "/path/to/venv/bin/python",
"args": ["-m", "knora_mcp"],
"env": {
"KNORA_API_URL": "https://your-knora-instance.com/api/v1",
"KNORA_API_KEY": "knora_live_xxxxxxxxxxxxxxxxxxxx"
}
}
}
}
Restart Claude Desktop after saving the file.
Adding to Claude Code
Add the server to .claude/settings.json in your project (or ~/.claude/settings.json for global access):
{
"mcpServers": {
"knora": {
"command": "python",
"args": ["-m", "knora_mcp"],
"env": {
"KNORA_API_URL": "https://your-knora-instance.com/api/v1",
"KNORA_API_KEY": "knora_live_xxxxxxxxxxxxxxxxxxxx"
}
}
}
}
Or use the Claude Code CLI:
claude mcp add knora -- python -m knora_mcp
Then set the env vars in your shell before starting Claude Code, or add them to the env block above.
Tool Reference
Query & Search
knora_ask
Ask a natural-language question and receive an AI-generated answer with source citations (RAG). If no relevant knowledge exists, the question is logged as a gap for managers to review.
{
"question": "How do we handle supplier delays?",
"language": "en"
}
Returns { answer, sources[], confidence, language, query_id }.
knora_search
Semantic search — finds entries by meaning, not just keywords. Faster than knora_ask; returns raw entries without generating an answer. Cross-language: an Arabic query finds English entries and vice versa.
{
"query": "onboarding process for new hires",
"limit": 5,
"department": "Engineering"
}
knora_query_history
Return the current user's recent query history.
{ "limit": 50 }
knora_find_gaps / knora_list_gaps
List questions that were asked but could not be answered — these are documentation gaps that should be filled. Requires manager or admin role.
{ "department": "Operations", "limit": 20 }
knora_resolve_gap
Mark a documentation gap as resolved by linking it to a knowledge entry that answers it.
{ "gap_id": "<uuid>", "entry_id": "<uuid>" }
knora_query_analytics
Aggregate query analytics: total queries, answer rate, trending topics, and unanswered questions. Requires admin role and Growth plan.
knora_query_stats
Raw query and gap statistics from a single API call. Requires admin role and Growth plan.
Knowledge Management
knora_list_knowledge / knora_list_entries
List knowledge entries with optional filters and pagination.
{
"status": "active",
"language": "en",
"search": "maintenance",
"per_page": 20
}
Filters: page, per_page, department_id, tag_ids, status (active|archived|needs_review|outdated), visibility, language (ar|en|mixed), confidence (high|medium|low), search.
knora_get_knowledge / knora_get_entry
Fetch a single knowledge entry by UUID with all metadata, tags, department, related entries, and version count.
{ "entry_id": "550e8400-e29b-41d4-a716-446655440000" }
knora_create_knowledge / knora_create_entry
Create a new knowledge entry. Immediately stored — no async processing.
{
"title": "Supplier delay escalation process",
"content": "When a supplier reports a delay of more than 48 hours...",
"language": "en",
"tag_ids": ["<tag-uuid>"],
"department_id": "<dept-uuid>",
"confidence": "high"
}
knora_update_knowledge / knora_update_entry
Update an existing entry. Only supply the fields to change — all others are preserved. A version record is created automatically.
{
"entry_id": "<uuid>",
"content": "Updated content...",
"status": "active"
}
knora_delete_knowledge
Soft-delete (archive) a knowledge entry. Not permanently removed.
{ "entry_id": "<uuid>" }
knora_verify_knowledge / knora_verify_entry
Mark an entry as verified. Verified entries have higher trust and appear first in query results. Requires manager or admin role.
{ "entry_id": "<uuid>" }
knora_flag_knowledge
Flag an entry as needing review — useful when content may be stale, inaccurate, or incomplete.
{ "entry_id": "<uuid>" }
knora_get_versions
List the full version history of a knowledge entry, newest first.
{ "entry_id": "<uuid>" }
knora_relate_entries
Link two knowledge entries as "related". Related entries appear together in query results and the knowledge graph.
{ "entry_id": "<uuid>", "related_entry_id": "<uuid>" }
knora_unrelate_entries
Remove the relationship link between two entries.
{ "entry_id": "<uuid>", "related_id": "<uuid>" }
knora_find_similar
Find entries semantically similar to a given entry using vector embeddings. Results are ranked by cosine similarity.
{ "entry_id": "<uuid>", "limit": 5 }
knora_find_duplicates
Find potential duplicate entries. Supply entry_id to check a specific entry, or omit to trigger an org-wide async scan.
{ "entry_id": "<uuid>", "threshold": 0.92 }
knora_bulk_import
Import multiple entries at once from a JSON array. Requires Growth plan. Each entry must have title and content.
{
"entries": [
{ "title": "Entry A", "content": "..." },
{ "title": "Entry B", "content": "..." }
]
}
knora_export_knowledge
Export all knowledge entries as a JSON array. Requires Growth plan.
{ "status": "active", "language": "en" }
knora_list_tags
List all tags in the organisation.
knora_create_tag
Create a new tag. Requires manager or admin role.
{ "name": "safety", "color": "#FF5733" }
knora_delete_tag
Delete a tag and remove it from all entries. Requires manager or admin role.
{ "tag_id": "<uuid>" }
knora_list_departments
List all departments in the organisation.
knora_create_department
Create a new department. Requires manager or admin role.
{ "name": "Maintenance", "description": "Field maintenance teams" }
knora_update_department
Update a department. Requires manager or admin role.
{ "dept_id": "<uuid>", "name": "Field Maintenance" }
Capture
knora_quick_note
Fastest capture path — store a piece of knowledge immediately. Title is auto-generated if not supplied.
{
"content": "Discovered that the valve seal on unit 7 must be replaced every 6 months, not annually.",
"tags": ["<tag-uuid>"]
}
knora_manual_entry
Create a knowledge entry from user-written content via the capture API (equivalent to the manual entry form in the web app).
{
"title": "Weekly handover checklist",
"content": "...",
"department_id": "<uuid>",
"language": "en"
}
knora_upload_document
Upload a PDF, Word, Excel, or image file. Knora extracts text and creates knowledge entries asynchronously. Poll with knora_check_job.
{
"file_path": "/tmp/maintenance_manual.pdf"
}
Returns { job_id, status }.
knora_check_job
Poll a document or voice capture job for completion. Status: pending → processing → completed | failed. On completion, result_entry_id contains the created entry UUID.
{ "job_id": "<uuid>", "job_type": "document" }
knora_list_document_jobs / knora_get_document_job
List or inspect document capture jobs.
knora_upload_voice
Upload an audio file for voice-to-knowledge processing. Transcribed via Whisper, then Claude extracts structured knowledge. Formats: mp3, mp4, m4a, wav, webm, ogg, flac (max 25 MB).
{ "file_path": "/tmp/interview_recording.m4a" }
knora_list_voice_jobs / knora_get_voice_job
List or inspect voice capture jobs.
knora_list_interview_templates / knora_list_templates
List structured interview templates. Requires Growth plan.
knora_create_template
Create an interview template with ordered questions. Requires manager or admin role and Growth plan.
{
"name": "Maintenance Supervisor Handover",
"role_target": "maintenance_supervisor",
"questions": [
"What incidents occurred during your shift?",
"What equipment is currently out of service?",
"What tasks are pending for the next shift?"
]
}
knora_start_interview
Start a structured interview session. Returns session_id and the first question.
{ "template_id": "<uuid>", "interviewee_id": "<uuid>" }
knora_answer_question
Submit an answer to the current interview question. Returns the next question or status: complete when done.
{
"session_id": "<uuid>",
"answer_text": "Pump 3 was offline for 2 hours due to a seal failure.",
"question_index": 0
}
knora_complete_session
Complete an interview session and trigger asynchronous knowledge extraction. Claude processes all answers and creates knowledge entries.
{ "session_id": "<uuid>" }
knora_create_shift_log
Create a supervisor shift-end log (saved as draft). Requires Growth plan.
{
"shift_date": "2026-06-01T08:00:00",
"notes": "Replaced seal on unit 7. Pump 3 back online by 10:30.",
"department_id": "<uuid>"
}
knora_submit_shift_log
Submit a shift log and trigger asynchronous knowledge extraction. Cannot be edited after submission.
{ "log_id": "<uuid>" }
Admin
knora_get_me
Return the authenticated user's profile.
knora_update_me
Update the authenticated user's name or department.
{ "name": "Baraa Al-Rashid", "department": "Engineering" }
knora_invite_member
Invite a new user to the organisation. Requires admin or manager role.
{
"email": "new.hire@acme.com",
"name": "Jane Smith",
"role": "member",
"department": "Operations"
}
knora_list_members
List all active members of the organisation.
knora_update_member_role
Change a member's role. Requires admin role.
{ "user_id": "<uuid>", "role": "manager" }
knora_remove_member
Deactivate a member (soft removal). Requires admin role.
{ "user_id": "<uuid>" }
knora_get_org / knora_update_org
Get or update organisation settings (name, default language).
knora_list_connectors
List available integration connectors. Requires admin or manager role.
knora_list_integrations
List active integrations with sync status and last sync timestamp. An organisation may have multiple integrations of the same connector type (e.g. two Slack workspaces).
knora_trigger_sync
Trigger an immediate manual sync for a connected integration. Requires admin role.
{ "integration_id": "<uuid>" }
knora_list_api_keys / knora_create_api_key / knora_revoke_api_key
Manage API keys. The full key value is returned once on creation — save it immediately. Requires Growth plan.
{ "name": "Claude Code integration" }
knora_list_webhooks / knora_create_webhook / knora_delete_webhook
Manage webhook endpoints for real-time event notifications. Events: knowledge.created, knowledge.updated, knowledge.deleted, member.invited, member.removed, query.asked. Requires Growth plan.
{
"url": "https://your-service.com/hooks/knora",
"events": ["knowledge.created", "query.asked"]
}
Analytics
knora_dashboard
Quick dashboard snapshot: total_entries, total_users, health_score, recent_activity. Requires admin or manager role and Growth plan.
knora_dashboard_overview
Full dashboard data including query counts and all activity metrics.
knora_dashboard_activity
Recent activity feed: entry creates, verifications, queries, flags.
{ "limit": 20 }
knora_dashboard_departments
Per-department statistics: entry count, coverage percentage, risk level.
knora_dashboard_trending
Most frequently asked questions in the last N days.
{ "days": 7 }
knora_bus_factor
Organisation-wide bus factor risk analysis: risk overview, critical-risk people, and per-department scores. Requires admin or manager role and Growth plan.
knora_bus_factor_overview
Raw bus factor summary for the whole organisation.
knora_bus_factor_person
Bus factor risk score for a specific person, including what knowledge they exclusively own.
{ "user_id": "<uuid>" }
knora_bus_factor_department
Bus factor risk breakdown for a specific department.
{ "dept_id": "<uuid>" }
knora_bus_factor_critical
Only the people and departments at CRITICAL risk level — use for dashboard alerts.
knora_staleness_report
Knowledge staleness report: entries not reviewed within the threshold window, plus aggregate stats.
{ "days": 30 }
Returns { stale_entries[], stats: { stale_count, total_entries, review_rate } }.
knora_health_score
Knowledge health score (0–100) broken into: coverage, freshness, verification rate, gap rate. Requires admin or manager role and Growth plan.
knora_get_graph
Knowledge graph: nodes (entries), edges (relationships), and clusters (topic groupings). Optionally filter by department.
{ "max_nodes": 100, "department": "<uuid>" }
knora_auto_link
Trigger automatic linking of semantically similar entries via a background task. Requires admin or manager role.
knora_plan_info
Current subscription plan, usage, limits, and trial days remaining.
knora_health
Check whether the Knora backend is reachable. No authentication required.
Example workflows
Research + capture loop
1. knora_ask("What is our current process for X?")
2. knora_search("X process", limit=5) # find related entries
3. knora_quick_note("Learned today: ...") # capture new insight
4. knora_relate_entries(new_id, related_id) # link to existing entries
Knowledge audit
1. knora_dashboard() # health overview
2. knora_staleness_report(days=60) # find stale content
3. knora_find_gaps() # find missing documentation
4. knora_bus_factor_critical() # find knowledge silos
Document ingestion
1. knora_upload_document(file_path="/tmp/manual.pdf")
2. knora_check_job(job_id=...) until status=="completed"
3. knora_get_entry(entry_id=result_entry_id)
4. knora_verify_entry(entry_id=...)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file knora_mcp-0.2.0.tar.gz.
File metadata
- Download URL: knora_mcp-0.2.0.tar.gz
- Upload date:
- Size: 34.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c196a10af51e7d656cce2a4c83b7c306fe12a63209d3c33d54c6debd992bbb2c
|
|
| MD5 |
dd38de2d96298e7b0ff9a5b835db37f9
|
|
| BLAKE2b-256 |
401825682239e2e06e85c3c0f46cb18423ef70b2f84a398781da30aec84ed4c4
|
File details
Details for the file knora_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: knora_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
700eddd0ab12a7a4c021d3107a7d635dc1b35372c7478f542fc7ff010e165f8f
|
|
| MD5 |
049cf204186b34ae69b071083f6eb237
|
|
| BLAKE2b-256 |
6b9a9296792e2433049fc174742182f6e22231283a792061111e269060893390
|