opencode-history-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| OPENCODE_DATA_DIR | No | Path to the OpenCode data directory. Overrides auto-detection. Useful when OpenCode data lives in a non-standard location (e.g., on a mounted Windows drive in WSL). |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_historyA | Search past OpenCode conversations by keyword (full-text on user prompts and assistant responses). |
| find_sessions_by_fileA | Find sessions that modified or mentioned a specific file. Searches patch records (files actually changed) and file mentions in text. Uses an indexed file_paths table for fast lookup (<50ms). |
| find_related_workA | Find sessions related to a task description by matching session titles and original user prompts. More precise than search_history for finding sessions on the same topic. |
| get_session_detailA | Get full details of a specific session. Returns metadata, original task (first user prompt), files modified, and the last assistant message. |
| get_session_messagesA | Read the actual messages from a session (paginated). Use this after finding a session with the discovery tools to read its content. Each text part is hard-truncated to 1000 chars to control token budget. Tool calls return only name + status (not output). File/base64 parts are skipped. |
| list_sessionsA | Browse sessions filtered by directory. Root sessions only (sub-agents excluded). |
| get_statsA | Overview statistics: session counts, messages, cost, time range, and distribution. Root vs sub-agent breakdown. Top directories by activity. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/crottolo/opencode-history-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server