使用说明
CHIM MCP Server
An MCP (Model Context Protocol) server that provides AI agents with read-only access to CHIM/HerikaServer and StobeServer runtime data.
Features
- MCP SSE Endpoint: Standard MCP protocol over Server-Sent Events
- Chat Agent API: OpenRouter-powered AI assistant with database tool access
- HerikaServer + StobeServer Integration: Runtime file inspection across both services
- Read-Only Database Access: Safe querying of eventlog, NPCs, memories, oghma, diaries, and arbitrary SQL on
dwemerorstobe
Installation
npm install
npm run build
Configuration
All configuration is stored in the PostgreSQL conf_opts table and managed through the HerikaServer UI:
MCP/enabled- Whether the server should startMCP/port- Port (default: 3100)MCP/model- OpenRouter model identifierMCP/temperature- Model temperature (0-2)MCP/api_badge_id- Referencescore_api_badge.idfor API keyMCP/system_prompt- Optional custom system promptMCP/max_tool_rounds- Max tool-call iterations
Note: custom MCP/system_prompt values are automatically supplemented with StobeServer context unless they already mention StobeServer.
Environment variables in .env:
DB_HOST,DB_PORT,DB_NAME,DB_USER,DB_PASSWORD- Primary DB connection (defaults todwemer)STOBE_DB_NAME- Optional Stobe DB name forrun_querycross-database diagnostics (default:stobe)HERIKA_SERVER_PATH- Optional HerikaServer path overrideSTOBE_SERVER_PATH- Optional StobeServer path override
Running
Development
npm run dev
Production
npm start
As DwemerDistro Service
The service is automatically started by DwemerDistro's start_env script.
Available Tools
query_eventlog- Search dialogue/event historyget_npc- Get full NPC profilelist_npcs- List all NPCssearch_oghma- Search knowledge baseget_memories- Query NPC memoriesget_memory_summaries- Get compressed memory summariesget_diaries- Fetch diary entriesget_speech_log- Query speech/dialogue logget_config- Read config valueslist_connectors- List LLM/TTS/STT/ITT connectorslist_profiles- List CHIM profilesget_quests- Query quest logrun_query- Execute arbitrary read-only SQL (database: dwemer|stobe)
Note: named tools are CHIM/dwemer schema-focused. Use run_query with database: stobe for StobeServer tables.
On migrated servers, get_npc also returns plugin_extended_data as a JSON object keyed by plugin namespace. Nested JSON objects, arrays, and scalar values retain their types. Older servers omit the field. This is read-only access; list_npcs continues returning basic profile summaries.
License
GNU GPLv3 only. See LICENSE and LICENSING.md.