(feat) MCP Server#1365
Open
bclermont wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
with that I manage goclaw using one of it's agent even better than using the CLI |
cca1bf2 to
599696b
Compare
… with Bearer token auth and X-GoClaw-Tenant-Id header, default to master tenant
The CRUD MCP server's goclaw_skills_update only touched skill DB metadata, with no way to edit a skill's SKILL.md/file content on the filesystem. Extract the versioned write logic from the web UI's skill file editor (SkillsHandler.handleWriteFile) into skills.WriteVersionedFile so both surfaces share identical validation and versioning, and expose it as a new MCP tool. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
f36b7af to
f57c337
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new MCP (Model Context Protocol) server, mounted at /mcp/, exposing goclaw's resource-management surface as MCP tools for external MCP clients. Modeled on the reference implementation at third-party/goclaw-mcp, reusing goclaw's existing
stores/subsystems rather than duplicating business logic.
What's included
quota, chat, llm_complete, logs_tail, send, voices.
request time.
Known limitations (documented in code, not silently missing)
A few tools mirror stub behavior already present in their WS/RPC twins rather than fabricating new capability:
Tests
19 new test files (internal/mcp/crud_*_test.go, internal/gateway/chat_runner_test.go, internal/gateway/mcp_server_token_auth_test.go):
Deliberately left untested (same thin-handler-over-store pattern already validated elsewhere, low marginal risk): agent_links, api_keys, config_permissions, exec_approval, logs, run_timeline, send, teams_tasks, teams_workspace, usage.
Verification
Files changed
New: internal/mcp/crud_{agents,sessions,skills,cron,config,helpers,server,agent_links,api_keys,config_permissions,bitrix,run_timeline,teams,teams_tasks,teams_workspace,channels,hooks,heartbeat,pairing,exec_approval,usage,chat,llm,logs,send,voices}.go +
matching _test.go files, internal/gateway/chat_runner.go + test.
Modified: internal/config/config_channels.go, config_load.go, config_secrets.go, internal/gateway/server.go, cmd/gateway.go, cmd/gateway_methods.go, cmd/gateway_http_wiring.go.
Surface parity