An AI-driven coding companion powered by Gemini, LangGraph, and MCP — built for developers who want an intelligent, context-aware terminal assistant.
git clone <repository-url>
cd claude-code
npm install
Create a .env file in the root directory:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/claude_code"
# Gemini API
GEMINI_API_KEY="your_gemini_api_key_here"
# Optional: GitHub Integration
GITHUB_TOKEN="your_github_token_here"
# Optional: Tavily Search API (Free 1000 searches/month, no CC!)
# Get your free key at: https://tavily.com
TAVILY_API_KEY="your_tavily_api_key_here"
npm run db:migrate
npm run build
npm start
Once the assistant is running:
/help - Show available commands/tools - List all connected tools/exit - Exit the applicationYou: read the files in this project and summarize it
You: create a new file called test.js with a hello world function
You: search for TODO comments in all files
claude-code/
├── src/
│ ├── agent/ # LangGraph state machine
│ │ ├── graph.ts # State graph definition
│ │ ├── nodes.ts # Node implementations
│ │ └── state.ts # State schema
│ ├── services/ # Business logic services
│ │ ├── gemini.service.ts # Gemini API integration
│ │ ├── mcp.service.ts # MCP server management
│ │ └── conversation.service.ts # Database operations
│ ├── cli/ # Command-line interface
│ │ └── interface.ts
│ ├── db/ # Database setup
│ │ └── prisma.ts
│ └── index.ts # Application entry point
├── prisma/
│ └── schema.prisma # Database schema
└── package.json
npm run dev # Run in development mode with auto-reload
npm run build # Compile TypeScript to JavaScript
npm start # Run the compiled application
npm run db:migrate # Run database migrations
npm run db:studio # Open Prisma Studio (database GUI)
The assistant connects to the following MCP servers:
Servers are automatically installed via npx when the application starts.
The CLI uses a consistent copper color scheme (#CD6F47) for a professional appearance:
Edit src/index.ts to change the number of messages loaded:
const conversationHistory = await conversationService.getConversationMessages(
conversation.id,
10 // Change this number
);
Edit src/index.ts to add new MCP server connections:
await mcpService.connectServer('server-name', 'npx', [
'-y',
'package-name',
...args,
]);
Contributions are welcome! Please feel free to submit a Pull Request.
[Your License Here]
$ claude mcp add claude-code-clone \
-- python -m otcore.mcp_server <graph>