How to integrate Gitea MCP with Pi

Connect Pi to Gitea MCP. List all open issues in your repository, create a new pull request for dev branch, and more using natural language, with authentication handled for you.

Gitea logoGitea
Api Key

Gitea is a lightweight, community-managed code hosting solution written in Go. It offers simple, fast, and self-hosted Git repository management for teams and individuals.

19 Tools

Introduction

Pi is a minimal, self-extensible coding agent that lives in your terminal — one agent loop over Claude, GPT-5, Gemini, Grok, DeepSeek, and 20+ other providers, with maximum extension surface and minimum product opinion. Its core ships four tools (read, write, edit, bash) and self-extends at runtime through skills, extensions, and packages.

This guide explains the easiest and most robust way to connect your Gitea account to Pi. You can do this through either Composio Connect CLI or Composio Connect MCP. Because Pi already runs shell commands as first-class tools and ships no built-in MCP, the CLI is the recommended path — it's faster to set up, needs no server config, and chains multi-step tasks more reliably. The MCP path is also fully supported through Pi's official pi-mcp-adapter extension.

Also integrate Gitea with

What is Composio Connect?

Composio Connect is a consumer offering that lets anyone plug 1,000+ applications directly into their agent harness — including Pi. It can:

  • Search and load tools from relevant toolkits on-demand, reducing context usage.
  • Chain multiple tools to accomplish complex workflows via a remote workbench, without excessive back-and-forth with the LLM.
  • Manage app authentication end-to-end with zero manual overhead.

Connect Gitea to Pi with Composio

Prerequisites: Install Pi

Pi needs Node.js 18+ (Node 22 recommended). Install the agent globally with npm:

bash
npm install -g --ignore-scripts @earendil-works/pi-coding-agent

On Linux or macOS you can use the installer script instead:

bash
curl -fsSL https://pi.dev/install.sh | sh

Then run pi in any project directory and authenticate your model provider — use /login inside Pi for subscription providers (Claude Pro/Max, ChatGPT, GitHub Copilot), or set an API key such as ANTHROPIC_API_KEY before starting. Confirm it's working:

bash
pi --version

Full first-run details are in the Pi Quickstart.

Option 1: Composio CLI (recommended)

Pi runs shell commands as first-class tools, so the Composio Universal CLI is the most natural fit — no MCP server to configure and reliable multi-step tool chaining. Install and authenticate:

bash
# Install the Composio CLI
curl -fsSL https://composio.dev/install | bash

# Log in to Composio
composio login

Connect to Gitea

Ask Pi to connect to Gitea, or simply request any Gitea-related task. Under the hood Pi calls Composio commands like any other shell tool:

bash
composio search "what can I do with Gitea?"
composio link gitea

On the first Gitea call, composio link gitea opens an OAuth prompt so you can authorize access. After that, every Gitea command works with your stored credentials automatically — just talk to Pi and it will search, execute, and chain Gitea tools as needed.

Option 2: Composio MCP

Pi's core intentionally ships no built-in MCP, but the official pi-mcp-adapter extension adds full MCP support — exposing every server through a single lightweight proxy tool (~200 tokens) instead of loading hundreds of tool definitions into context.

1. Install the MCP adapter extension

bash
pi install npm:pi-mcp-adapter

Restart Pi after installation.

2. Add the Composio MCP server

Create (or edit) a .mcp.json file in your project root, or ~/.config/mcp/mcp.json for a user-global setup:

bash
{
  "mcpServers": {
    "composio": {
      "url": "https://connect.composio.dev/mcp"
    }
  }
}

The adapter connects lazily by default — the server won't start until Pi actually calls one of its tools, and cached metadata keeps search and describe working without a live connection.

3. Authenticate

Run /mcp-auth inside Pi to open the authentication modal and select composio from the list. Complete the sign-in in your browser, then on the consent screen click Allow access to authorize Composio. Once approved, the server shows as connected inside Pi:

Pi /mcp-auth modal listing the composio MCP server
Composio OAuth consent screen with the Allow access button
Composio MCP server connected inside Pi

4. Done!

Confirm the server is live with /mcp to open the interactive panel, then ask Pi to connect to Gitea or request any Gitea-related task — it will prompt you to authorize Gitea on first use.

What is the Gitea MCP server, and what's possible with it?

The Gitea MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Gitea account. It provides structured and secure access so your agent can perform Gitea operations on your behalf.

Way Forward

With Gitea connected, Pi can now act on your behalf whenever you ask it to.

From here, you can extend Pi further:

  • Connect more apps: Calendar, Slack, Notion, Linear, and hundreds of others are available through the same Composio Connect setup. Each new integration compounds what Pi can do for you.
  • Build workflows across tools: Once multiple apps are connected, Pi can chain actions together — turn an email into a calendar invite, a Slack message into a Linear ticket, or a meeting note into a follow-up draft.
  • Lean into Pi's extension surface: Wrap common Gitea flows as Pi skills or prompt templates so recurring tasks become one-line commands, and use directTools in the MCP adapter to promote your most-used Gitea tools into Pi's tool list directly.

If you run into trouble or want to share what you've built, join the community or check out the Docs for deeper configuration options.

TOOLS

Supported Tools

Every Gitea action and event your agent gets out of the box.

Get ActivityPub Person Actor

Tool to retrieve the ActivityPub Person actor for a Gitea user.

Get General API Settings

Tool to retrieve the Gitea instance's global API settings including pagination limits and response size constraints.

Get General Attachment Settings

Tool to retrieve the Gitea instance's global settings for file attachments including enabled status, allowed file types, size limits, and file count limits.

Get General Repository Settings

Tool to retrieve the Gitea instance's global settings for repositories including feature flags for mirroring, HTTP Git, migrations, stars, time tracking, and LFS.

Get General UI Settings

Tool to retrieve the Gitea instance's global settings for UI including default theme, allowed reactions, and custom emojis.

Get Gitignore Template Info

Tool to retrieve information about a specific gitignore template.

Get Label Template Info

Tool to retrieve all labels from a specific label template.

Get License Template Info

Tool to retrieve information about a specific license template.

Get Node Info

Tool to retrieve the nodeinfo of the Gitea application.

Get Signing Key

Tool to retrieve the default GPG signing key used by Gitea to sign commits.

Get Version

Tool to retrieve the version of the Gitea application.

List Gitignore Templates

Tool to retrieve all available gitignore templates.

List Label Templates

Tool to retrieve all available label templates.

List License Templates

Tool to retrieve all available license templates.

Get All Organizations

Tool to retrieve a paginated list of all organizations in the Gitea instance.

List Organization Actions Secrets

Tool to list all action secrets for an organization.

Render Markdown

Tool to render a markdown document as HTML with configurable rendering modes and context.

Render Markdown Raw

Tool to render raw markdown text as HTML.

Render Markup

Tool to render a markup document as HTML with support for multiple markup formats.

FAQ

Frequently asked questions

With a standalone Gitea MCP server, the agents and LLMs can only access a fixed set of Gitea tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Gitea and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. Pi fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Gitea tools.

Yes, absolutely. You can configure which Gitea scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Gitea data and credentials are handled as safely as possible.

Start with Gitea.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Gitea tool your agent needs.Free to start.

Start building