Skip to main content
Glama

Nexar MCP Server

by phuhduong
README.md1.57 kB
# Nexar MCP Server MCP server that provides `search_components` tool for querying Nexar Supply API. Follows [Dedalus Labs MCP Server Guidelines](https://docs.dedaluslabs.ai/server-guidelines). ## Setup 1. **Install dependencies**: ```bash npm install ``` 2. **Set environment variables**: ```bash export NEXAR_CLIENT_ID=your_client_id export NEXAR_CLIENT_SECRET=your_client_secret ``` 3. **Build**: ```bash npm run build ``` 4. **Run server**: ```bash # HTTP transport (production/cloud) npm start # STDIO transport (local development) npm run start:stdio ``` ## Development ```bash # Watch mode with HTTP transport npm run dev # Watch mode with STDIO transport npm run dev:stdio ``` ## Upload to Dedalus After testing locally, upload this repository to Dedalus cloud to get a registry ID (e.g., "username/nexar-mcp"). ## Tool: search_components - **Input**: `{query: string, limit?: number}` - **Output**: Array of PartObject (components from Nexar API) - **Description**: Searches Nexar Supply API for electronic components matching the query ## PartObject Format Matches frontend `types.ts`: - Required: `mpn`, `manufacturer`, `description`, `price` - Optional: `currency`, `voltage`, `package`, `interfaces[]`, `datasheet`, `quantity` ## Architecture Follows Dedalus Labs guidelines: - `src/index.ts` - Main entry point - `src/server.ts` - Server instance creation - `src/client.ts` - Nexar API client - `src/tools/nexar.ts` - Tool definitions - `src/transport/http.ts` - Streamable HTTP transport - `src/transport/stdio.ts` - STDIO transport (dev)

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/phuhduong/nexar-mcp'

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