Skip to main content
Glama
sumitdas1984

candidate-eval-api

by sumitdas1984

Candidate Eval API

A lightweight backend service for evaluating candidates against job requirements using FastAPI, asynchronous Python, and MCP (Model Context Protocol).

The project demonstrates how to build a production-style AI/backend service where the same evaluation capabilities can be accessed through both REST APIs and MCP tools.

๐ŸŽฏ Project Overview

Candidate Eval API simulates an AI-powered candidate evaluation system.

A client can submit a candidate and job information, trigger an evaluation, and retrieve the evaluation result through REST APIs.

An AI agent can perform similar operations through MCP tools.

                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚      Client      โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚
                             โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚     FastAPI      โ”‚
                    โ”‚   REST APIs      โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚
                             โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚ Evaluation       โ”‚
                    โ”‚ Service          โ”‚
                    โ”‚                  โ”‚
                    โ”‚ Async Processing โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ–ฒ
                             โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚   MCP Server     โ”‚
                    โ”‚                  โ”‚
                    โ”‚ MCP Tools        โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Related MCP server: MCP Job Matching Server

โœจ Key Features

  • REST APIs built with FastAPI

  • Asynchronous request processing using asyncio

  • Concurrent execution using asyncio.gather()

  • Custom FastAPI middleware

  • Request ID and processing-time tracking

  • Pydantic request/response validation

  • In-memory evaluation storage

  • MCP server with evaluation tools

  • Shared business logic between REST APIs and MCP

  • Basic automated testing with pytest

๐Ÿ› ๏ธ Tech Stack

Technology

Purpose

Python

Application development

FastAPI

REST API framework

Pydantic

Data validation

asyncio

Asynchronous/concurrent processing

MCP

AI-agent tool interface

pytest

Testing

HTTPX

API testing

๐Ÿ“ Repository Structure

candidate-eval-api/
โ”‚
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ main.py          # FastAPI application and REST endpoints
โ”‚   โ”œโ”€โ”€ models.py        # Pydantic models
โ”‚   โ”œโ”€โ”€ service.py       # Evaluation business logic
โ”‚   โ”œโ”€โ”€ middleware.py    # Request middleware
โ”‚   โ””โ”€โ”€ mcp_server.py    # MCP server and tools
โ”‚
โ”œโ”€โ”€ tests/
โ”‚   โ””โ”€โ”€ __init__.py      # Test package
โ”‚
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ .gitignore

The application follows a simple separation of concerns:

API Layer
    โ†“
Service Layer
    โ†“
Data / Storage

Both FastAPI and MCP are intended to use the same service layer rather than duplicating business logic.

๐Ÿš€ Getting Started

1. Clone the repository

git clone <repository-url>
cd candidate-eval-api

2. Create a virtual environment

Windows

python -m venv .venv
.venv\Scripts\activate

Linux / macOS

python -m venv .venv
source .venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Start the FastAPI application

uvicorn app.main:app --reload

The API will be available at:

http://127.0.0.1:8000

Interactive API documentation:

http://127.0.0.1:8000/docs

๐Ÿ”Œ REST API

The application exposes endpoints for managing candidate evaluations.

Create Evaluation

POST /evaluations

Example request:

{
  "candidate_id": "C001",
  "job_id": "J100",
  "skills": [
    "python",
    "fastapi",
    "aws"
  ]
}

Get Evaluation

GET /evaluations/{evaluation_id}

Run Evaluation

POST /evaluations/{evaluation_id}/run

Run Batch Evaluation

POST /evaluations/{evaluation_id}/run-batch

API behavior and implementation are intentionally evolving as the project is developed.

๐Ÿค– MCP Interface

The project also exposes candidate evaluation functionality through MCP.

Planned tools include:

evaluate_candidate

Evaluates a candidate against a job and returns an evaluation result.

get_evaluation

Retrieves an existing candidate evaluation.

The MCP interface allows an AI agent to interact with the evaluation service using structured tools rather than directly calling REST endpoints.

โšก Async Processing

The evaluation workflow demonstrates asynchronous processing.

Independent evaluation operations such as:

Skill Analysis
Resume Analysis
Experience Analysis

can execute concurrently using:

asyncio.gather()

This allows independent I/O-bound operations to execute concurrently instead of sequentially.

๐Ÿงฉ Middleware

Custom middleware is used to provide request-level observability.

Each response can include:

X-Request-ID
X-Process-Time

Example log:

GET /evaluations/E001 - 200 - 0.023s

This provides a foundation for request tracing and performance monitoring.

๐Ÿงช Testing

Tests are implemented using pytest.

Run the test suite with:

pytest

๐Ÿ—บ๏ธ Future Improvements

Potential extensions include:

  • Persistent database storage

  • Authentication and authorization

  • Redis-based caching

  • Background task processing

  • Evaluation queues

  • Retry and timeout handling

  • Structured logging

  • Docker containerization

  • CI/CD pipeline

  • More comprehensive test coverage

  • Real LLM-based candidate evaluation

  • Additional MCP resources and tools

๐Ÿ“Œ Project Status

๐Ÿšง Work in Progress

This project is being developed incrementally to demonstrate practical backend engineering, asynchronous Python, FastAPI, and MCP integration patterns.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Manage Job using MCP: Manage Job, Candidates, Resumes, Salaries all within this one MCP tools It can solve problems like: You have 50 resumes to screen. Your AI assistant can reason about candidates, but it can't: Read PDFs/DOCX โ€” The AI can't open binary files Extract structured data โ€” Copy-pasting loses formatting, metrics, and context Compare at scale โ€” No consistent scoring across candida
    24
    72
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables AI assistants to query Moka recruitment system data including candidates, jobs, pipelines, and talent pools through read-only MCP tools.
    13
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to search, score, and track job applications from ATS boards via MCP, with explainable matching and an append-only application history.
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sumitdas1984/TalentLens'

If you have feedback or need assistance with the MCP directory API, please join our Discord server