Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config
FROM python:3.13-slim

# Set working directory
WORKDIR /app

# Copy project files
COPY . .
Copy link

Copilot AI May 25, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding a .dockerignore to exclude unnecessary files (e.g., docs, tests, local configs) from the build context to reduce image size and build time.

Copilot uses AI. Check for mistakes.

# Install dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --upgrade pip setuptools wheel \
&& pip install .

# Ensure stdout and stderr are unbuffered
ENV PYTHONUNBUFFERED=1

# Default command
CMD ["claudecode", "--transport", "stdio", "--allow-path", "/app"]
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# MCP Claude Code

[![smithery badge](https://smithery.ai/badge/@SDGLBL/claude-code)](https://smithery.ai/server/@SDGLBL/claude-code)
Copy link

Copilot AI May 25, 2025

Choose a reason for hiding this comment

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

[nitpick] The badge uses generic alt text; consider updating it to something more descriptive (e.g., Smithery deployment status badge).

Suggested change
[![smithery badge](https://smithery.ai/badge/@SDGLBL/claude-code)](https://smithery.ai/server/@SDGLBL/claude-code)
[![Smithery deployment status badge](https://smithery.ai/badge/@SDGLBL/claude-code)](https://smithery.ai/server/@SDGLBL/claude-code)

Copilot uses AI. Check for mistakes.

An implementation of Claude Code capabilities using the Model Context Protocol (MCP).

## Overview
Expand Down Expand Up @@ -44,6 +46,14 @@ This project provides an MCP server that implements Claude Code-like functionali

For detailed installation and configuration instructions, please refer to [INSTALL.md](./doc/INSTALL.md).

### Installing via Smithery

To install MCP Claude Code for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@SDGLBL/claude-code):

```bash
npx -y @smithery/cli install @SDGLBL/claude-code --client claude
```

## Security

This implementation follows best practices for securing access to your filesystem:
Expand Down
94 changes: 94 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Smithery configuration file: https://smithery.ai/docs/build/project-config

startCommand:
type: stdio
commandFunction:
# A JS function that produces the CLI command based on the given config to start the MCP on stdio.
|-
(config) => {
const args = [
'--transport', 'stdio',
'--name', 'claude-code'
];
if (config.allowedPaths) {
for (const p of config.allowedPaths) {
args.push('--allow-path', p);
}
}
if (config.agentModel) {
args.push('--agent-model', config.agentModel);
}
if (config.agentMaxTokens !== undefined) {
args.push('--agent-max-tokens', config.agentMaxTokens.toString());
}
if (config.agentApiKey) {
args.push('--agent-api-key', config.agentApiKey);
}
if (config.agentBaseUrl) {
args.push('--agent-base-url', config.agentBaseUrl);
}
if (config.agentMaxIterations !== undefined) {
args.push('--agent-max-iterations', config.agentMaxIterations.toString());
}
if (config.agentMaxToolUses !== undefined) {
args.push('--agent-max-tool-uses', config.agentMaxToolUses.toString());
}
if (config.enableAgentTool) {
args.push('--enable-agent-tool');
}
if (config.commandTimeout !== undefined) {
args.push('--command-timeout', config.commandTimeout.toString());
}
return { command: 'claudecode', args };
}
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
properties:
allowedPaths:
type: array
items:
type: string
default:
- /app
description: List of paths to allow file operations
agentModel:
type: string
description: LLM model name in LiteLLM format
agentMaxTokens:
type: number
default: null
Copy link

Copilot AI May 25, 2025

Choose a reason for hiding this comment

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

The JSON Schema sets type: number but uses default: null, which violates the schema; consider allowing null in the type (e.g., type: ["number","null"]) or providing a numeric default.

Suggested change
default: null
default: 1024

Copilot uses AI. Check for mistakes.
description: Maximum tokens for agent responses
agentApiKey:
type: string
description: API key for the LLM provider
agentBaseUrl:
type: string
description: Base URL for the LLM provider API endpoint
agentMaxIterations:
type: number
default: 10
description: Maximum iterations for agent
agentMaxToolUses:
type: number
default: 30
description: Maximum total tool uses for agent
enableAgentTool:
type: boolean
default: false
description: Enable the agent tool
commandTimeout:
type: number
default: 120
description: Default timeout for command execution (seconds)
exampleConfig:
allowedPaths:
- /workspace
agentModel: openai/gpt-4o
agentMaxTokens: 1024
agentApiKey: sk-xxxxx
agentBaseUrl: https://api.openai.com/v1
agentMaxIterations: 5
agentMaxToolUses: 20
enableAgentTool: false
commandTimeout: 60