MCP Hub
Back to servers

abcoder

A structural code analysis framework that converts codebases into a Universal Abstract Syntax Tree (UniAST) to provide deep, local coding context for LLMs.

Stars
310
Forks
42
Tools
5
Updated
Jan 8, 2026
Validated
Jan 9, 2026

ABCoder: AI-Based Coder(AKA: A Brand-new Coder)

ABCoder

Overview

ABCoder, an AI-oriented Code-processing Framework, is designed to enhance and extend the coding context for Large-Language-Model (LLM), finally boosting the development of AI-assisted-programming applications.

Features

  • Universal Abstract-Syntax-Tree (UniAST), a language-independent, AI-friendly specification of code information, providing a boundless, flexible and structural coding context for both AI and humans.

  • General Parser, parses arbitrary-language codes to UniAST.

  • General Writer transforms UniAST back to code.

  • Code-Retrieval-Augmented-Generation (Code-RAG), provides a set of MCP tools to help the LLM understand code repositories precisely and locally. And it can support both in-workspace and out-of-workspace third-party libraries simultaneously -- I guess you are thinking about DeepWiki and context7, but ABCoder is more reliable and confidential -- no need to wait for their services to be done, and no worry about your codes will be uploaded!

Based on these features, developers can easily implement or enhance their AI-assisted programming applications, such as reviewing, optimizing, translating, etc.

Universal Abstract-Syntax-Tree Specification

see UniAST Specification

Quick Start

Use ABCoder as a MCP server

  1. Install ABCoder:

    go install github.com/cloudwego/abcoder@latest
    
  2. Use ABCoder to parse a repository to UniAST (JSON)

    abcoder parse {language} {repo-path} -o xxx.json
    

    ABCoder will try to install any dependency automatically. In case of failure (or if you want to customize installation), refer to the docs.

    For example, to parse a Go repository:

    git clone https://github.com/cloudwego/localsession.git localsession
    abcoder parse go localsession -o /abcoder-asts/localsession.json
    
  3. Integrate ABCoder's MCP tools into your AI agent.

    {
        "mcpServers": {
            "abcoder": {
                "command": "abcoder",
                "args": [
                    "mcp",
                    "{the-AST-directory}"
                ]
            }
        }
    }
    
  4. Enjoy it!

    Try to click and watch the video below:

    MCP

Tips:

Claude Code Integration

ABCoder provides deep integration with Claude Code through the AST-Driven Coding workflow, enabling hallucination-free code analysis and precise execution.

Setup

  1. Install ABCoder Claude Configuration

    Copy docs/.claude/ to your home directory or project root:

    cp -r docs/.claude ~/
    
  2. Configure ABCoder MCP Server

    Configure in Claude Code's ~/.claude.json (the hook uses abcoder parse go/ts . -o ~/.asts/repo.json for the default AST folder):

    {
        "mcpServers": {
            "abcoder": {
                "command": "abcoder",
                "args": ["mcp", "~/.asts"]
            }
        }
    }
    
  3. Configure Hooks

    Claude Code will automatically read hooks from ~/.claude/settings.json to enable:

    • Auto-detect language and generate AST before calling mcp__abcoder tools
    • Display ABCoder workflow SOP to Claude after list_repos
    • Remind to call get_ast_node recursively

AST-Driven Coding Workflow

.claude/hooks provide a 4-layer analysis chain from repository to node details:

list_repos → get_repo_structure → get_package_structure → get_file_structure → get_ast_node
     │              │                      │                       │                    │
     └── repo_name  └── mod/pkg list       └── file list           └── node list        └── dependencies/references

Claude Code Slash Commands

.claude/commands provide three custom slash commands to streamline development:

CommandFunctionDescription
/abcoder:schdDesign implementationAnalyze codebase using ABCoder, design technical solution
/abcoder:task <name>Create coding taskGenerate standardized CODE_TASK document
/abcoder:recheck <task>Verify solutionCritically check CODE_TASK feasibility, useful when a CODE_TASK contains external dependencies

Workflow

User Request
    │
    ▼
/abcoder:schd ──────────→ Design Solution (ABCoder Analysis)
    │                          │
    ▼                          ▼
/abcoder:task ─────────→ CODE_TASK (with Technical Specs, including accurate `get_ast_node` call args)
    │                          │
    ▼                          ▼
/abcoder:recheck ────→ Verify Solution (ABCoder Validation. After `/abcoder:task` Claude Code will tell you what the external dependencies CODE_TASK contains, use `/abcoder:recheck` to analyze external ast_node and technical detail with ABCoder)
    │                          │
    ▼                          ▼
sub-agent ─────────→ Execute Implementation

Configuration Files

FilePurpose
CLAUDE.mdCore AST-Driven Coder role definition
settings.jsonHooks and permissions configuration
hooks/Automation scripts (parse/prompt/reminder)
commands/Slash command definitions (abcoder:task/abcoder:schd/abcoder:recheck)
tmpls/CODE_TASK.mdCoding task template

Dependencies

  • Claude Code CLI
  • abcoder MCP server (provides mcp__abcoder tools)
  • sequential-thinking MCP server (provides mcp__sequential_thinking tools, optional)

For detailed configuration, see docs/.claude/README.md

Watch the demo video here

Use ABCoder as an Agent (WIP)

You can also use ABCoder as a command-line Agent like:

export API_TYPE='{openai|ollama|ark|claude}' 
export API_KEY='{your-api-key}' 
export MODEL_NAME='{model-endpoint}' 
abcoder agent {the-AST-directory}

For example:

$ API_TYPE='ark' API_KEY='xxx' MODEL_NAME='zzz' abcoder agent ./testdata/asts

Hello! I'm ABCoder, your coding assistant. What can I do for you today?

$ What does the repo 'localsession' do?

The `localsession` repository appears to be a Go module (`github.com/cloudwego/localsession`) that provides functionality related to managing local sessions. Here's a breakdown of its structure and purpose:
...
If you'd like to explore specific functionalities or code details, let me know, and I can dive deeper into the relevant files or nodes. For example:
- What does `session.go` or `manager.go` implement?
- How is the backup functionality used?

$ exit
  • NOTICE: This feature is Work-In-Progress. It only supports code analysis at present.

Supported Languages

ABCoder currently supports the following languages:

LanguageParserWriter
Go
RustComing Soon
CComing Soon
PythonComing Soon
JS/TSComing Soon
JavaComing Soon

Getting Involved

We encourage developers to contribute and make this tool more powerful. If you are interested in contributing to ABCoder project, kindly check out our guide:

Note: This is a dynamic README and is subject to changes as the project evolves.

Contact Us

    LarkGroup

Contributors

Thank you for your contribution to ABCoder!

Contributors

License

This project is licensed under the Apache-2.0 License.

Reviews

No reviews yet

Sign in to write a review

abcoder — MCP Server | MCP Hub