Noor MCP Code Assistant

Noor MCP Code Assistant

Bridges Claude Desktop with a local RAG-powered code agent API, enabling context-aware codebase queries and conversation continuity.

Category
Visit Server

README

šŸš€ Noor MCP Code Assistant

MCP (Model Context Protocol) Server that bridges Claude Desktop with your RAG-powered Code Agent API.

Author LinkedIn YouTube Python


šŸ“‹ Overview

This project creates an MCP server that allows Claude Desktop to communicate with your existing RAG Code Agent API running at localhost:8900. When you ask code-related questions in Claude Desktop, it can use this tool to fetch context-aware answers from your codebase.

šŸŽÆ Features

  • āœ… Seamless integration with Claude Desktop
  • āœ… Connects to existing RAG API (/api/chat/rag)
  • āœ… Session management for conversation continuity
  • āœ… Comprehensive error handling
  • āœ… Configurable via environment variables
  • āœ… Ready for future agent extensions (SQL, React, Java)

šŸ—ļø Project Structure

noor_mcp_code_assistant_parent/
ā”œā”€ā”€ env_container/              # Virtual environment
│   ā”œā”€ā”€ bin/
│   ā”œā”€ā”€ lib/
│   └── ...
└── noor_mcp_code_assistant/    # Project source
    ā”œā”€ā”€ mcp_server.py           # Main MCP server
    ā”œā”€ā”€ config.py               # Configuration management
    ā”œā”€ā”€ requirements.txt        # Dependencies
    ā”œā”€ā”€ .env.example            # Environment template
    ā”œā”€ā”€ .env                    # Your configuration (git-ignored)
    └── README.md               # This file

šŸš€ Quick Start

1ļøāƒ£ Create Virtual Environment

Navigate to the parent folder and create the environment:

cd noor_mcp_code_assistant_parent
python3.11 -m venv env_container

Activate the environment:

# Linux/WSL/macOS
source env_container/bin/activate

# Windows PowerShell
.\env_container\Scripts\Activate

2ļøāƒ£ Install Requirements

cd noor_mcp_code_assistant
pip install -r requirements.txt

3ļøāƒ£ Configure Environment Variables

Copy the example file and customize:

cp .env.example .env

Edit .env with your settings:

# Required
RAG_API_BASE_URL=http://localhost:8900
RAG_CHAT_ENDPOINT=/api/chat/rag

# Optional
DEFAULT_SESSION_ID=claude-desktop-session
REQUEST_TIMEOUT=120

4ļøāƒ£ Configure Claude Desktop

Locate your Claude Desktop configuration file:

Windows:

%APPDATA%\Claude\claude_desktop_config.json

(Usually: C:\Users\<YourUsername>\AppData\Roaming\Claude\claude_desktop_config.json)

Add the MCP server configuration:

{
  "mcpServers": {
    "noor-code-assistant": {
      "command": "wsl",
      "args": [
        "-d", "Ubuntu-20.04",
        "--",
        "/home/<your-username>/noor_mcp_code_assistant_parent/env_container/bin/python",
        "/home/<your-username>/noor_mcp_code_assistant_parent/noor_mcp_code_assistant/mcp_server.py"
      ],
      "env": {
        "PYTHONUNBUFFERED": "1"
      }
    }
  }
}

āš ļø Important: Replace <your-username> with your actual WSL username and adjust paths accordingly.

šŸ” Find Your WSL Distribution Name

wsl --list --verbose

Use the exact name shown (e.g., Ubuntu-20.04, Ubuntu, etc.)


5ļøāƒ£ Verify Setup

Step 1: Ensure your RAG API is running:

# In WSL terminal
cd /path/to/your/rag-project
source env_container/bin/activate
uvicorn main:app --reload --port 8900

Step 2: Test the RAG API:

curl -X POST http://localhost:8900/api/chat/rag \
  -H "Content-Type: application/json" \
  -d '{"session_id": "test", "message": "hello"}'

Step 3: Restart Claude Desktop completely (check system tray)

Step 4: The noor-code-assistant tool should now appear in Claude Desktop!


šŸ’¬ Usage Examples

Once configured, you can ask Claude Desktop:

"Use the code assistant to create a C# function that gets employee requests by employee ID"

"Ask the code assistant how pagination is implemented in my project"

"Use code_assistant to show me the DTO structure for Employee entity"


šŸ”® Adding Future Agents

When you're ready to add more agents (SQL, React, Java):

Step 1: Add endpoints to your RAG API

@app.post("/api/sql/agent")
async def sql_agent(request: SQLAgentRequest):
    # Your SQL agent logic
    pass

Step 2: Update .env

SQL_AGENT_ENDPOINT=/api/sql/agent

Step 3: Uncomment tool definitions in mcp_server.py

Look for the commented sql_agent tool and handler, then uncomment them.

Step 4: Restart Claude Desktop


šŸ› Troubleshooting

Issue Solution
MCP server not appearing Check Claude Desktop logs at %APPDATA%\Claude\logs\
Connection refused Ensure RAG API is running on localhost:8900
WSL path issues Use full Linux paths (e.g., /home/user/...)
Python not found Use full path to Python in venv
Timeout errors Increase REQUEST_TIMEOUT in .env

šŸ“‹ View Logs

Claude Desktop Logs:

C:\Users\<YourUsername>\AppData\Roaming\Claude\logs\

Test MCP Server Standalone:

cd noor_mcp_code_assistant
source ../env_container/bin/activate
python mcp_server.py

šŸ“Š Configuration Reference

Variable Default Description
RAG_API_BASE_URL http://localhost:8900 Base URL of your RAG API
RAG_CHAT_ENDPOINT /api/chat/rag Chat endpoint path
DEFAULT_SESSION_ID claude-desktop-session Default session for continuity
REQUEST_TIMEOUT 120 API timeout in seconds

šŸ” Security Notes

  • This MCP server only makes outbound HTTP requests to your local RAG API
  • No sensitive data is stored or logged
  • Session IDs are used only for conversation context
  • All communication happens over localhost

šŸ“„ License

MIT License - Feel free to use and modify!


šŸ‘Øā€šŸ’» Author

Noor Uddin


🌟 Support

If you find this helpful, please:

  • ⭐ Star the repository
  • šŸ“ŗ Subscribe to Noor Codelogics
  • šŸ”— Share with fellow developers

Happy Coding! šŸš€

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured