NURJAKS/MCP-server
If you are the rightful owner of MCP-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
MCP Server is an intelligent platform for indexing, searching, and analyzing codebases and documentation using AI.
NIA MCP Server
🚀 Intelligent Code Indexing, Search, and Research Platform
A powerful MCP (Model Context Protocol) server that provides intelligent code indexing, search, and research capabilities for Cursor IDE and other MCP-compatible clients.
✨ Features
🔍 Repository Management
- Index GitHub repositories for intelligent code search
- Search codebases using natural language queries
- Monitor indexing progress with real-time status updates
- Manage multiple repositories with easy organization
📚 Documentation Management
- Index web documentation and websites
- Search documentation with semantic understanding
- Crawl and extract content from documentation sites
- Organize documentation sources efficiently
🌐 Web Search & Research
- AI-powered web search for repositories and content
- Deep research capabilities with multi-step analysis
- Academic paper search and analysis
- Social media monitoring and trend analysis
⚙️ Project Initialization
- Setup IDE configurations for multiple editors
- Automated project setup with best practices
- Cross-project compatibility with global configuration
🏗️ Architecture
src/
├── core/ # Core system components
│ ├── indexer.ts # Repository and documentation indexing
│ ├── search.ts # Search engine with AI capabilities
│ ├── database.ts # SQLite database management
│ └── vector-search.ts # Vector search with Qdrant
├── tools/ # MCP tools and integrations
│ ├── repository.ts # Repository management tools
│ ├── documentation.ts # Documentation tools
│ ├── web-search.ts # Web search and research tools
│ └── project.ts # Project initialization tools
├── server.ts # MCP server implementation
└── index.ts # CLI interface
🚀 Quick Start
Prerequisites
- Node.js >= 18.0.0
- Cursor IDE (or other MCP-compatible client)
- Git for repository access
Installation
- Clone the repository
git clone https://github.com/NURJAKS/MCP-server.git
cd MCP-server
- Install dependencies
npm install
- Build the project
npm run build
- Setup environment variables
cp env.example .env
# Edit .env with your API keys (optional)
- Configure Cursor IDE
# Global configuration (works in all projects)
mkdir -p ~/.cursor
cat > ~/.cursor/mcp.json << EOF
{
"mcpServers": {
"nia-mcp-server": {
"command": "node",
"args": ["$(pwd)/bin/cli.mjs", "--stdio"]
}
}
}
EOF
Usage
Start the Server
stdio transport (recommended for Cursor IDE):
node bin/cli.mjs --stdio
HTTP transport:
node bin/cli.mjs --http --port 3000
Development mode:
npm run dev-stdio
Available Commands
# Check server status
node bin/cli.mjs --status
# Get help
node bin/cli.mjs --help
# Setup MCP configuration
node bin/cli.mjs --setup [API_KEY]
🛠️ Available Tools
Repository Management
index_repository(repo_url)- Index GitHub repositorieslist_repositories()- List all indexed repositoriescheck_repository_status(repository)- Check indexing progressdelete_repository(repository)- Remove indexed repositorysearch_codebase(query)- Search indexed codebases
Documentation Management
index_documentation(url)- Index web documentationlist_documentation()- List indexed documentationcheck_documentation_status(source_id)- Check indexing statusdelete_documentation(source_id)- Remove documentationsearch_documentation(query)- Search documentation
Web Search & Research
nia_web_search(query)- AI-powered web searchnia_deep_research_agent(query)- Deep research analysis
Project Setup
initialize_project(project_root)- Setup project configurations
🔧 Configuration
Environment Variables
Create a .env file with your API keys:
# GitHub API (optional - for private repos)
GITHUB_TOKEN=your_github_token_here
# OpenRouter API (optional - for AI search)
OPENROUTER_API_KEY=your_openrouter_api_key_here
# Qdrant Vector Database (optional)
QDRANT_URL=http://localhost:6333
QDRANT_API_KEY=your_qdrant_api_key_here
# Database
DATABASE_URL=sqlite://./data/nia.db
# Rate Limiting
GITHUB_RATE_LIMIT=5000
OPENROUTER_RATE_LIMIT=100
API Keys Setup
GitHub Token (Optional):
- Go to GitHub Settings → Developer settings → Personal access tokens
- Generate a new token with
repoandread:orgscopes - Add to
.envfile
OpenRouter API Key (Optional):
- Sign up at OpenRouter.ai
- Get your API key from the dashboard
- Add to
.envfile
📖 Usage Examples
Index a Repository
// Index a public repository
index_repository("https://github.com/NURJAKS/Todo-list")
// Check indexing status
check_repository_status("NURJAKS/Todo-list")
// Search the codebase
search_codebase("authentication login")
Index Documentation
// Index documentation website
index_documentation("https://docs.example.com")
// Search documentation
search_documentation("API authentication")
Web Research
// Search for repositories
nia_web_search("React authentication libraries")
// Deep research
nia_deep_research_agent("Compare Next.js vs Nuxt.js for e-commerce")
🌍 Cross-Project Usage
The MCP server works globally across all projects:
- Global Configuration: Uses
~/.cursor/mcp.json - Works in any project: No per-project setup needed
- Shared data: All indexed repositories and documentation are shared
Setup for New Projects
# The server works automatically in any project
# Just restart Cursor IDE to load the global config
🔍 Troubleshooting
Common Issues
1. MCP Server shows red in Cursor IDE
# Check if server is running
node bin/cli.mjs --status
# Restart Cursor IDE
# Check global config exists
ls ~/.cursor/mcp.json
2. Tools not available
# Rebuild the project
npm run build
# Check tool registration
node bin/cli.mjs --debug --stdio
3. API rate limits
# Check your API keys in .env
# Reduce rate limits in .env
GITHUB_RATE_LIMIT=1000
OPENROUTER_RATE_LIMIT=50
4. Database issues
# Reset database
rm -rf data/
mkdir data/
npm run build
Debug Mode
# Run with debug output
node bin/cli.mjs --debug --stdio
# Check logs
tail -f *.log
🧪 Development
Project Structure
MCP-server/
├── src/ # Source code
│ ├── core/ # Core functionality
│ ├── tools/ # MCP tools
│ ├── server.ts # MCP server
│ └── index.ts # CLI interface
├── bin/ # Built executables
├── data/ # Database and cache
├── tests/ # Test files
└── docs/ # Documentation
Development Commands
# Build project
npm run build
# Development mode
npm run dev-stdio
# Run tests
npm test
# Lint code
npm run lint
# Type checking
npm run typecheck
Adding New Tools
- Create tool file in
src/tools/ - Export registration function
- Add to
registerToolsSafely()insrc/index.ts - Rebuild project
📊 Performance
Indexing Performance
- Small repos (< 100 files): ~30 seconds
- Medium repos (100-1000 files): ~2-5 minutes
- Large repos (> 1000 files): ~10-30 minutes
Search Performance
- Database search: < 100ms
- Vector search: < 500ms
- Web search: 2-5 seconds
Memory Usage
- Idle: ~50MB
- Indexing: ~200-500MB
- Search: ~100-200MB
🤝 Contributing
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Test thoroughly
npm test
npm run build
- Commit your changes
git commit -m 'Add amazing feature'
- Push to branch
git push origin feature/amazing-feature
- Open a Pull Request
📄 License
This project is licensed under the MIT License - see the file for details.
🆘 Support
- GitHub Issues: Report bugs
- Documentation: Full docs
- Discord: Community support
🙏 Acknowledgments
- Built with Model Context Protocol
- Powered by Cursor IDE
- Vector search with Qdrant
- AI capabilities with OpenRouter
Made with ❤️ by the NIA Team
Version: 0.1.0