cg-agent-kit

cg-agent-kit

Enables AI agents to design hardware by writing C-like HDL and compiling it to Verilog, with real toolchain verification including synthesis checks.

Category
Visit Server

README

cg-agent-kit - an MCP server for FPGA design in C⏚

ci License: MIT

Give an AI agent the ability to design real hardware. cg-agent-kit is a Model Context Protocol server that drives the open-source C⏚ Verilog compiler - so an agent writes a C-like HDL, and the server compiles, checks, generates Verilog, and synthesis-checks it against the real toolchain instead of hallucinating Verilog that doesn't build.

C⏚ ("C-Ground") is a hardware description language with C-like syntax that compiles to clean, standard Verilog. The compiler is open source at github.com/Neosyn-Logic/cg-compiler.

Tools

Tool What it does
cg_check Compile + validate C⏚; structured diagnostics (file:line, the fix)
cg_generate_verilog Emit synthesizable Verilog
cg_simulate Simulate a design (iverilog backend, or the commercial fast sim)
cg_synth Yosys-synthesize the Verilog: REAL / FOLDED / SUSPECT verdict + cell count
cg_example Scored lookup into a curated, validated-code dictionary (18 entries)
cg_suggest_for_error Map a compiler error to the recipe with the fix pattern
cg_fsm / cg_graph A task's compiled state machine / a network's graph
cg_docs C⏚ language + patterns reference

The kit's organizing idea: agents seed-and-adapt from validated code and verify against the real compiler at every step - not invent-from-scratch.

Open vs commercial

This kit and the compiler it drives are open. The fast (bytecode) cycle-accurate simulator is part of the commercial Neosyn SDK - so cg_simulate's default bytecode backend asks you to upgrade, while the iverilog backend works fully (generate Verilog + run Icarus Verilog). Everything else - check, generate, synth, the dictionary, docs - runs entirely on the open compiler. More at neosyn.io/open.

Setup

  1. Build the open compiler jar from cg-compiler:
    cd releng && mvn install -DskipTests && cd lsp-server && mvn package
    
  2. Point the kit at it and install the MCP dependency:
    export CG_JAR=/path/to/cg-compiler/releng/lsp-server/target/cg-language-server.jar
    pip install -r requirements.txt
    
  3. (Optional, for cg_synth / the iverilog backend) install yosys and iverilog.

Run

As an MCP server (for Claude Desktop, Cursor, or any MCP client):

python cg_mcp_server.py

Or call the verification functions directly - they use only the stdlib:

import cg_mcp_server as cg
print(cg.check(open("Counter.cg").read()))
print(cg.generate(open("Counter.cg").read()))

See examples/ for 18 validated C⏚ designs and cg_context.md / cg_riscv.md for the language + CPU-pattern references the cg_docs tool serves.

License

MIT - see LICENSE. C⏚ began as the Synflow Cx toolchain.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured