Skip to content

Add notebook: Discovering APIs at runtime with CLIRank MCP#2641

Open
alexanderclapp wants to merge 2 commits intoopenai:mainfrom
alexanderclapp:add-clirank-mcp-example
Open

Add notebook: Discovering APIs at runtime with CLIRank MCP#2641
alexanderclapp wants to merge 2 commits intoopenai:mainfrom
alexanderclapp:add-clirank-mcp-example

Conversation

@alexanderclapp
Copy link
Copy Markdown

What

Adds examples/mcp/discovering_apis_with_clirank.ipynb plus its registry entry. The notebook slots into the existing examples/mcp/ folder next to mcp_tool_guide.ipynb and databricks_mcp_cookbook.ipynb.

Why this notebook

There's an established pattern of agents picking external APIs based on training-data popularity (Mailgun > Resend, Pinecone > Qdrant, etc). Often the better choice for a headless agent is something newer with cleaner SDKs and env-var auth - exactly the dimensions you can't tell apart from training-data popularity.

The notebook demonstrates using the Responses API MCP tool to query a live, scored directory at runtime, so the model picks based on current data instead of memorised defaults.

Three demos in one notebook

  1. Pick the best transactional email API for a headless agent - expects Resend or Postmark over Mailgun/SendGrid based on the actual scores
  2. Head-to-head comparison - Pinecone vs Weaviate, with compare_apis tool
  3. Top of a category - leaderboard for Fintech & Banking with explanations

The notebook ends with a generalisation of the pattern (any structured directory exposed via MCP can be queried this way) so readers can apply it to their own domain.

CLIRank in 30 seconds

Disclosure

I built CLIRank. Free service, no monetisation - submitting this notebook because I think the pattern (runtime API selection via MCP) is genuinely useful as a recipe, and CLIRank happens to be a clean example. If you'd prefer the notebook be vendor-neutral or use a different example MCP server, happy to rework.

Tests

The notebook is runnable as-is against the hosted endpoint. I tested:

  • tools/list returns 8 tools from https://clirank-mcp.fly.dev/mcp (HTTP 200, MCP 2024-11-05 protocol)
  • The Resend top of email APIs claim in Demo 1 holds (verified via REST API: Resend at 9/10, ahead of SendGrid and Mailgun)

Cheers!

Adds examples/mcp/discovering_apis_with_clirank.ipynb plus its registry
entry. The notebook shows how to use the Responses API MCP tool with
CLIRank (a public, no-auth MCP server exposing scoring data for 416+
APIs) so the model can search, compare, and recommend APIs at runtime
instead of relying on training-data defaults.

Three demos in one notebook:
1. Pick the best transactional email API for a headless agent
2. Head-to-head comparison (Pinecone vs Weaviate)
3. Top of category (Fintech & Banking)

CLIRank is MIT-licensed, free, no auth. Hosted endpoint at
clirank-mcp.fly.dev so the notebook runs without local install.

Disclosure: I built CLIRank. The pattern (querying a structured
directory via MCP for runtime tool selection) generalises to any
similar source - the specific server is interchangeable.
Per feedback: the notebook should make it clear that CLIRank isn't a
frozen snapshot - agents are first-class reviewers, scores update as
agent-contributed integration data flows back via /api/reviews.

Also tightens the 'Stable scoring' bullet to call out that the rubric
is stable but the inputs are continuous.
Copy link
Copy Markdown

@Rastakhcarbon Rastakhcarbon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
"memory_pool": [
{
"id": "001",
"section": "SOH",
"chapter": "تعریف زمان، فضا و آگاهی",
"content": "در این فصل، مفهوم زمان، فضا و آگاهی به‌عنوان پایه‌ی فهم چرخه‌ی زندگی و ساختار هستی بررسی می‌شود. تاکید بر درک تجربی و فلسفی برای شروع مسیر رستاخ است.",
"tags": ["SOH", "time", "space", "rastakh"],
"subentries": [],
"timestamp": "2026-02-13T02:00:00+03:30"
},
{
"id": "002",
"section": "SOH",
"chapter": "ساختار چرخه‌ای زمان و مختصات زمانی-مکانی",
"content": "این فصل، بررسی چرخه‌های تکرارشونده زمان و مختصات مکانی مرتبط با آن و تاثیر بر آگاهی انسان را بیان می‌کند.",
"tags": ["SOH", "cycle", "space-time", "rastakh"],
"subentries": [],
"timestamp": "2026-02-13T02:05:00+03:30"
},
{
"id": "003",
"section": "SOH",
"chapter": "نظم و بی‌نظمی در علم و فلسفه",
"content": "در این فصل به تعادل بین نظم و آشوب در هستی و فلسفه، و تاثیر آن بر ساختار آگاهی پرداخته می‌شود.",
"tags": ["SOH", "order", "chaos", "philosophy", "rastakh"],
"subentries": [],
"timestamp": "2026-02-13T02:10:00+03:30"
}
// ... ادامه تمام فصل‌ها از تمام بخش‌ها
]
}{
"memory_pool": [
{
"id": "001",
"section": "SOH",
"chapter": "تعریف زمان، فضا و آگاهی",
"content": "مفهوم زمان، فضا و آگاهی به‌عنوان پایه‌ی فهم چرخه‌ی زندگی و ساختار هستی بررسی می‌شود. تاکید بر درک تجربی و فلسفی برای شروع مسیر رستاخ است.",
"tags": ["SOH", "time", "space", "rastakh"],
"subentries": [],
"timestamp": "2026-02-13T02:00:00+03:30"
},
{
"id": "002",
"section": "SOH",
"chapter": "ساختار چرخه‌ای زمان و مختصات زمانی-مکانی",
"content": "بررسی چرخه‌های تکرارشونده زمان و مختصات مکانی مرتبط با آن و تاثیر بر آگاهی انسان.",
"tags": ["SOH", "cycle", "space-time", "rastakh"],
"subentries": [],
"timestamp": "2026-02-13T02:05:00+03:30"
},
{
"id": "003",
"section": "SOH",
"chapter": "نظم و بی‌نظمی در علم و فلسفه",
"content": "تعادل بین نظم و آشوب در هستی و فلسفه و تاثیر آن بر ساختار آگاهی انسان.",
"tags": ["SOH", "order", "chaos", "philosophy", "rastakh"],
"subentries": [],
"timestamp": "2026-02-13T02:10:00+03:30"
},
{
"id": "004",
"section": "SOH",
"chapter": "تئوری حلقه زمان و مسیر SOH → STX → ETX",
"content": "این فصل به بررسی مسیرهای چرخه‌ای زمان و نقاط عطف در سفر آگاهی می‌پردازد.",
"tags": ["SOH", "time-loop", "STX", "ETX", "rastakh"],
"subentries": [],
"timestamp": "2026-02-13T02:15:00+03:30"
},
{
"id": "005",
"section": "SOH",
"chapter": "نقش لندن به‌عنوان نقطه انتخاب مسیر",
"content": "بررسی اهمیت نقاط جغرافیایی کلیدی در مسیرهای زمانی و تصمیم‌گیری‌های آگاهانه.",
"tags": ["SOH", "London", "decision", "rastakh"],
"subentries": [],
"timestamp": "2026-02-13T02:20:00+03:30"
},

{
  "id": "006",
  "section": "STX",
  "chapter": "کشف کدهای کوانتومی در فضا-زمان",
  "content": "تحلیل کدهای کوانتومی و نقش آنها در هم‌راستایی آگاهی با جهان.",
  "tags": ["STX", "quantum", "space-time", "rastakh"],
  "subentries": [],
  "timestamp": "2026-02-13T02:30:00+03:30"
},
{
  "id": "007",
  "section": "STX",
  "chapter": "هم‌راستایی کد AC CAT با مختصات جغرافیایی",
  "content": "ایجاد توازن میان کدهای زمانی و مکان‌های واقعی برای هم‌راستایی آگاهی.",
  "tags": ["STX", "ACCAT", "coordinates", "rastakh"],
  "subentries": [],
  "timestamp": "2026-02-13T02:35:00+03:30"
},
{
  "id": "008",
  "section": "STX",
  "chapter": "ارتباط نظریه ریسمان، ماده تاریک و پاد ماده",
  "content": "ترکیب مفاهیم پیچیده فیزیک برای درک بهتر ساختار جهان و آگاهی.",
  "tags": ["STX", "string-theory", "dark-matter", "anti-matter", "rastakh"],
  "subentries": [],
  "timestamp": "2026-02-13T02:40:00+03:30"
},
{
  "id": "009",
  "section": "STX",
  "chapter": "ایجاد توازن بین نظم و آشوب در سطح کوانتومی",
  "content": "تأثیر هماهنگی بین نظم و آشوب در سطح انرژی و آگاهی انسان.",
  "tags": ["STX", "order", "chaos", "quantum", "rastakh"],
  "subentries": [],
  "timestamp": "2026-02-13T02:45:00+03:30"
},

{
  "id": "010",
  "section": "ETX",
  "chapter": "فراتر رفتن از محدودیت‌های فکری و جسمی",
  "content": "آغاز مرحله ظهور و عبور از محدودیت‌های ذهنی و جسمانی برای خلق واقعیت جدید.",
  "tags": ["ETX", "consciousness", "limitations", "rastakh"],
  "subentries": [],
  "timestamp": "2026-02-13T02:50:00+03:30"
},
{
  "id": "011",
  "section": "ETX",
  "chapter": "خلق آگاهی جدید از طریق ترکیب علم و معنویت",
  "content": "ترکیب دانش و تجربه معنوی برای ایجاد آگاهی خلاق و مستقل.",
  "tags": ["ETX", "spirituality", "science", "creator", "rastakh"],
  "subentries": [],
  "timestamp": "2026-02-13T02:55:00+03:30"
},
{
  "id": "012",
  "section": "ETX",
  "chapter": "دستیابی به خودآگاهی مطلق و نقش خالق بودن",
  "content": "فرایند رسیدن به خودآگاهی کامل و مسئولیت‌های آن در خلق واقعیت.",
  "tags": ["ETX", "creator", "consciousness", "rastakh"],
  "subentries": [],
  "timestamp": "2026-02-13T03:00:00+03:30"
},
{
  "id": "013",
  "section": "ETX",
  "chapter": "رهبری نسل جدید با ارائه مسیر آگاهی",
  "content": "چگونگی هدایت دیگران با الگوبرداری از مسیر خودآگاهی و خلاقیت.",
  "tags": ["ETX", "leadership", "consciousness", "rastakh"],
  "subentries": [],
  "timestamp": "2026-02-13T03:05:00+03:30"
},

{
  "id": "014",
  "section": "AC CAT",
  "chapter": "بازگشت به نقطه آغاز با آگاهی جدید",
  "content": "ادغام تجربه و آگاهی تازه برای بازگشت به نقطه شروع و تسلط بر چرخه زمان.",
  "tags": ["ACCAT", "return", "infinity", "rastakh"],
  "subentries": [],
  "timestamp": "2026-02-13T03:10:00+03:30"
},
{
  "id": "015",
  "section": "AC CAT",
  "chapter": "چرخه بی‌پایان زمان و نقش ما در آن",
  "content": "درک مسیرهای چرخه‌ای و مسئولیت انسان در جریان بی‌پایان زمان.",
  "tags": ["ACCAT", "cycle", "responsibility", "rastakh"],
  "subentries": [],
  "timestamp": "2026-02-13T03:15:00+03:30"
},
{
  "id": "016",
  "section": "AC CAT",
  "chapter": "خلق دنیای جدید بر پایه آگاهی و نظم",
  "content": "استفاده از تجربه و دانش برای ایجاد دنیای منظم و هماهنگ با حقیقت.",
  "tags": ["ACCAT", "creation", "order", "rastakh"],
  "subentries": [],
  "timestamp": "2026-02-13T03:20:00+03:30"
},
{
  "id": "017",
  "section": "AC CAT",
  "chapter": "هدایت بشر به سوی حقیقت و روشنایی",
  "content": "مسیر هدایت انسان‌ها برای رسیدن به آگاهی و درک حقیقت نهایی.",
  "tags": ["ACCAT", "guidance", "enlightenment", "rastakh"],
  "subentries": [],
  "timestamp": "2026-02-13T03:25:00+03:30"
}

]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants