gobject-introspection-mcp
Provides tools for querying GTK library metadata including classes, functions, signals, properties, and enumerations through GObject Introspection.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gobject-introspection-mcpfind signals named clicked"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gobject-introspection-mcp
An MCP server that exposes GObject Introspection metadata to coding agents.
It parses the .gir XML files installed on your system and makes every
library, class, function, signal, property, enum member, and struct field
queryable through a standard set of MCP tools.
All data is C-language-oriented: C symbol names, C type strings, header
includes, ownership-transfer semantics (none / container / full),
argument directions (in / out / inout), and GType information.
A SQLite cache (~/.cache/gi-mcp/cache.db) is maintained automatically.
Each namespace is re-parsed only when its .gir file changes on disk.
Requirements
Python 3.11+
lxml(usually already installed system-wide)GIR files — install the
-dev/-develpackages for the libraries you want to introspect, e.g.libgtk-4-dev,libglib2.0-dev
Related MCP server: pyghidra-mcp
Running
With uv (no install required)
# stdio transport — used by Claude Code and VS Code Copilot
uv run --project /path/to/gobject-introspection-mcp gi-mcp
# streamable-HTTP transport (for remote/browser clients)
uv run --project /path/to/gobject-introspection-mcp gi-mcp --transport http --port 8000Installed via pip
pip install --user .
gi-mcp # stdio (default)
gi-mcp --transport http --port 8000Editor integration
VS Code Copilot
Add to .vscode/mcp.json in your workspace (a ready-made file is included):
{
"servers": {
"gi": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "${workspaceFolder}", "gi-mcp"]
}
}
}Claude Code
Add to .claude/settings.json in your project (a ready-made file is included):
{
"mcpServers": {
"gi": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/gobject-introspection-mcp", "gi-mcp"]
}
}
}Switch to Agent mode in Copilot Chat, or start a Claude Code session — the tools listed below will be available automatically.
MCP tools
Tool | Description |
| All installed GIR namespaces with version, shared library, C prefixes, headers, and dependencies |
| All top-level symbols in a namespace; filter by |
| Case-insensitive name substring search across all namespaces |
| Find symbols by C name (e.g. |
| Full details for any top-level symbol — C type, methods, properties, signals, fields, parent, interfaces, headers |
| Methods, constructors, properties, signals, and fields of a class, interface, record, or union |
| Full ancestor chain from a class to the root, including which interfaces each ancestor implements |
| All classes across all namespaces that implement an interface |
| Full signal details: parameters with types and transfer ownership, emission timing, flags, doc |
| Property type, C type, read/write/construct flags, transfer ownership, doc |
| Struct/record/union field: type, C type, pointer flag, readable/writable, doc |
| Enum or flags member: integer value, C macro name (e.g. |
| Callback typedef: full parameter list with directions and transfer, return type, GError flag |
| Find signals by name substring — answers "which class emits |
| Find properties by name substring across all types |
| Top-level constant: value, C macro name, type, headers |
| All deprecated symbols in a namespace, optionally filtered by kind |
Example queries
list_namespaces
→ [{namespace: "GLib", version: "2.0", headers: ["glib.h"], ...}, ...]
get_symbol_details("GObject", "Object")
→ {name: "Object", c_type: "GObject", gtype_name: "GObject",
headers: ["glib-object.h"], methods: [...], signals: [...], ...}
get_signal("GObject", "Object", "notify")
→ {name: "notify", when: "first", callable: {parameters: [{name: "pspec", ...}]}}
search_signals("clicked")
→ [{signal_name: "clicked", defined_on: "Button", namespace: "Gtk", ...}, ...]
get_enum_member("Gtk", "Align", "fill")
→ {name: "fill", value: 0, c_identifier: "GTK_ALIGN_FILL", kind: "enumeration"}
search_by_c_identifier("g_object_ref")
→ [{c_identifier: "g_object_ref", name: "ref", kind: "method",
defined_on: "Object", namespace: "GObject"}]
get_inheritance_chain("Gtk", "Button")
→ {name: "Button", parent: "Gtk.Widget", implements: ["Gtk.Actionable", ...],
ancestors: [{name: "Widget", ...}, {name: "Object", namespace: "GObject"}]}Cache
Parsed data is stored in $XDG_CACHE_HOME/gi-mcp/cache.db (default
~/.cache/gi-mcp/cache.db). Each namespace is a set of rows in a SQLite
database — one row for namespace metadata and one row per symbol — keyed by
namespace name and the .gir file's modification time. Stale entries are
replaced automatically; no manual cache management is needed.
Override the cache location via XDG_CACHE_HOME. Override which .gir
directories are searched via GIR_PATH (colon-separated).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/TingPing/gobject-introspection-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server