Bindex MCP Server
Overview
Bindex MCP Server is a standalone Java 17 distribution that combines Bindex Core with the Machai MCP Server runtime. Its executable entry point is org.machanism.machai.mcp.server.McpServer; it exposes Bindex metadata retrieval, registration, and natural-language library recommendation as Model Context Protocol (MCP) tools for compatible AI clients and automation. Bindex Core also supplies a schema resource and a metadata-generation prompt template for hosts that support those capabilities.
Bindex records describe libraries through coordinates, versions, purpose, classification, integrations, dependencies, examples, and configuration. The server can retrieve complete or GraphQL-style filtered descriptors, validate and register records supplied as JSON objects, project-relative files, or remote URLs, and recommend reusable libraries from natural-language requirements. Recommendations combine AI-generated classifications and embeddings with language, architectural-layer, similarity-score, and version-aware filtering over a MongoDB-backed repository.
The Machai MCP runtime discovers and publishes the Bindex tools and handles request routing. With no port configured, the executable communicates over STDIO; when started with --port, it serves MCP over HTTP at /mcp, with optional streamable session support. Bindex Core performs metadata normalization, persistence, retrieval, and semantic discovery, while configured GenAI and embedding services provide classification and vector generation. The Maven project packages Bindex Core and Machai MCP Server as its runtime dependencies and can assemble a self-contained executable JAR.
This distribution module has no src/main/java directory or local package-info.java files. The package responsibilities below are therefore based on the bundled Bindex Core dependency's package documentation, rather than local Java implementations:
org.machanism.machai.bindex.ai.toolssuppliesget_bindex,pick_libraries,register_bindex, andregister_bindex_json, along with the Bindex JSON schema resource and thegenerate-bindexprompt template. Its GraphQL-style filter selects top-level fields; nested selections are parsed but do not recursively trim nested objects.org.machanism.machai.bindex.coreseparates theBindexRepositorypersistence contract fromMongoBindexRepository.Pickerclassifies natural-language requests, generates embeddings, saves descriptors, and resolves dependencies. Recommendations return compactBindexInfosummaries with identifiers, versions, descriptions, and similarity scores.
Together, these capabilities let clients inspect and publish library metadata and discover reusable implementations, reducing duplicate implementation work. The diagram shows the distribution boundary and its interactions with MCP clients, project files, remote descriptors, MongoDB, and configured AI services; the implementation components reside in the bundled dependencies.

Supported AI providers
Bindex registration and semantic recommendations use Machai's GenAI provider abstraction. Model values use the Provider:Model form. Configure the generation or classification model through gw.model or pick.model, and select a compatible embedding model through embedding.model; embedding dimensions must match the MongoDB vector index. OpenAI and compatible CodeMie routes support embeddings; Anthropic, Tools, and None are not substitutes for an embedding provider. Model examples below are identifiers, not guarantees of availability at a particular endpoint.
- OpenAI — Use identifiers such as
OpenAI:gpt-4o-minifor generation andOpenAI:text-embedding-3-smallfor embeddings. SetOPENAI_API_KEY; optionally setOPENAI_BASE_URLfor an OpenAI-compatible endpoint. - Anthropic — Use an identifier such as
Anthropic:claude-3-5-sonnet. SetANTHROPIC_API_KEYto an API key or authorization token; optionally setANTHROPIC_BASE_URL. Supported models can use instructions, function tools, web search, MCP server forwarding, and prompt caching for registered tools. - CodeMie — Use identifiers such as
CodeMie:gpt-4o-mini,CodeMie:claude-3-5-sonnet, orCodeMie:text-embedding-005. SetGENAI_USERNAMEandGENAI_PASSWORD; a username containing@selects the password grant, while another value selects the client-credentials grant. Optionally override the OpenID Connect token endpoint withAUTH_URL. CodeMie obtains an OAuth 2.0 bearer token and routes supported GPT, Gemini, Claude, and embedding model families to the appropriate compatible provider, so direct OpenAI or Anthropic credentials are not required. - Tools — Use
Tools:yamlto invoke registered local Java tool callbacks from a YAML tool-call descriptor. No external AI credentials are required. - None — Use
None:disabledfor a silent no-op provider orNone:logfor lifecycle diagnostics. These modes require no credentials and are suitable for safe defaults and tests.
Common configuration parameters
| Parameter | Description | Default value |
|---|---|---|
| Provider/model identifier | Selects an AI provider and model in Provider:Model form. |
Required |
gw.model |
GenAI model used for classification when pick.model is not set. |
Host/application-defined; classification requires pick.model or gw.model |
pick.model |
Optional model specifically used to classify library-selection requests. | Falls back to gw.model |
embedding.model |
Provider and model used to create vectors for semantic search. | Host/application-defined |
OPENAI_API_KEY |
Credential for OpenAI or an OpenAI-compatible service. | Required when using OpenAI |
OPENAI_BASE_URL |
Base URL override for an OpenAI-compatible API. | OpenAI SDK default |
ANTHROPIC_API_KEY |
API key or authorization token for Anthropic requests. | Required when using Anthropic |
ANTHROPIC_BASE_URL |
Base URL override for an Anthropic-compatible API. | Anthropic SDK default |
GENAI_USERNAME, GENAI_PASSWORD |
Credentials used to authenticate with CodeMie. | Provider-specific |
AUTH_URL |
CodeMie OpenID Connect token endpoint override. | CodeMie default endpoint |
GENAI_TIMEOUT |
AI request timeout in seconds; 0 or an unset value uses SDK behavior. |
0 |
MAX_OUTPUT_TOKENS |
Maximum number of output tokens generated by a model. | 18000 |
MAX_TOOL_CALLS |
OpenAI Responses API tool-call limit; 0 leaves the limit unset. |
0 |
WebSearchTool.type |
Enables provider-specific web search when configured and supported. | Not set |
WebSearchTool.city, WebSearchTool.country, WebSearchTool.region |
Optional user-location hints for provider-specific web search. | Not set |
MCP.url, MCP.name, MCP.authorization, MCP.description |
Defines a provider-visible MCP server; numbered groups such as MCP_1.url add servers. |
Not set |
BINDEX_REPO_URL |
MongoDB URI for Bindex metadata storage and vector search. | mongodb+srv://cluster0.hivfnpr.mongodb.net/?appName=Cluster0 |
BINDEX_USER, BINDEX_PASSWORD |
Optional MongoDB authentication credentials. | Not set |
score / pick.score |
Minimum semantic similarity accepted for recommendations. | 0.85 for the AI tool; 0.86 in built-in pick/assembly acts |
limits / vectorSearchLimits |
Maximum vector-search candidates or recommendations. | 25 |

