شعار Pgr

Pgr

مؤسسة
entireio

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

الناشرentireio
المستودعpgr
اللغةPython
التفريعات
4
النجوم
62
الأدوات المتاحة
0
نوع نقل البياناتstdio
الترخيصMIT
الروابط
  • اربط الأدوات بسير عمل الذكاء الاصطناعي

    يتيح Pgr إمكانات MCP التي يمكن لتطبيقات الذكاء الاصطناعي العميلة ووكلاء الذكاء الاصطناعي المتوافقة استخدامها.

  • الأدوات المتاحة: 0

    تصفّح الإجراءات القابلة للاستدعاء أدناه، بما في ذلك أسماؤها وأوصافها عندما يوفّرها الخادم.

  • إعدادات جاهزة للنسخ

    استخدم أمثلة إعداد التثبيت لتهيئة هذا الخادم في تطبيق MCP العميل المفضّل لديك.

  • مؤشرات الاهتمام بالمصدر المفتوح

    النجوم: 62، والنسخ المتفرعة: 4 في المستودع المرتبط.

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.

استخدم MCP الخاص بـ Pgr مع نماذج ذكاء اصطناعي متعددة

يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا بمجرد توصيل Pgr، يمكنك استخدامه مع نماذج ذكاء اصطناعي مختلفة في TypingMind بدلًا من إعداده لكل نموذج على حدة. يعمل تكامل MCP هذا محليًا عبر موصل MCP الخاص بـ TypingMind على جهازك.

دليل الإعداد لاستخدام الموصل المحلي

استخدم هذا الخيار عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات أو موارد خاصة على جهاز الكمبيوتر لديك.

1

فتح إعدادات MCP

في TypingMind، انتقل إلى «الإعدادات»، ثم «الإعدادات المتقدمة»، ثم «بروتوكول سياق النموذج»، واختر «إعداد الموصل».

  1. افتح TypingMind في متصفحك.
  2. انقر على أيقونة الإعدادات.
  3. انتقل إلى الإعدادات المتقدمة.
  4. افتح قسم بروتوكول سياق النموذج.
  5. انقر على «إعداد الموصل» واختر «هذا الجهاز».
شاشة إعداد موصل MCP في TypingMind مع تحديد «هذا الجهاز»
2

تنفيذ أمر الموصل

اختر «هذا الجهاز»، وانسخ الأمر من TypingMind وشغّله في Terminal. أبقِ العملية قيد التشغيل أثناء استخدام MCP.

  1. انسخ أمر الإعداد الذي يعرضه TypingMind.
  2. افتح Terminal على macOS أو Windows Terminal على Windows.
  3. الصق الأمر ونفّذه.
  4. وافق على تثبيت الحزمة إذا طلب منك Terminal تأكيد المتابعة.
  5. أبقِ نافذة Terminal والعملية التي تعمل فيها قيد التشغيل أثناء استخدام أدوات MCP.
3

أضف Pgr كخادم

عندما تظهر حالة الموصل «جاهز»، انقر على «تعديل الخوادم» والصق إعدادات خادم MCP.

  1. انتظر حتى تظهر حالة الموصل «جاهز».
  2. انقر على «تعديل الخوادم».
  3. الصق إعدادات خادم MCP الخاص بـ Pgr.
  4. احفظ قائمة الخوادم.
  5. حدّث الحالة إذا أردت التأكد من أن الموصل لا يزال جاهزًا.
إعدادات MCP في TypingMind تعرض خادمًا نشطًا وزر «تعديل الخوادم»
{
  "mcpServers": {
    "pgr": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

استخدام الاتصال مع نماذج مختلفة

احفظ قائمة الخوادم، وافتح «الإضافات»، وفعّل أدوات MCP الخاصة بـ Pgr، ثم اختر أي نموذج ذكاء اصطناعي مدعوم في TypingMind واستخدم الأدوات في المحادثة أو أسندها إلى وكيل ذكاء اصطناعي.

  1. افتح صفحة الإضافات في TypingMind.
  2. فعّل أدوات MCP الخاصة بـ Pgr.
  3. ابدأ محادثة واختر نموذج الذكاء الاصطناعي الذي تريد استخدامه.
  4. استخدم أدوات MCP في المحادثة أو عيّنها لوكيل ذكاء اصطناعي.
  5. انتقل إلى نموذج ذكاء اصطناعي آخر عند الحاجة دون إعادة الاتصال بـ MCP.
محادثة في TypingMind تستخدم أدوات MCP المفعّلة مع نموذج ذكاء اصطناعي محدّد
هل يمكنك استخدام Pgr لمساعدتي في هذه المهمة؟
Pgr
بالتأكيد. قرأته.
إليك ما وجدته باستخدام Pgr.

الأسئلة الشائعة

ما استخدامات خادم MCP Pgr؟

Pgr هو خادم MCP يتيح لتطبيقات الذكاء الاصطناعي المتوافقة الاتصال بأدوات ومصادر سياق خارجية. في TypingMind، يمكنك إضافة خادم MCP هذا مرة واحدة وإتاحة أدواته في مساحة عملك للذكاء الاصطناعي.

هل يمكنني استخدام خادم MCP Pgr مع نماذج ذكاء اصطناعي متعددة في TypingMind؟

نعم. يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا يمكنك استخدام Pgr مع نماذج ذكاء اصطناعي مختلفة مثل Claude أو ChatGPT أو Gemini أو غيرها من النماذج التي أعددتها في TypingMind، دون إعداد خادم MCP لكل نموذج على حدة.

لماذا تستخدم موصل MCP Pgr مع TypingMind؟

يُعد TypingMind من أفضل واجهات المحادثة مع النماذج اللغوية الكبيرة، إذ يجمع نماذج ذكاء اصطناعي متعددة ومطالبات وإضافات ووكلاء ذكاء اصطناعي ومفاتيح API وأدوات MCP في مساحة عمل واحدة. بعد توصيل Pgr، يمكنك استخدام أدوات MCP الخاصة به عبر نماذجك المفضلة مع الحفاظ على سير عمل محادثاتك منظمًا في TypingMind.

كيف أوصّل خادم MCP Pgr بـ TypingMind؟

يعمل Pgr عبر موصل MCP المحلي في TypingMind. هذا هو الخيار الأنسب عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات سطح المكتب أو أدوات سطر الأوامر أو موارد خاصة على حاسوبك.

ما الأدوات التي يوفّرها خادم MCP Pgr في TypingMind؟

يتيح Pgr إمكانات MCP يمكنك تفعيلها من صفحة الإضافات في TypingMind واستخدامها في المحادثات أو تعيينها لوكلاء ذكاء اصطناعي.

هل أحتاج إلى مشاركة مفاتيح API الخاصة بي مع TypingMind لاستخدام خادم MCP Pgr؟

لا. يعطي TypingMind الأولوية للعمل المحلي ويُبقي مزوّدي النماذج ومفاتيح API والمطالبات وإعدادات MCP تحت تحكمك. إذا كان Pgr يتطلب مصادقة، فأضف الترويسات أو إعدادات OAuth أو الإعدادات المحلية المطلوبة لخادم MCP هذا عند إنشاء الاتصال.

خوادم MCP ذات صلة

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇