Accesses tscircuit packages published to npm following the format @tsci/author.package-name, allowing retrieval of component source code and implementation details.
Interacts with the tscircuit electronics component registry, which is based on TypeScript, enabling access to component specifications, footprints, and compatibility information.
tscircuit MCP Server
A Model Context Protocol (MCP) server that provides Claude with access to the tscircuit electronics component registry. This enables Claude to search, browse, and analyze electronic components and circuit packages from the tscircuit ecosystem.
Features
Component Search: Search for electronic components by name, type, or description
Package Details: Get comprehensive information about tscircuit packages
Source Code Access: Retrieve component source code and implementation details
Component Analysis: Analyze electrical specifications, footprints, and compatibility
Caching: Built-in response caching for improved performance
Error Handling: Robust error handling with meaningful error messages
Installation
Prerequisites
Bun 1.0.0 or higher
Alternatively, Node.js 18.0.0 or higher with npm
Setup
Clone or download this repository
Install dependencies:
Build the project:
Test the server:
Development
For development with hot reload:
For type checking:
Usage with Claude Desktop
Configuration
Add the following to your Claude Desktop MCP configuration file:
On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Or if you prefer to use Node.js:
Replace /path/to/tscircuit-mcp
with the actual path to your installation.
Available Resources
The MCP server provides these resources that Claude can read:
Search Components
URI:
tscircuit://packages/search?q={query}&limit={limit}&category={category}
Description: Search results from tscircuit registry
Parameters:
q
(required): Search querylimit
(optional): Maximum results (default: 10)category
(optional): Component category filter
Package Details
URI:
tscircuit://packages/{packageName}
Description: Detailed package information
Example:
tscircuit://packages/seveibar/red-led
Package Source Code
URI:
tscircuit://packages/{packageName}/code?version={version}
Description: Component source code
Parameters:
version
(optional): Specific version (defaults to latest)
Available Tools
Claude can use these tools to interact with the tscircuit registry:
search_components
Search for electronic components in the tscircuit registry.
Parameters:
query
(string, required): Search termslimit
(number, optional): Maximum results (default: 10)category
(string, optional): Component category filter
Example:
get_package_details
Get detailed information about a specific tscircuit package.
Parameters:
packageName
(string, required): Full package name
Example:
get_package_code
Retrieve the source code for a tscircuit component.
Parameters:
packageName
(string, required): Package nameversion
(string, optional): Specific version
Example:
analyze_component
Analyze a component's electrical specifications and footprint.
Parameters:
packageName
(string, required): Package to analyze
Example:
Example Usage Scenarios
1. Component Search
Claude Query: "Find me a 3.3V voltage regulator in SOT-23 package"
Claude will use the search_components
tool:
2. Package Analysis
Claude Query: "What are the specifications of the ESP32 module package?"
Claude will use the get_package_details
tool:
3. Code Review
Claude Query: "Show me the implementation of the red LED component"
Claude will use the get_package_code
tool:
4. Component Comparison
Claude Query: "Compare the specifications of these two resistor packages"
Claude will use multiple analyze_component
calls to compare components.
API Reference
tscircuit Registry API
The server integrates with the official tscircuit registry at https://registry-api.tscircuit.com
:
Search:
POST /packages/search
with body{"query": "search term"}
Package Info: Retrieved via search (no direct endpoint yet)
Package Code: Accessed via npm package links
Package names follow the format author/package-name
(e.g., seveibar/usb-c-flashlight
) and are published to npm as @tsci/author.package-name
.
Component Categories
Supported component categories for filtering:
resistor
- Resistorscapacitor
- Capacitorsinductor
- Inductorsdiode
- Diodestransistor
- Transistorsic
- Integrated circuitsconnector
- Connectorsled
- LEDsswitch
- Switchessensor
- Sensorscrystal
- Crystals and oscillatorsrelay
- Relaystransformer
- Transformersfuse
- Fusesbattery
- Batteriesmotor
- Motorsdisplay
- Displaysantenna
- Antennasother
- Other components
Development
Scripts
bun run build
- Build TypeScript to JavaScriptbun start
- Start the MCP serverbun run dev
- Development mode with hot reloadbun test
- Run testsbun run typecheck
- Type checking without compilation
Project Structure
Error Handling
The server includes comprehensive error handling:
Network timeouts and registry downtime
Invalid package names (404 errors)
Malformed requests
API rate limiting
Cache management
Performance Features
Response Caching: 5-minute TTL for registry responses
Request Timeouts: 10-second timeout for API calls
Concurrent Requests: Efficient handling of multiple simultaneous requests
Cache Statistics: Built-in cache monitoring
Troubleshooting
Common Issues
Server won't start: Check Node.js version (requires 18.0.0+)
Connection errors: Verify network connectivity to registry.tscircuit.com
Package not found: Ensure package name is correct and exists in registry
Slow responses: Check network connection and registry status
Debug Mode
Set the DEBUG
environment variable to enable detailed logging:
Cache Management
Clear the cache programmatically:
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests
Submit a pull request
License
MIT License - see LICENSE file for details
Support
For issues and questions:
Check the troubleshooting section above
Review the tscircuit documentation
Open an issue on the project repository
This server cannot be installed
Provides Claude with access to the tscircuit electronics component registry, enabling search, browsing, and analysis of electronic components and circuit packages from the tscircuit ecosystem.
Related MCP Servers
- AsecurityAlicenseAqualityProvides up to date dependency information of Clojure librariesLast updated -3275MIT License
- -securityAlicense-qualityIntegrates with Claude to enable intelligent querying of documentation data, transforming crawled technical documentation into an actionable resource that LLMs can directly interact with.Last updated -1,912Apache 2.0
- AsecurityAlicenseAqualityProvides reference information for Flux UI components, enabling AI assistants to access component documentation and examples from the Flux UI design system.Last updated -41291MIT License
- -securityFlicense-qualityProvides semantic search capabilities over PyTorch documentation, enabling users to find relevant documentation, APIs, code examples, and error messages through Claude Code integration.Last updated -2