Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

First-class install target + prompt-hook for ZCode (Z.ai)

Open Beginner friendly
#1,535 2 comments 2 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
c, json
Domain
cli, tooling

Research direction

Read the existing target implementations under src/installer/targets/ and the target registry entry mentioned in the issue. Add the ZCode target using the specified config location and mcp.servers.codegraph settings; treat the prompt hook as optional. Verify that codegraph install --target=zcode writes the MCP config, preserving existing settings where applicable.

Written by the indexing model from the issue text.

Description

Request

Add ZCode (Z.ai's coding agent harness, https://zcode.z.ai) as a first-class --target for codegraph install, so codegraph install --target=zcode writes the MCP config automatically.

Related: tracking issue #649 (zcode is already listed there from #962). Opening a dedicated issue to attach the concrete config format and hook details so the target is easier to land.

Why

ZCode is a first-class MCP + hooks-capable agent. Today, ZCode users have to hand-edit the MCP config. CodeGraph works great once configured manually — the ask is just the one-command install target like the other agents have.

What ZCode needs

1. MCP server config (install target)

ZCode reads MCP servers from ~/.zcode/cli/config.json (user scope) or <workspace>/.zcode/config.json (workspace scope), under mcp.servers:

{
  "mcp": {
    "servers": {
      "codegraph": {
        "type": "stdio",
        "command": "codegraph",
        "args": ["serve", "--mcp"],
        "enabled": true,
        "timeoutMs": 60000
      }
    }
  }
}

That's it for MCP — same codegraph serve --mcp as everywhere else. A new file in src/installer/targets/ plus a registry entry, as you noted in #649.

2. (Bonus) UserPromptSubmit prompt-hook

ZCode also exposes a UserPromptSubmit hook that can inject context per turn. If CodeGraph shipped a prompt-hook for ZCode (analogous to what exists for Claude Code), it could inject relevant-symbols context on each prompt. This is optional — the MCP target alone is the main ask.

ZCode hooks docs: https://zcode.z.ai/cn/docs/hooks
ZCode plugin/MCP docs: https://zcode.z.ai/cn/docs/plugin

Config location summary

Scope Path
User ~/.zcode/cli/config.json
Workspace <workspace>/.zcode/config.json

Happy to test a PR on Windows if that helps.

Dominant language
C
Stars
73.2k
Forks
4.7k
Avg merge
2h 13m
Merged PRs (30d)
418

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from colbymchenry/codegraph

All issues in colbymchenry/codegraph

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.