This is a Next.js app with AI integration for Redmine project management and Git repository analysis. It uses Anthropic's Claude AI with the Model Context Protocol (MCP) for intelligent project assistance.
✅ AI-Powered Chat - Conversational interface with Claude AI ✅ Persistent Conversations - Session management with full history ✅ Permanent Context - Project-specific context loaded into every chat ✅ PII Protection - Automatic detection and redaction of sensitive information ✅ Redmine Integration - Access project tickets and status ✅ Git Analysis - Analyze commits and repository activity ✅ MCP Tools - Extensible tool system for custom integrations
npm installCreate a .env file with:
ANTHROPIC_API_KEY=your_key_here
REDMINE_API_URL=https://your-redmine-instance.com/
REDMINE_API_KEY=your_redmine_key
GIT_DIRECTORY_PATH=C:\path\to\your\reponpm run devOpen http://localhost:3000 with your browser.
# Test Anthropic connection
npx tsx scripts/test-anthropic.ts
# Test chat system
npx tsx scripts/test-chat-system.tscurl -X POST http://localhost:3000/api/chat \
-H "Content-Type: application/json" \
-d '{"message": "What are my open issues?"}'curl -X POST http://localhost:3000/api/chat \
-H "Content-Type: application/json" \
-d '{"message": "Show me issue #123", "sessionId": "YOUR-SESSION-ID"}'curl http://localhost:3000/api/chat┌─────────────────┐
│ Your App │
│ (Next.js UI) │
└────────┬────────┘
│
▼
┌─────────────────┐
│ API Routes │
│ /api/chat │
└────────┬────────┘
│
▼
┌─────────────────┐ ┌──────────────────┐
│ MCP Client │◄────►│ Anthropic API │
│ │ │ (Claude AI) │
└────────┬────────┘ └──────────────────┘
│
▼
┌─────────────────┐
│ MCP Server │
│ - Redmine API │
│ - Git Tools │
└─────────────────┘
| Endpoint | Method | Description |
|---|---|---|
/api/chat |
POST | Send a message (creates or continues session) |
/api/chat |
GET | List all sessions or get specific session |
/api/chat |
DELETE | Delete a session |
/api/chat/new |
POST | Create a new session with metadata |
/api/context |
GET | View permanent context |
/api/context |
POST | Reload context files |
Context files in contexts/ are automatically loaded into every conversation:
system-prompt.md- Defines AI personality and capabilitiesproject-context.md- Your project-specific information
Edit these files to customize the AI's behavior and knowledge.
Conversations are automatically saved to .chat-sessions/:
- Full message history preserved
- Searchable by title and tags
- Can be resumed anytime
- Local storage (not in Git)
Extensible tool system for:
- Redmine API access
- Git repository analysis
- Custom integrations
# Start dev server with hot reload
npm run dev
# Run linting
npm run lint
# Build for production
npm run build
# Start production server
npm start
# Run MCP server standalone
npm run mcp:serverEdit contexts/system-prompt.md to change how the AI responds.
Edit contexts/project-context.md with your project details.
Edit config/anthropic.ts to change:
- Model version
- Temperature
- Max tokens
- Other parameters
Extend lib/mcp-server.ts to add new tools for Redmine, Git, or other integrations.
- Verify
ANTHROPIC_API_KEYin.env - Run
npx tsx scripts/test-anthropic.ts - Check console for errors
- Check
.chat-sessions/directory exists - Verify file permissions
- Check available disk space
- Verify files exist in
contexts/ - Call
POST /api/contextto reload - Check server logs
- No authentication on API routes
- Sessions stored in plain text
- API keys in environment variables
Do not deploy to production without proper security measures.
This is a personal project. Feel free to fork and modify for your needs.
This project is for personal use. Modify as needed.