Pgr logo

Pgr

Organization
entireio

PGR is an experimental, stateless MCP code-search server for studying how ranking, latency, and output shaping affect agentic search.

Publisherentireio
Repositorypgr
LanguagePython
Forks
4
Stars
62
Available tools
0
Transport typestdio
LicenseMIT
Links
  • Connect tools to AI workflows

    Pgr exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    62 stars and 4 forks from the linked repository.

pgr repository cover

pgr

pgr is an experimental, stateless MCP server for code search, built as part of research into how coding agents search repositories.

It is a working prototype and public research artifact, not a polished product.

It wraps local code search with ranking and output shaping designed for agent workflows: surfacing likely implementation files earlier, de-prioritizing tests and low-value matches, and formatting results so a model can decide what to read next with less thrashing.

This repository also includes the public datasets, benchmark packages, and saved results used in the accompanying writeup on agentic code search.

Quick Start

1. Install pgr

Install pgr from this repository:

bash
git clone https://github.com/entireio/pgr.git
cd pgr
cargo install --path .

2. Add it to your MCP client

Then add it to any MCP client that can launch a stdio server:

json
{
  "mcpServers": {
    "pgr": {
      "command": "pgr",
      "cwd": "/absolute/path/to/repo"
    }
  }
}

3. Point it at the repo to search

Set cwd to the repository you want your agent to search. pgr searches the current working directory of the process that launches it.

4. Ask your agent to search

Once configured, ask your agent to search the repo. For example:

text
search for where checkpoint commits are written
text
find the code that handles MCP tool calls

If pgr is not yet on your shell PATH after install, use the binary directly at:

bash
~/.cargo/bin/pgr

What pgr gives agents

pgr is not trying to replace ripgrep. It shells out to local rg for fast content search and file listing, then ranks and shapes the results for coding agents.

That means an agent is more likely to see implementation files before test noise, repeated references, or lower-signal matches.

At a high level it provides tools for:

  • search_code
  • read_code
  • find_files
  • list_dir

The search output profile is controlled with PGR_OUTPUT_PROFILE. If it is unset, the server defaults to the richer planner-oriented output profile used in the public results.

There is no index to build, no background daemon, and no separate storage layer. pgr starts, answers MCP tool calls over stdio, and exits when the client stops it.

Build from source

bash
cargo build --release

The binary will be available at target/release/pgr.

If you want the binary on your PATH, you can also install it locally with:

bash
cargo install --path .

For most first-time users, this is the easiest way to try pgr.

Requirements

  • Rust toolchain for building from source
  • ripgrep installed and available as rg

pgr shells out to local rg for both content search and file listing. If rg is not installed, pgr will not be able to search.

Why we built it

pgr is built around a simple idea: faster search alone is not enough. What matters just as much is whether the search result helps the model choose a better next action.

In the public benchmarks in this repository, the strongest effects did not come from raw scan speed. They showed up in more local agent behavior:

  • better first-query retrieval quality
  • fewer redundant search loops before the first code read
  • getting the agent into reading relevant files sooner

That is the problem pgr is designed to improve.

Usage Documentation

  • docs/usage.md - MCP setup, direct stdio smoke test, tool arguments, and output profiles

Public benchmarks and data

The public artifacts referenced in the writeup live under public_release/.

Key packages:

What is in this repo

  • src/
    • the Rust MCP server
  • tests/
    • integration tests for the MCP surface
  • eval/v2/
    • the minimal evaluation harness and backend adapters used by the public benchmark runners
  • public_release/
    • public datasets, benchmark definitions, summaries, and saved outputs referenced in the blog post

Repository scope

This public repository is intentionally focused on:

  • the Rust MCP search server
  • the minimal benchmark harness needed by the public runners
  • the public data and results packages cited in the writeup

Older internal drafts, duplicate exports, and superseded experimental outputs have been removed so the repo stays small, inspectable, and externally understandable.

Contributing

See CONTRIBUTING.md, SECURITY.md, and LICENSE.

Use Pgr MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Pgr is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Pgr as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Pgr MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "pgr": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Pgr MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Pgr MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Pgr to help me with this task?
Pgr
Sure. I read it.
Here is what I found using Pgr.

Frequently asked questions

What is the Pgr MCP server used for?

Pgr is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Pgr MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Pgr with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Pgr MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Pgr connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Pgr MCP to TypingMind?

Pgr runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Pgr MCP provide in TypingMind?

Pgr exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Pgr MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Pgr requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇