MCP ExplorerExplorer

Mcp Mtender Server

@yoda-digitalon 9 months ago
1ย NOASSERTION
FreeCommunity
AI Systems
#ai#js#mcp#typescript#mtender#moldova#tender
"An MCP (Model Context Protocol) server providing access to ๐Ÿ‡ฒ๐Ÿ‡ฉ Moldova's public procurement data through the MTender API. Features include searching tenders, accessing tender details, budget information, and funding sources - all adhering to the Open Contracting Data Standard (OCDS)."

Overview

What is Mcp Mtender Server

The mcp-mtender-server is an MCP (Model Context Protocol) server designed to provide access to Moldovaโ€™s public procurement data via the MTender API. It adheres to the Open Contracting Data Standard (OCDS), enabling users to search for tenders, access detailed tender information, budget data, and funding sources.

Use cases

Use cases include searching for recent tenders, obtaining detailed tender and budget information, analyzing procurement documents for compliance, and integrating procurement data into applications for enhanced decision-making.

How to use

To use the mcp-mtender-server, clone the repository from GitHub, install the necessary dependencies, and build the server. It can also be run in a Docker container for an isolated environment. Users can interact with the server through API endpoints to search and retrieve procurement data.

Key features

Key features include access to the latest tenders, detailed tender information by Open Contracting ID (OCID), budget and funding source data retrieval, and tools for analyzing tenders and fetching tender documents. The server supports full OCDS schema coverage for various components.

Where to use

The mcp-mtender-server is primarily used in the public procurement sector, particularly in Moldova, to facilitate transparency and accessibility of procurement data for government agencies, businesses, and researchers.

Content

MTender MCP OCDS Server

An MCP (Model Context Protocol) server for accessing Moldovaโ€™s public procurement data through the MTender API.

GitHub Repository
Version
License
Node.js
TypeScript
MCP SDK
Status
Docker

Overview

This server provides access to the MTender public procurement system of Moldova, which implements the Open Contracting Data Standard (OCDS). It allows AI assistants to search for tenders, access tender details, budget information, funding sources, and analyze tender documents.

Code Structure

The server is organized into a modular structure for better maintainability:

mtender-server/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ index.ts                  # Main entry point
โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ””โ”€โ”€ mtender-client.ts     # MTender API client with axios
โ”‚   โ”œโ”€โ”€ handlers/
โ”‚   โ”‚   โ”œโ”€โ”€ resources.ts          # Resource handlers
โ”‚   โ”‚   โ”œโ”€โ”€ tools.ts              # Tool handlers
โ”‚   โ”‚   โ””โ”€โ”€ utils.ts              # Shared handler utilities
โ”‚   โ””โ”€โ”€ utils/
โ”‚       โ””โ”€โ”€ logger.ts             # Logging utility
โ”œโ”€โ”€ build/                        # Compiled JavaScript
โ”œโ”€โ”€ logs/                         # Log files
โ”œโ”€โ”€ Dockerfile                    # Docker configuration
โ”œโ”€โ”€ docker-compose.yml           # Docker Compose configuration
โ””โ”€โ”€ .dockerignore                # Docker ignore file

This modular structure makes the code easier to maintain, understand, and extend.

OCDS Schema Coverage

This MCP server provides comprehensive access to the MTender API, which implements the Open Contracting Data Standard. Hereโ€™s the coverage of the OCDS schema:

OCDS Component Support Level Notes
Release Packages โœ… Full Supported through direct API access
Records โœ… Full Supported through direct API access
Planning Section โœ… Full Accessible through budget endpoints
Tender Section โœ… Full Core tender data fully supported
Award Section โœ… Full Included in tender responses
Contract Section โœ… Full Included in tender responses
Implementation Section โš ๏ธ Partial Limited by MTender API capabilities
Organizations/Parties โœ… Full Included in all responses
Items โœ… Full Included in tender, award, contract sections
Values โœ… Full Monetary values with currency information
Periods โœ… Full Date ranges for various process stages
Documents โœ… Full Document references and content extraction
Milestones โœ… Full Process milestones included in responses
Transactions โš ๏ธ Partial Limited by MTender API capabilities
Amendments โœ… Full Changes to processes are tracked
Related Processes โœ… Full Links between related contracting processes

The server provides a complete interface to all data available through the MTender API, making it a full-featured OCDS client within the constraints of the underlying API.

Note on Partial Support: The Implementation Section and Transactions are marked as partial because the MTender system in Moldova currently does not include data for the implementation stage of the contracting process. The MTender API only covers four stages: planning, tender, award, and contract, but does not include contract implementation data. This is a limitation of the underlying API, not of this MCP server.

Features

Resources

  • Latest Tenders: Access the most recent tenders in the MTender system
  • Tender by OCID: Access detailed tender data by Open Contracting ID (OCID)
  • Budget by OCID: Access budget data by Open Contracting ID (OCID)
  • Funding Source by OCID: Access funding source data by Open Contracting ID (OCID)

Tools

  • search_tenders: Search for tenders in the MTender system with pagination and filtering options
  • get_tender: Get detailed information about a specific tender with format options
  • get_budget: Get budget information for a specific tender with format options
  • get_funding_source: Get funding source information for a specific tender with format options
  • analyze_tender: Analyze a tender and extract key information according to OCDS schema
  • fetch_tender_document: Fetch and analyze tender documents (PDF, DOC, DOCX) for AI/LLM analysis

Installation

From GitHub

You can clone the repository directly from GitHub:

git clone https://github.com/yoda-digital/mcp-mtender-server.git
cd mcp-mtender-server
npm install
npm run build

Manual Installation

  1. Clone this repository
  2. Install dependencies:
    npm install
    
  3. Build the server:
    npm run build
    
  4. (Optional) Make the server globally available:
    npm link
    

Docker Setup

The MTender OCDS Server can be run in a Docker container, which provides an isolated and consistent environment.

Building the Docker Image

To build the Docker image:

cd mtender-server
docker build -t mtender-mcp-server .

Running with Docker

To run the server using Docker:

docker run -v $(pwd)/logs:/app/logs mtender-mcp-server

This command mounts the local logs directory to the containerโ€™s logs directory, ensuring that logs are persisted on the host machine.

Using Docker Compose

For a more convenient setup, you can use Docker Compose:

cd mtender-server
docker-compose up -d

This will build the image if it doesnโ€™t exist and start the container in detached mode.

To stop the container:

docker-compose down

Docker Configuration

The Docker setup includes:

  • Multi-stage build for smaller image size
  • Alpine-based Node.js image for minimal footprint
  • Production-optimized dependencies
  • Volume mounting for logs persistence
  • Environment variable configuration

Usage

Running the Server

node build/index.js

Or if youโ€™ve linked it globally:

mtender-server

Testing

There are several ways to test the server:

Testing the MTender API Directly

The simple-test.js script tests the MTender API directly without using the MCP server:

node simple-test.js

This is useful for understanding the API structure and verifying that the API is accessible.

Testing the MCP Server

The mcp-test.js script demonstrates how to use the server programmatically:

node mcp-test.js

This script shows how to:

  • Connect to the server
  • List available resource templates and resources
  • List available tools
  • Search for tenders
  • Get tender details
  • Fetch and analyze tender documents

Interactive Testing with MCP Inspector

The MCP Inspector is a tool for testing MCP servers interactively:

npm run inspector

This will launch the MCP Inspector connected to this server, allowing you to test the resources and tools through a web interface.

Integrating with MCP Clients

A configuration template file (mcp-config-template.json) is provided to help you integrate this server with MCP clients like Claude Desktop or VSCode with the Cline extension.

For Claude Desktop:

  1. Edit ~/Library/Application Support/Claude/claude_desktop_config.json (on macOS) or the equivalent path on your operating system.
  2. Add the configuration from the template to the mcpServers object in the config file (replace /path/to/mtender-server with the actual path to your server).
  3. Restart Claude Desktop.

For VSCode with Cline:

  1. Edit /home/user/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json (just a refference example,example on Linux) or the equivalent path on your operating system.
  2. Add the configuration from the template to the mcpServers object in the config file (replace /path/to/mtender-server with the actual path to your server).
  3. Restart VSCode.

Once integrated, you can access MTender data through natural language queries in your MCP client.

Development

Adding New Features

The modular structure makes it easy to add new features:

  1. For new resources, update the handlers/resources.ts file
  2. For new tools, update the handlers/tools.ts file
  3. For API client changes, modify the api/mtender-client.ts file
  4. For logging improvements, update the utils/logger.ts file

Contributing

Contributions to the MTender OCDS Server are welcome! You can contribute by:

  1. Forking the GitHub repository
  2. Creating a feature branch
  3. Making your changes
  4. Submitting a pull request

Logging

The server includes a comprehensive logging system that writes to files in the logs/ directory. This is useful for debugging and monitoring the serverโ€™s operation.

Known Limitations

  • Resource Timeouts: When accessing resources directly, you may encounter timeout issues due to the large amount of data being processed. This is especially true for the mtender://latest-tenders resource. The tools functionality (search_tenders, get_tender, etc.) works reliably and is the recommended way to access the data.

Example Queries

Here are some example queries you can use with Claude once the server is connected:

  • โ€œShow me the latest tenders from MTenderโ€
  • โ€œGet details for tender ocds-b3wdp1-MD-1613996912600โ€
  • โ€œFind budget information for ocds-b3wdp1-MD-1613996472664โ€
  • โ€œWhat is the funding source for tender ocds-b3wdp1-MD-1613996912600?โ€
  • โ€œSearch for tenders from January 2023 to June 2023โ€
  • โ€œShow me a summary of tender ocds-b3wdp1-MD-1613996912600โ€
  • โ€œAnalyze tender ocds-b3wdp1-MD-1613996912600 and focus on the awards and contracts sectionsโ€
  • โ€œFind tenders with a limit of 10 resultsโ€
  • โ€œAnalyze the tender documents for ocds-b3wdp1-MD-1613996912600โ€

API Reference

Resource URIs

  • mtender://latest-tenders - List of the most recent tenders
  • mtender://tender/{ocid} - Tender details by OCID
  • mtender://budget/{ocid} - Budget details by OCID
  • mtender://funding/{ocid} - Funding source details by OCID

Tool Parameters

search_tenders

  • offset (optional): Pagination offset (ISO date string)
  • limit (optional): Maximum number of results to return
  • dateFrom (optional): Filter tenders from this date (ISO date string)
  • dateTo (optional): Filter tenders until this date (ISO date string)

get_tender

  • ocid (required): Open Contracting ID (OCID) of the tender
  • format (optional): Response format: โ€˜fullโ€™ for complete data, โ€˜summaryโ€™ for key information

get_budget

  • ocid (required): Open Contracting ID (OCID) of the budget
  • format (optional): Response format: โ€˜fullโ€™ for complete data, โ€˜summaryโ€™ for key information

get_funding_source

  • ocid (required): Open Contracting ID (OCID) of the tender
  • format (optional): Response format: โ€˜fullโ€™ for complete data, โ€˜summaryโ€™ for key information

analyze_tender

  • ocid (required): Open Contracting ID (OCID) of the tender
  • sections (optional): OCDS sections to analyze (array of: โ€œplanningโ€, โ€œtenderโ€, โ€œawardsโ€, โ€œcontractsโ€, โ€œimplementationโ€)

fetch_tender_document

  • documentUrl (required): MTender storage URL of the document (must match pattern: ^https://storage.mtender.gov.md/get/[\w-]ยฑ\d+$)

License

Copyright 2025 Ion Nalyk Calmis (Yoda.Digital)

All rights reserved.

Permission is granted to use and distribute this software for personal and non-commercial purposes only.
Modification, redistribution, and commercial use are strictly prohibited without explicit permission from the author.

For more details, see the LICENCE.md file.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers