Akib Dabgar MCP Server
by akib-dabgar
README.md
# Akib Dabgar MCP Server
A production-ready, TypeScript-based **Model Context Protocol (MCP)** server built for **Akib Dabgar**. The server acts as a structured personal knowledge hub, allowing LLM clients (such as Claude Desktop, ChatGPT, Claude Code, and Codex) to query details about Akib's skills, experience, projects, education, and career aspirations.
To maximize context-window efficiency and execution speed, the server implements **Dynamic Context Retrieval (DCR)**, selectively parsing and returning only relevant sections of Akib's profile knowledge base instead of dumping the entire profile into the context.
---
## š Features
- **Dynamic Context Retrieval (DCR):** Implements keyword tokenization and weight-based section scoring to rank and retrieve only the most relevant headings/sections matching the query.
- **MCP Tools:** Exposes a `query_profile` tool that takes natural language queries and returns optimized Markdown snippets.
- **MCP Resources:** Maps all markdown files in the `knowledge/` database to `knowledge://` URIs, enabling client LLMs to read raw content when needed.
- **MCP Prompts:** Exposes an `akib_profile_assistant` prompt that pre-loads system prompt instructions, response policies, and optional topic-specific retriever context.
- **TypeScript ESM Architecture:** Clean, modular, typed codebase utilizing modern Node.js and ES Modules.
---
## š Folder Structure
```text
āāā knowledge/
ā āāā dcr/ # DCR architecture specifications
ā ā āāā overview.md
ā ā āāā retrieval-strategy.md
ā ā āāā ranking-rules.md
ā ā āāā query-examples.md
ā ā āāā response-policy.md
ā ā āāā limitations.md
ā āāā about.md # Core bio, location, professional summary
ā āāā skills.md # Technical and soft skills
ā āāā projects.md # Akib's project history (ChainIT Pay, etc.)
ā āāā experience.md # Work experience details (eSparkBiz)
ā āāā education.md # Saurashtra University degree
ā āāā career-goals.md # Professional goals
ā āāā interests.md # Architecture, scalable systems, AI
ā āāā faq.md # Common questions & answers
āāā src/
ā āāā retriever/
ā ā āāā DynamicContextRetriever.ts # DCR query analysis and section ranking
ā āāā services/
ā ā āāā KnowledgeService.ts # Markdown loader and segment parser
ā āāā tools/
ā ā āāā index.ts # Tool schema definitions and handlers
ā āāā index.ts # Server entry point, transport & handlers
āāā package.json
āāā tsconfig.json
āāā README.md # Project documentation (this file)
```
---
## š ļø Getting Started
### Prerequisites
- [Node.js](https://nodejs.org/) (v18.0.0 or higher recommended)
- npm (v9.0.0 or higher)
### Installation
Clone the repository and install the dependencies:
```bash
npm install
```
### Build
Compile the TypeScript codebase to the `build/` directory:
```bash
npm run build
```
---
## āļø Running the Server
Start the MCP Server on standard I/O (Stdio):
```bash
npm start
```
For development with hot-reloading:
```bash
npm run dev
```
---
## š Client Configuration
To connect this server to commonly used MCP clients:
### 1. Claude Desktop
Add the server configuration to your `claude_desktop_config.json` (located at `%APPDATA%\Claude\claude_desktop_config.json` on Windows or `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
```json
{
"mcpServers": {
"akib-profile-server": {
"command": "node",
"args": [
"d:/text/jpg/Projects/knowledge/build/index.js"
],
"env": {}
}
}
}
```
### 2. Cursor IDE
1. Open Cursor Settings -> **Features** -> **MCP**.
2. Click **+ Add New MCP Server**.
3. Fill in the configuration:
- **Name:** `Akib Profile Server`
- **Type:** `stdio`
- **Command:** `node d:/text/jpg/Projects/knowledge/build/index.js`
4. Click **Save**.
### 3. Claude Code (CLI)
Add the server using the `mcp` command:
```bash
claude mcp add akib-profile-server node d:/text/jpg/Projects/knowledge/build/index.js
```
---
## š How to Test
### Using the MCP Inspector
You can test the server interactively by running the MCP Inspector:
```bash
npx @modelcontextprotocol/inspector node build/index.js
```
### Manual Verification via Stdio
You can verify the JSON-RPC interface by piping requests to stdin:
1. **List Tools:**
```bash
echo {"jsonrpc":"2.0","method":"tools/list","id":1,"params":{}} | node build/index.js
```
2. **Query Profile (DCR in action):**
```bash
echo {"jsonrpc":"2.0","method":"tools/call","id":2,"params":{"name":"query_profile","arguments":{"query":"What databases does Akib know?"}}} | node build/index.js
```
3. **List Prompts:**
```bash
echo {"jsonrpc":"2.0","method":"prompts/list","id":3,"params":{}} | node build/index.js
```
4. **Get Prompt:**
```bash
echo {"jsonrpc":"2.0","method":"prompts/get","id":4,"params":{"name":"akib_profile_assistant","arguments":{"topic":"skills"}}} | node build/index.js
```
---
## š” Architectural Highlights
- **Granular Parsing:** `KnowledgeService` splits markdown files by headings, parsing them into indexable `KnowledgeSection` blocks. This ensures high-granularity DCR mapping.
- **Smart Token & Synonym Routing:** `DynamicContextRetriever` tokenizes query keywords, strips stopwords, and uses a keyword-to-file boost matrix combined with bidirectional heading/content string matches.
- **Robust Path Security:** Target resource URIs are normalized and restricted within the root `knowledge/` directory to prevent directory traversal vulnerabilities.
TDQS
A4.1/5.0
Scored across 1 tool
Disambiguation5/5
With only one tool, there is no possibility of ambiguity. The single tool 'query_profile' has a distinct purpose.
Naming Consistency5/5
The single tool follows a clear verb_noun pattern ('query_profile') using snake_case, which is consistent and predictable.
Tool Count3/5
Having only one tool feels thin for a general-purpose server, but it is appropriate for the very narrow scope of querying a single individual's profile. It is borderline between reasonable and too few.
Completeness3/5
The tool only supports querying the profile. While this may be sufficient for the stated read-only purpose, the lack of any update, list, or other operations limits completeness compared to a typical resource toolset.
Maintenance
ActivityStale
ResponsivenessNo issues