@ -1,557 +0,0 @@ MCP Server — Rasepi Developer Docs
MCP · Model Context Protocol

MCP + AI Integration

Connect Rasepi to AI assistants like Claude, GitHub Copilot, or any MCP-compatible client. Your AI gets direct access to fresh, trusted documentation — not stale copies.

📚

Overview

The Rasepi MCP server exposes the full Rasepi API as MCP tools that AI assistants can call directly. Instead of copying docs into prompts, your AI reads live content from Rasepi — with full freshness awareness, translation status, and expiry tracking built in.

🌐 What is MCP?

The Model Context Protocol is an open standard that lets AI assistants call external tools. Claude, GitHub Copilot, and other clients support it natively.

💚 Always Fresh

Your AI reads live data from Rasepi. It sees freshness scores, stale translations, and expiry warnings — so it never cites outdated content.

🛡 Tenant-Scoped

All requests run through the same auth and tenant isolation as the REST API. Your AI only sees what the authenticated user can access.

🚀

Quick Start

Build the MCP server from source, then configure your AI client to use it.

bash
# Clone and build
cd developer/mcp
npm install
npm run build

The build outputs to dist/index.js. Each AI client needs a small JSON config pointing to this file.

🤖

Claude Desktop

Add the following to your claude_desktop_config.json:

json
{
  "mcpServers": {
    "rasepi": {
      "command": "node",
      "args": ["C:\\path\\to\\Rasepi\\developer\\mcp\\dist\\index.js"],
      "env": {
        "RASEPI_API_URL": "http://localhost:5000",
        "RASEPI_API_TOKEN": "dev-token-your-tenant-id:your-user-id"
      }
    }
  }
}

After saving, restart Claude Desktop. You'll see Rasepi tools appear in the tool list. Claude can then query your hubs, read entries, check translation status, and more — all through natural language.

VS Code / GitHub Copilot

Create a .vscode/mcp.json in your workspace:

json
{
  "servers": {
    "rasepi": {
      "command": "node",
      "args": ["${workspaceFolder}/developer/mcp/dist/index.js"],
      "env": {
        "RASEPI_API_URL": "http://localhost:5000",
        "RASEPI_API_TOKEN": "dev-token-your-tenant-id:your-user-id"
      }
    }
  }
}

Copilot will automatically discover the MCP server when you open the workspace. Use @workspace or agent mode to interact with Rasepi tools.

🔌

Other MCP Clients

Any MCP-compatible client that supports stdio transport can connect. The universal config pattern is:

Command

node /path/to/dist/index.js

Transport

stdio — the client spawns the process and communicates over stdin/stdout

Env Variables

RASEPI_API_URL and RASEPI_API_TOKEN must be passed to the process

Environment Variables

VariableDescriptionDefault
RASEPI_API_URLBase URL of the Rasepi APIhttp://localhost:5000
RASEPI_API_TOKENBearer token for authenticationempty
🔒

Authentication

The MCP server authenticates to the Rasepi API using the same Bearer token mechanism as direct API calls.

Dev Token Format

For local development, use the dev token format: dev-token-{tenantId}:{userId}

RASEPI_API_TOKEN=dev-token-550e8400-e29b-41d4-a716-446655440000:user-id-here

In production, use a real JWT issued by your identity provider. The MCP server sends it as Authorization: Bearer <token> on every API call.

📡

Transport

The server uses stdio transport, which is the standard for local MCP integrations. The host application (Claude Desktop, VS Code, etc.) spawns the server process and communicates over stdin/stdout using JSON-RPC messages.

📁

Hubs

ToolDescription
list_hubsList all accessible hubs
get_hubGet a hub by key
get_hub_permissionsGet current user's permissions for a hub
create_hubCreate a new hub Global Admin
update_hubUpdate a hub Hub Admin
delete_hubDelete a hub Owner
transfer_hub_ownershipTransfer hub ownership
📄

Entries

ToolDescription
list_entriesList entries in a hub
get_root_entryGet hub's root/homepage entry
get_entryGet entry by ID (with language option)
create_entryCreate a new entry
update_entryUpdate an entry
delete_entryDelete an entry Owner
publish_entryPublish a draft entry
search_entriesSearch entries by text
get_expired_entriesGet all expired entries
transfer_entry_ownershipTransfer entry ownership
change_original_languageChange entry's original language
set_root_entrySet entry as hub homepage
🌐

Translations

ToolDescription
list_translationsList all translations for an entry
get_translationGet a specific translation
create_translationCreate a translation
delete_translationDelete a translation
get_translation_statusGet translation status (Draft / UpToDate / Stale)
get_stale_blocksGet stale translation blocks
mark_translation_uptodateMark translation as up-to-date

Expiry & Reviews

ToolDescription
get_expiry_configGet entry expiry configuration
get_effective_expiry_templateGet the effective template for an entry
get_expiry_statusGet current expiry status
change_expiry_templateChange expiry template
set_custom_expiry_configSet custom expiry config
clear_custom_expiry_configRevert to template
create_reviewCreate a review
get_review_historyGet review history
get_last_reviewGet most recent review
sign_attestationSign review attestation
get_review_requirementsGet review requirements
renew_entryRenew an entry
get_renewal_eligibilityCheck if entry can be renewed
get_personal_expiry_dashboardPersonal expiry overview
get_tenant_expiry_summaryTenant-wide expiry summary
get_hub_expiry_detailsHub expiry details
get_expiry_warningsGet expiry notifications
acknowledge_notificationAcknowledge a notification
bulk_renew_entriesBulk renew multiple entries
list_expiry_templatesList expiry templates
📑

Templates

ToolDescription
list_templatesSearch/list entry templates
get_template_categoriesGet template categories
get_templateGet template details
get_template_previewPreview template content
apply_templateApply template to get blocks
create_templateCreate a template
update_templateUpdate a template
delete_templateDelete a template
rate_templateRate a template (1–5)
📊

Analytics

ToolDescription
get_entry_analyticsGet entry activity summary
get_entry_eventsGet entry activity events
record_time_spentRecord time spent on entry
get_inactive_entriesGet inactive documents
👥

Access Control

ToolDescription
list_hub_membershipsList hub memberships
add_hub_member_userAdd user to hub
add_hub_member_groupAdd group to hub
remove_hub_membershipRemove hub membership
update_hub_membership_roleChange membership role
list_entry_permissionsList entry permissions
add_entry_permission_userGrant user entry access
add_entry_permission_groupGrant group entry access
remove_entry_permissionRemove entry permission
👤

Users & Groups

ToolDescription
get_current_userGet current user profile
list_usersList tenant users
set_preferred_languageSet preferred language
clear_preferred_languageClear preferred language
list_groupsList all groups
create_groupCreate a group Admin
get_group_membersGet group members
add_group_memberAdd user to group Admin
remove_group_memberRemove from group Admin
🛠

Admin

All admin tools require Global Admin unless noted otherwise.

ToolDescription
list_languagesList tenant languages
get_enabled_languagesGet enabled languages
get_default_languageGet default language
create_languageAdd language
update_languageUpdate language config
set_default_languageSet default language
delete_languageRemove language
list_categoriesList categories
create_categoryCreate category
update_categoryUpdate category
delete_categoryDelete category
list_tagsList all tags
search_tagsSearch tags
create_tagCreate tag
delete_tagDelete tag
list_notification_channelsList notification channels
create_notification_channelCreate channel
update_notification_channelUpdate channel
delete_notification_channelDelete channel
test_notification_channelTest a channel
get_notification_channel_statsGet channel stats
get_hub_rulesGet hub content rules
set_hub_rulesSet hub content rules
get_tenant_rulesGet global tenant rules
set_tenant_rulesSet global tenant rules
get_known_languagesGet all platform languages
create_tenantCreate new tenant
🏗

Architecture

tree
src/
├── index.ts          # Server entry point (stdio transport)
├── client.ts         # HTTP client for Rasepi API
└── tools/
    ├── hubs.ts       # Hub management
    ├── entries.ts    # Entry CRUD & publishing
    ├── translations.ts  # Block-level translations
    ├── expiry.ts     # Expiry, reviews, templates, dashboard
    ├── templates.ts  # Entry templates
    ├── analytics.ts  # Activity analytics
    ├── access.ts     # Hub memberships & entry permissions
    ├── users.ts      # Users & groups
    └── admin.ts      # Languages, categories, tags, channels, rules
💻

Development Mode

During development, you can skip the build step and run directly from TypeScript using tsx:

json
{
  "command": "npx",
  "args": ["tsx", "C:\\path\\to\\Rasepi\\developer\\mcp\\src\\index.ts"],
  "env": {
    "RASEPI_API_URL": "http://localhost:5000",
    "RASEPI_API_TOKEN": "dev-token-your-tenant-id:your-user-id"
  }
}

This uses npx tsx to run TypeScript directly without compiling. Useful for quick iteration, but slightly slower to start than the compiled version.