tscircuit MCP
https://github.com/charlielockyer-rice/tscircuit-mcp
Built a basic MCP for accessing the tscircuit registry with Claude directly. Should be helpful for more future AI integrations. I have it set up now where I can use Claude Desktop to directly search the registry and return component code.
Claude Code did lots of the heavy lifting - if anyone has any thoughts or comments, please let me know!
GitHub
GitHub - charlielockyer-rice/tscircuit-mcp: An MCP for tscircuit.
An MCP for tscircuit. Contribute to charlielockyer-rice/tscircuit-mcp development by creating an account on GitHub.
31 Replies
Nice!! This is a great initiative. Haven't tried it yet, but would check this out
this is sweet!
Thinking about more ways to make this useful. Question on data structure - is there currently a well-defined mechanism for tracking attributes of a component, like operating voltage, current limits, etc. (stuff you'd see on a datasheet)?
I ask bc this could be useful for queries like "find me a temperature sensor that works with my existing architecture" where the MCP may return lots of options, but making an informed choice requires more info. I could set it up to return basically all the component data and have the LLM try to parse it for info, but not sure how well that will scale. For example:
https://tscircuit.com/imrishabh18/air-quality-sensor#schematic
The schematic notes that this is a 3.3v component, but that's the only place I can find that info in the part description. That's fine for a part like this, but in more complex examples (like microcontrollers with both 3V3 and a 5V VBUS), it might be more difficult to make informed decisions on which part to choose.
Not sure if it already exists, but if we could tie data from part datasheets directly to part data in the registry, that would be a big step forward once the package registry expands to include many more parts.
undefined - tscircuit
A tscircuit component created by imrishabh18
there aren't that many components in the registry yet, you might want to use https://jlcsearch.tscircuit.com which also has an API and return components converted to easyeda using the
easyeda module (which we develop here: https://github.com/tscircuit/easyeda-converter). That would allow people to instantly get full components for any part on jlcI'll do it here guys
so here has been my entire process so far.
Step 1: install tscircuit with init.
Step 2: feed it my requirements document which is a high level PRD that outlines components like esp32 etc.
Step 3: I asked codex to write the entire
index.tsx from the requirements document after reading and understanding ai.txt
Step 4: Now I am asking codex to call categories_list and search_parts to find the part number so it can do the imports for me.
It is at this step that I am running out of context window.
yea the ai.txt/llms.txt is probably too big i think
we need a reduced version
Well it's normally fine
That hasn't been an issue yet
hold on i will try to compress my screen recording and share that
Our docs repo is here: https://github.com/tscircuit/docs
We currently use repomix to generate the llms.txt
GitHub
GitHub - tscircuit/docs: docs, tutorials and guides for tscircuit (...
docs, tutorials and guides for tscircuit (Electronics with React/Typescript) - tscircuit/docs
I'm wondering if we can come up with specific files to include or find some way of reducing the context
i'm sure there's lots of unnecessary stuff being added
I cached the entire sqlite on my machine I think the tool is loading that into context
oh that's not good lol
honestly you should just give it the jlcsearch OpenAPI JSON haha
it can just make search calls to avoid storing the db
the only issue with that is the API doesn't have everything under the sun
GitHub
jlcsearch/docs/openapi.json at main · tscircuit/jlcsearch
Find parts from JLCPCB matching design constraints (resistance values, capacitance, tolerance etc.) - tscircuit/jlcsearch
how would it know how to construct the search query without loading the entire categories list into context?
yea that's really small tho
349KB
Oh ok so then maybe it's search_parts tool that's overloading it
probably smaller if you compress it somehow into a TXT
ok so i took that docs page and told codex to use that after doing categories_list

I think this will be very interesting for you as a use case because I am an idiot 😂
I just have no clue about building boards
nice
yea it's important to make sure people can just drop-in with ai
hmm this seems to be working.
i wonder why it didn't understand this pattern from ai.txt
yea it's not really in the ai.txt 🤷
Oh got it
I assumed
anyways I am just keeping clicking approve
yea we might add a doc on it....
it's sent like 40 requests so far
ig that's a good sign
what did you ask it to build
everything all at once
an entire board with wifi, bluetooth, and uwb, onboard storage, and sensors
haha ok i mean i'm curious
we don't benchmark on boards that are that difficult though
well im happy to share the requirements doc. like I said it's interesting because I have no concept of "hard" haha
yea sure i can take a peek and maybe adjust our benchmarks for more complex boards
we have slowly been tackling harder problems, but there's a lot that can go wrong
I'd like to message you it directly
ok it just finished the api calls and found some parts.
some of my parts I was planning on doing consignment with jlcpcb because they don't stock it but apparently there is a process where you send them module and they can place it
swapping to manual import because i can't figure out cli import or ai import. i just had ai tell me all the part numbers it found from the api calls