mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-18 13:21:55 +00:00
Add mcp http server
This commit is contained in:
@@ -98,18 +98,45 @@ Add to your MCP client configuration:
|
||||
}
|
||||
```
|
||||
|
||||
**OpenCode (`.opencode/mcp.json`):**
|
||||
**OpenCode (`.opencode/mcp.json` or `~/.config/opencode/opencode.json`):**
|
||||
|
||||
*stdio (local process):*
|
||||
```json
|
||||
{
|
||||
"servers": {
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"mcp": {
|
||||
"ask262": {
|
||||
"command": "bun",
|
||||
"args": ["run", "src/mcp-server.ts"]
|
||||
"type": "local",
|
||||
"command": ["bun", "run", "src/mcp-server.ts"],
|
||||
"enabled": true,
|
||||
"environment": {
|
||||
"OLLAMA_HOST": "http://localhost:11434"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*http (stateless JSON server):*
|
||||
```json
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"mcp": {
|
||||
"ask262": {
|
||||
"type": "remote",
|
||||
"url": "http://localhost:3000/mcp",
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Start the HTTP server first:
|
||||
```bash
|
||||
bun run mcp-http # Development
|
||||
ask262-http # After npm install -g
|
||||
```
|
||||
|
||||
### Testing
|
||||
|
||||
Test the MCP server before configuring your client:
|
||||
|
||||
Reference in New Issue
Block a user