An MCP (Model Context Protocol) server for accessing Moldova's public procurement data through the MTender API.
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.
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.
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 | 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 | 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.
- 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)
- 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
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- Clone this repository
- Install dependencies:
npm install - Build the server:
npm run build - (Optional) Make the server globally available:
npm link
The MTender OCDS Server can be run in a Docker container, which provides an isolated and consistent environment.
To build the Docker image:
cd mtender-server
docker build -t mtender-mcp-server .To run the server using Docker:
docker run -v $(pwd)/logs:/app/logs mtender-mcp-serverThis command mounts the local logs directory to the container's logs directory, ensuring that logs are persisted on the host machine.
For a more convenient setup, you can use Docker Compose:
cd mtender-server
docker-compose up -dThis will build the image if it doesn't exist and start the container in detached mode.
To stop the container:
docker-compose downThe 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
node build/index.jsOr if you've linked it globally:
mtender-serverThere are several ways to test the server:
The simple-test.js script tests the MTender API directly without using the MCP server:
node simple-test.jsThis is useful for understanding the API structure and verifying that the API is accessible.
The mcp-test.js script demonstrates how to use the server programmatically:
node mcp-test.jsThis 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
The MCP Inspector is a tool for testing MCP servers interactively:
npm run inspectorThis will launch the MCP Inspector connected to this server, allowing you to test the resources and tools through a web interface.
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.
- Edit
~/Library/Application Support/Claude/claude_desktop_config.json(on macOS) or the equivalent path on your operating system. - Add the configuration from the template to the
mcpServersobject in the config file (replace/path/to/mtender-serverwith the actual path to your server). - Restart Claude Desktop.
- 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. - Add the configuration from the template to the
mcpServersobject in the config file (replace/path/to/mtender-serverwith the actual path to your server). - Restart VSCode.
Once integrated, you can access MTender data through natural language queries in your MCP client.
The modular structure makes it easy to add new features:
- For new resources, update the
handlers/resources.tsfile - For new tools, update the
handlers/tools.tsfile - For API client changes, modify the
api/mtender-client.tsfile - For logging improvements, update the
utils/logger.tsfile
Contributions to the MTender OCDS Server are welcome! You can contribute by:
- Forking the GitHub repository
- Creating a feature branch
- Making your changes
- Submitting a pull request
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.
- 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-tendersresource. The tools functionality (search_tenders,get_tender, etc.) works reliably and is the recommended way to access the data.
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"
mtender://latest-tenders- List of the most recent tendersmtender://tender/{ocid}- Tender details by OCIDmtender://budget/{ocid}- Budget details by OCIDmtender://funding/{ocid}- Funding source details by OCID
offset(optional): Pagination offset (ISO date string)limit(optional): Maximum number of results to returndateFrom(optional): Filter tenders from this date (ISO date string)dateTo(optional): Filter tenders until this date (ISO date string)
ocid(required): Open Contracting ID (OCID) of the tenderformat(optional): Response format: 'full' for complete data, 'summary' for key information
ocid(required): Open Contracting ID (OCID) of the budgetformat(optional): Response format: 'full' for complete data, 'summary' for key information
ocid(required): Open Contracting ID (OCID) of the tenderformat(optional): Response format: 'full' for complete data, 'summary' for key information
ocid(required): Open Contracting ID (OCID) of the tendersections(optional): OCDS sections to analyze (array of: "planning", "tender", "awards", "contracts", "implementation")
documentUrl(required): MTender storage URL of the document (must match pattern: ^https://storage\.mtender\.gov\.md/get/[\w-]+-\d+$)
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.