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.
# 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:
{
"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:
{
"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
| Variable | Description | Default |
|---|---|---|
| RASEPI_API_URL | Base URL of the Rasepi API | http://localhost:5000 |
| RASEPI_API_TOKEN | Bearer token for authentication | empty |
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
| Tool | Description |
|---|---|
| list_hubs | List all accessible hubs |
| get_hub | Get a hub by key |
| get_hub_permissions | Get current user's permissions for a hub |
| create_hub | Create a new hub Global Admin |
| update_hub | Update a hub Hub Admin |
| delete_hub | Delete a hub Owner |
| transfer_hub_ownership | Transfer hub ownership |
Entries
| Tool | Description |
|---|---|
| list_entries | List entries in a hub |
| get_root_entry | Get hub's root/homepage entry |
| get_entry | Get entry by ID (with language option) |
| create_entry | Create a new entry |
| update_entry | Update an entry |
| delete_entry | Delete an entry Owner |
| publish_entry | Publish a draft entry |
| search_entries | Search entries by text |
| get_expired_entries | Get all expired entries |
| transfer_entry_ownership | Transfer entry ownership |
| change_original_language | Change entry's original language |
| set_root_entry | Set entry as hub homepage |
Translations
| Tool | Description |
|---|---|
| list_translations | List all translations for an entry |
| get_translation | Get a specific translation |
| create_translation | Create a translation |
| delete_translation | Delete a translation |
| get_translation_status | Get translation status (Draft / UpToDate / Stale) |
| get_stale_blocks | Get stale translation blocks |
| mark_translation_uptodate | Mark translation as up-to-date |
Expiry & Reviews
| Tool | Description |
|---|---|
| get_expiry_config | Get entry expiry configuration |
| get_effective_expiry_template | Get the effective template for an entry |
| get_expiry_status | Get current expiry status |
| change_expiry_template | Change expiry template |
| set_custom_expiry_config | Set custom expiry config |
| clear_custom_expiry_config | Revert to template |
| create_review | Create a review |
| get_review_history | Get review history |
| get_last_review | Get most recent review |
| sign_attestation | Sign review attestation |
| get_review_requirements | Get review requirements |
| renew_entry | Renew an entry |
| get_renewal_eligibility | Check if entry can be renewed |
| get_personal_expiry_dashboard | Personal expiry overview |
| get_tenant_expiry_summary | Tenant-wide expiry summary |
| get_hub_expiry_details | Hub expiry details |
| get_expiry_warnings | Get expiry notifications |
| acknowledge_notification | Acknowledge a notification |
| bulk_renew_entries | Bulk renew multiple entries |
| list_expiry_templates | List expiry templates |
Templates
| Tool | Description |
|---|---|
| list_templates | Search/list entry templates |
| get_template_categories | Get template categories |
| get_template | Get template details |
| get_template_preview | Preview template content |
| apply_template | Apply template to get blocks |
| create_template | Create a template |
| update_template | Update a template |
| delete_template | Delete a template |
| rate_template | Rate a template (1–5) |
Analytics
| Tool | Description |
|---|---|
| get_entry_analytics | Get entry activity summary |
| get_entry_events | Get entry activity events |
| record_time_spent | Record time spent on entry |
| get_inactive_entries | Get inactive documents |
Access Control
| Tool | Description |
|---|---|
| list_hub_memberships | List hub memberships |
| add_hub_member_user | Add user to hub |
| add_hub_member_group | Add group to hub |
| remove_hub_membership | Remove hub membership |
| update_hub_membership_role | Change membership role |
| list_entry_permissions | List entry permissions |
| add_entry_permission_user | Grant user entry access |
| add_entry_permission_group | Grant group entry access |
| remove_entry_permission | Remove entry permission |
Users & Groups
| Tool | Description |
|---|---|
| get_current_user | Get current user profile |
| list_users | List tenant users |
| set_preferred_language | Set preferred language |
| clear_preferred_language | Clear preferred language |
| list_groups | List all groups |
| create_group | Create a group Admin |
| get_group_members | Get group members |
| add_group_member | Add user to group Admin |
| remove_group_member | Remove from group Admin |
Admin
All admin tools require Global Admin unless noted otherwise.
| Tool | Description |
|---|---|
| list_languages | List tenant languages |
| get_enabled_languages | Get enabled languages |
| get_default_language | Get default language |
| create_language | Add language |
| update_language | Update language config |
| set_default_language | Set default language |
| delete_language | Remove language |
| list_categories | List categories |
| create_category | Create category |
| update_category | Update category |
| delete_category | Delete category |
| list_tags | List all tags |
| search_tags | Search tags |
| create_tag | Create tag |
| delete_tag | Delete tag |
| list_notification_channels | List notification channels |
| create_notification_channel | Create channel |
| update_notification_channel | Update channel |
| delete_notification_channel | Delete channel |
| test_notification_channel | Test a channel |
| get_notification_channel_stats | Get channel stats |
| get_hub_rules | Get hub content rules |
| set_hub_rules | Set hub content rules |
| get_tenant_rules | Get global tenant rules |
| set_tenant_rules | Set global tenant rules |
| get_known_languages | Get all platform languages |
| create_tenant | Create new tenant |
Architecture
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:
{
"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.