Skip to content

feat: add Claude MCP server for background task delegation#23

Merged
mudler merged 1 commit intomudler:masterfrom
localai-bot:claude-mcp-server-impl
Mar 4, 2026
Merged

feat: add Claude MCP server for background task delegation#23
mudler merged 1 commit intomudler:masterfrom
localai-bot:claude-mcp-server-impl

Conversation

@localai-bot
Copy link
Contributor

This PR adds a new MCP server in the claude/ directory that provides integration with Claude Code CLI, allowing other MCP clients to delegate tasks to Claude Code in the background.

What's Included

  • Complete MCP Server Implementation: New claude/ directory with full MCP server following the same pattern as opencode
  • Session Management: Tools for starting, monitoring, stopping, and listing Claude sessions
  • Docker Support: Dockerfile for containerized deployment
  • Documentation: Comprehensive README with usage examples, environment variables, and troubleshooting

Key Features

  • Background task delegation to Claude Code
  • Tool restrictions via --allowedTools and --tools flags
  • Full environment variable passthrough
  • Configurable session limits and retention
  • Log access for monitoring progress

Usage

Once merged, users can add this server with:

claude mcp add claude-mcp -- npx -y mudler/MCPs/claude

Or use the Docker image.

Testing

The server builds successfully and includes a binary. Manual testing can be done with the MCP inspector.

Part of issue #8659 (Claude MCP server request).

- Implement new MCP server in claude/ directory
- Supports starting, monitoring, and stopping Claude Code sessions
- Includes Dockerfile for containerized deployment
- Full documentation with usage examples and environment variables
- Follows same pattern as opencode MCP server
- Enables tool restrictions and environment passthrough
)

require (
github.com/google/jsonschema-go v0.4.2 // indirect
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't bring go.mod and go.sum in the Claude sub-folder. There are already go.mod and go.sum at top level of the project. just add the necessary dependencies there

Use the `stop_session` tool to terminate a running session. Use `force=true` to kill immediately.

### Listing Sessions

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the top-level readme

@localai-bot localai-bot moved this to In review in LocalAI Agent team Mar 4, 2026
@mudler mudler merged commit f83c019 into mudler:master Mar 4, 2026
16 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in LocalAI Agent team Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants