Thanks for your interest in contributing! This project bridges Kimi Code with Claude Code via MCP.
感謝你有興趣貢獻!本專案透過 MCP 將 Kimi Code 與 Claude Code 串接。
# Clone the repo
git clone https://github.com/howardpen9/kimi-code-mcp.git
cd kimi-code-mcp
# Install dependencies
npm install
# Run in development mode (auto-recompile)
npm run dev
# Build for production
npm run build- Node.js >= 18
- Kimi CLI installed:
uv tool install kimi-cli - Kimi authenticated:
kimi login
src/
├── index.ts # MCP server + tool definitions
├── kimi-runner.ts # CLI subprocess management
└── session-reader.ts # Session metadata reader
- Create a branch:
git checkout -b feature/your-feature - Make changes in
src/ - Test locally:
# Run the MCP server directly npm run dev # Or build and test with Claude Code npm run build # Then restart Claude Code to pick up changes
- Commit with descriptive messages
- Open a PR
Add to your .mcp.json:
{
"mcpServers": {
"kimi-code": {
"command": "npx",
"args": ["tsx", "/path/to/your/clone/src/index.ts"]
}
}
}Then in Claude Code, use /mcp to verify the server is connected.
To add a new MCP tool:
- Define the tool in
src/index.tsusingserver.tool() - Use Zod schemas for input validation
- Handle errors gracefully (return
isError: truewith message) - Add appropriate timeouts
Example:
server.tool(
'kimi_new_tool',
'Description of what the tool does',
{
param: z.string().describe('Parameter description'),
},
async ({ param }) => {
// Implementation
return { content: [{ type: 'text' as const, text: result }] }
}
)- TypeScript strict mode
- ES modules (
import/export) - Async/await for all async operations
- Descriptive error messages
Please open an issue with:
- Your Node.js version
- Kimi CLI version (
kimi --version) - Error output / logs
- Steps to reproduce
By contributing, you agree your contributions will be licensed under MIT.