spm-search-mcp
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., "@spm-search-mcpfind iOS networking libraries with at least 500 stars"
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.
spm-search-mcp
An MCP server that lets coding agents search the Swift Package Index. No API key required.
Built with FastMCP and designed using arcade patterns for optimal agent comprehension.
Note (March 2026): This project is currently on hold. It was built as a proof-of-concept for agentic SPI search using HTML scraping and a Cloudflare bypass (
curl_cffi). The bypass has since been removed — the project now uses plainhttpxand no longer attempts to circumvent bot protection, which means it is effectively non-functional. See SwiftPackageIndex/SwiftPackageIndex-Server#3970 for context. The project will resume if/when an official API becomes available.
Quick install
From the repo root, run the command for your MCP client:
# Claude Desktop
fastmcp install claude-desktop src/spm_search_mcp/server.py:mcp --with-editable . -n "Swift Package Index"
# Claude Code
fastmcp install claude-code src/spm_search_mcp/server.py:mcp --with-editable . -n "Swift Package Index"
# Cursor
fastmcp install cursor src/spm_search_mcp/server.py:mcp --with-editable . -n "Swift Package Index"
# Any client — print the JSON snippet to paste
fastmcp install mcp-json src/spm_search_mcp/server.py:mcp --with-editable . -n "Swift Package Index"Related MCP server: reflens
Manual MCP client configuration
Via GitHub (no install needed)
// add to your mcpServers:
"spm-search-mcp": {
"command": "uvx",
"args": [
"--from", "git+https://github.com/detailobsessed/spm-search-mcp",
"spm-search-mcp"
]
}Requires uv (brew install uv on macOS).
From source (development)
// add to your mcpServers:
"spm-search-mcp": {
"command": "uv",
"args": [
"run",
"--with", "fastmcp",
"--with-editable", "/path/to/spm-search-mcp",
"fastmcp", "run",
"/path/to/spm-search-mcp/src/spm_search_mcp/server.py:mcp"
]
}Tools
search_swift_packages
Search for Swift packages by keyword, author, stars, platform, license, and more. All of SPI's filter syntax is exposed as typed parameters — agents never need to learn the DSL.
Parameter | Type | Description |
|
| Free-text search (e.g. |
|
| Repository owner. Prefix with |
|
| Package keyword tag. Prefix with |
|
| Minimum GitHub star count |
|
| Maximum GitHub star count |
|
| Compatible platforms: |
|
|
|
|
| ISO8601 date — only packages active after this date |
|
| ISO8601 date — only packages active before this date (combine with |
|
| ISO8601 date — only packages with commits after this date |
|
| ISO8601 date — only packages with commits before this date |
|
|
|
|
| Page number for pagination (default 1) |
All parameters are optional. At least one must be provided. Parameters combine with AND logic.
list_search_filters
Returns valid values for the platforms and product_type parameters. Call this first if unsure what values are accepted.
No parameters. Returns a dict with platforms and product_types keys.
get_package_readme
Fetch a package's README from GitHub. Returns truncated content by default (4000 chars) to save tokens.
Parameter | Type | Description |
|
| GitHub repository owner (e.g. |
|
| GitHub repository name (e.g. |
|
| Max chars to return (default 4000). Set to |
Example usage
Once connected, an agent can:
# Search for networking libraries with 500+ stars
search_swift_packages(query="networking", min_stars=500)
# Find iOS-compatible packages
search_swift_packages(platforms=["ios"], min_stars=100)
# Discover valid platform and product_type values
list_search_filters()
# Browse a specific author's packages
search_swift_packages(author="apple")
# Exclude an author
search_swift_packages(query="networking", author="!vapor", min_stars=500)
# Exclude deprecated packages
search_swift_packages(query="json", keyword="!deprecated")
# Packages active in a date window (first half of 2024)
search_swift_packages(last_activity_after="2024-01-01", last_activity_before="2024-06-30", min_stars=100)
# Find abandoned packages (no commits since 2022)
search_swift_packages(last_commit_before="2022-01-01", min_stars=200)
# Read a package's README
get_package_readme(owner="Alamofire", repo="Alamofire")
# Get full README (no truncation)
get_package_readme(owner="apple", repo="swift-nio", max_length=0)Error handling
All errors return structured, actionable messages instead of raw exceptions:
RETRYABLE — transient failures (timeouts, rate limits, server errors). The agent can retry.
PERMANENT — the request itself is wrong (404, 403). The agent should change its approach.
Every error message tells the agent what happened, why, and how to fix it.
Design
This server implements these arcade patterns:
QUERY_TOOL — all tools are read-only, safe to retry
DISCOVERY_TOOL —
list_search_filters()exposes valid enum values before searchingCONSTRAINED_INPUT — enums for platforms and product types
SMART_DEFAULTS — all parameters optional with sensible defaults
NEXT_ACTION_HINT — every response suggests what to do next
GUI_URL — every result includes SPI + GitHub URLs
TOKEN_EFFICIENT_RESPONSE — truncated README with opt-in full
PAGINATED_RESULT —
has_moreflag with page navigationERROR_CLASSIFICATION — RETRYABLE vs PERMANENT error tagging
RECOVERY_GUIDE — actionable error messages with fix instructions
PROGRESSIVE_DETAIL —
max_length=0for full README content
Development
uv sync # install dependencies
uv run pytest # run tests
uv run poe test-cov # run with coverage (90%+ required)
uv run ruff check . # lint
uv run ty check . # type check
prek run --all-files # run all pre-commit hooksAvailable Tools
3 toolsget_package_readmeA
Fetch the README of a Swift package from GitHub.
This is a QUERY tool — read-only, safe to call multiple times.
Use this after search_swift_packages to get details about a specific package. The owner and repo values come from search results (e.g. "apple" and "swift-nio").
Args: owner: GitHub repository owner (user or org). Example: "Alamofire". repo: GitHub repository name. Example: "Alamofire". max_length: Maximum characters to return (default 4000). Set to 0 for full content. Larger values use more tokens.
Returns the README content as markdown. If the README is longer than max_length, it is truncated with a note about the full length.
After reading the README, you can suggest the package to the user with its Swift Package Index URL: https://swiftpackageindex.com/{owner}/{repo}
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | ||
| repo | Yes | ||
| max_length | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full behavioral disclosure burden. It successfully states 'read-only, safe to call multiple times,' output format ('markdown'), truncation behavior ('truncated with a note'), and cost implications ('Larger values use more tokens'). Missing only error handling details (e.g., 404 behavior) for a perfect score.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose, followed by safety notes, usage guidelines, Args section, and return value details. While comprehensive, the final sentence suggesting post-call actions ('After reading the README, you can suggest...') slightly exceeds strict tool description scope, though it provides workflow context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read operation with 3 parameters and an output schema, the description is complete. It explains the input parameters, output behavior (markdown, truncation), workflow relationship to siblings, and even post-call URL construction, leaving no significant gaps for agent operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, requiring the description to compensate fully. It provides an 'Args' section documenting all three parameters: owner/repo include examples ('Alamofire'), and max_length explains the default (4000), special case (0 for full), and cost implications—substantially exceeding baseline requirements.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Fetch the README of a Swift package from GitHub,' providing a specific verb (Fetch), resource (README), and scope (Swift package from GitHub). It distinguishes itself from sibling search_swift_packages by explicitly stating 'Use this after search_swift_packages,' clarifying this is for detail retrieval, not discovery.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use the tool: 'Use this after search_swift_packages to get details about a specific package.' It also clarifies the parameter workflow: 'The owner and repo values come from search results,' directly referencing the sibling tool's output and establishing a clear sequential relationship between the tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_search_filtersA
Return all valid values for the constrained parameters of search_swift_packages.
This is a DISCOVERY tool — call this first if you are unsure what values are accepted for the platforms or product_type parameters.
Returns a dict with keys 'platforms' and 'product_types', each containing the list of accepted string values.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full disclosure burden. It successfully documents return structure ('dict with keys platforms and product_types') and behavioral classification ('DISCOVERY tool'). Minor gap: no mention of whether values are cached/static or fetched live, or any rate limiting.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences with zero waste: sentence 1 states purpose, sentence 2 provides usage guideline labeled 'DISCOVERY', sentence 3 documents return structure. Perfectly front-loaded and sized for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema (per context signals), the description comprehensively documents return values and structure. Establishes clear relationship to sibling search_swift_packages. Complete for a zero-parameter discovery utility.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema contains zero parameters (empty object). According to scoring rules, 0 params baseline is 4. The description correctly implies no inputs are needed by omitting any parameter discussion, which is appropriate for this tool type.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses specific verbs ('Return', 'DISCOVERY tool') and clearly links to sibling tool search_swift_packages by name. It precisely scopes the resource as 'valid values for the constrained parameters', distinguishing it from the actual search execution performed by its siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use ('call this first if you are unsure what values are accepted') and establishes clear workflow precedence relative to search_swift_packages. Provides specific parameter names (platforms, product_type) to trigger usage recognition.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_swift_packagesA
Search the Swift Package Index for packages matching your criteria.
This is a QUERY tool — read-only, safe to call multiple times.
At least one parameter must be provided. Parameters are combined with AND logic.
Args: query: Free-text search (e.g. "networking", "json parsing"). author: Filter by repository owner (e.g. "apple", "vapor"). Prefix with "!" to exclude (e.g. "!vapor"). keyword: Filter by package keyword tag (e.g. "server", "ui"). Prefix with "!" to exclude (e.g. "!deprecated"). min_stars: Minimum GitHub star count (e.g. 100, 1000). max_stars: Maximum GitHub star count. platforms: Filter by compatible platform(s). Multiple = AND (must support all). Valid: ios, macos, watchos, tvos, visionos, linux. license_filter: License filter. Use "compatible" for App Store compatible, or a specific SPDX ID like "mit", "apache-2.0", "lgpl-2.1". Prefix with "!" to exclude (e.g. "!gpl-3.0"). last_activity_after: ISO8601 date (YYYY-MM-DD). Only packages with maintenance activity after this date. Example: "2024-01-01". last_activity_before: ISO8601 date (YYYY-MM-DD). Only packages with maintenance activity before this date. Combine with last_activity_after for a date window. last_commit_after: ISO8601 date (YYYY-MM-DD). Only packages with commits after this date. last_commit_before: ISO8601 date (YYYY-MM-DD). Only packages with commits before this date. Combine with last_commit_after for a date window. product_type: Filter by product type: library, executable, plugin, or macro. page: Page number for pagination (default 1). Check has_more in the response.
If you are unsure what values are valid for platforms or product_type, call list_search_filters() first. After getting results, use get_package_readme(owner, repo) to read the README of any package that looks interesting.
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| author | No | ||
| keyword | No | ||
| min_stars | No | ||
| max_stars | No | ||
| platforms | No | ||
| license_filter | No | ||
| last_activity_after | No | ||
| last_activity_before | No | ||
| last_commit_after | No | ||
| last_commit_before | No | ||
| product_type | No | ||
| page | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| page | Yes | Current page number (1-indexed) |
| query | Yes | The raw SPI query string that was executed |
| results | Yes | List of matching packages |
| has_more | Yes | Whether more results are available on the next page |
| next_step | Yes | Suggested next action for the agent |
| result_count | Yes | Number of results on this page |
| spi_search_url | Yes | Direct URL to view these results on swiftpackageindex.com |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are absent, so the description carries full disclosure burden and succeeds excellently. It explicitly states 'This is a QUERY tool — read-only, safe to call multiple times', disclosing idempotency and safety. It also reveals pagination behavior ('Check has_more in the response') and parameter constraints ('At least one parameter must be provided').
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is necessarily lengthy given 13 undocumented parameters, but remains well-structured with clear sectioning (opening statement, behavioral note, constraint, Args list, workflow guidance). Every sentence earns its place—the examples and exclusion syntax ('!') are critical for usage. Minor deduction only because the verbosity is forced by poor schema coverage rather than perfect conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 13 optional parameters, zero schema descriptions, no annotations, but presence of an output schema, the description achieves completeness. It documents all parameters, explains response handling ('Check has_more'), states constraints, provides workflow integration with siblings, and covers behavioral traits—leaving no significant gaps for an agent to invoke this incorrectly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With schema description coverage at 0% per context signals, the description comprehensively compensates by documenting all 13 parameters in the Args section. It provides semantic meaning (e.g., 'Filter by repository owner'), syntax details ('Prefix with "!" to exclude'), format examples ('ISO8601 date (YYYY-MM-DD)'), and valid value lists ('ios, macos...') that are completely absent from the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb ('Search') and resource ('Swift Package Index for packages'), clearly stating what the tool does. It distinguishes itself from sibling tools by explicitly mentioning both 'list_search_filters()' and 'get_package_readme()' as related tools to call before and after using this one.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit workflow guidance: when to use 'list_search_filters()' first ('If you are unsure what values are valid'), and what to do after results ('use get_package_readme...to read the README'). Also states critical constraints: 'At least one parameter must be provided' and 'Parameters are combined with AND logic', which are essential for correct invocation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a distinct and non-overlapping purpose: search_swift_packages finds packages, get_package_readme fetches details for a specific package, and list_search_filters provides metadata about valid search parameters. There is no ambiguity about which tool to use for each task.
All tool names follow a consistent verb_noun pattern with snake_case: search_swift_packages, get_package_readme, and list_search_filters. The naming is predictable and clearly indicates each tool's function.
Three tools is appropriate for the server's purpose of searching and exploring Swift packages, covering search, detail retrieval, and filter discovery. However, it feels slightly minimal—adding a tool for getting package metadata or dependencies could enhance completeness.
The tools cover the core workflow of searching for Swift packages, viewing filters, and reading READMEs, with no dead ends. A minor gap exists in lacking direct access to package metadata like versions or dependencies, but agents can work around this using the provided tools effectively.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Search GitHub, npm, PyPI, StackOverflow, ArXiv from one MCP — built for coding agents.
An MCP server that gives your AI access to the source code and docs of all public github repos
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Docs: https://docs.keenable.ai/mcp-server Keenable is a free, remote MCP server that gives agents access to the web index. Search the web with ranked results and date/site filters, then fetch any indexed page as clean markdown. Works out of the box with no account or API key.
Related MCP Servers
- AlicenseBqualityCmaintenanceA codemode MCP server for fetching and querying dependency source code from npm, PyPI, crates.io, and GitHub. It allows agents to execute server-side JavaScript for context-efficient searching and browsing of large codebases without overwhelming the LLM's context window.15339MIT
- AlicenseAqualityBmaintenanceAn MCP server that indexes reference repositories and provides tools for AI coding agents to retrieve lossless code context, enabling reasoning over codebases larger than the agent's context window.82Apache 2.0
- AlicenseNot gradedqualityCmaintenanceMCP server that enables AI agents to search code, find files, and read files in a codebase at lightning speed using ripgrep.MIT

GitHitsofficial
AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to search and access open-source code, documentation, and package information via a local MCP server.3,79094Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/detailobsessed/spm-search-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server