Skip to content

Upgrade fastmcp and cleanup resources - #62

Merged
adarshdigievo merged 5 commits into
mainfrom
upgrade-fastmcp-cleanup-resources
Jul 28, 2026
Merged

Upgrade fastmcp and cleanup resources#62
adarshdigievo merged 5 commits into
mainfrom
upgrade-fastmcp-cleanup-resources

Conversation

@adarshdigievo

Copy link
Copy Markdown
Member

Changes:

  • Upgraded FastMCP version (3.4.2 -> 3.4.4) and SerpApi MCP server (0.4.0 -> 0.5.0) version. The MCP server now correctly exposes its own version (0.5.0) to clients.
  • Added MCP server instructions to help clients discover tools and engine schemas:
mcp = FastMCP(
    "SerpApi MCP Server",
    version=__version__,
    website_url="https://github.com/serpapi/mcp-server",
    instructions=(
        "Use the search tool for live SerpApi results. Use the "
        "`serpapi://engines` resource to discover valid SerpApi engine names, then read "
        "the `serpapi://engines/{engine_name}` resource template with the desired engine "
        "name to inspect its supported parameters."
    ),
    providers=[FileSystemProvider(COMPONENTS_DIR)],
)
  • Restructure package metadata: Previously, pyproject.toml contained sections marking this repo as a Python package and had build instructions using hatchling. Since we are not distributing this via PyPI, I cleaned up the metadata files to mark project as not a package.
  • Removed returning the resources key that listed full resource URLs for all supported engines from the serpapi://engines index resource. The full URLs are redundant because these were added in our initial implementation where we did not add resource templates.
    1. With our current implementation, MCP clients will already know that we have serpapi://engines/{engine_name} resource template available.
    2. Also, the root instruction added above will help the client with the resource template schema.
    3. The cleaned-up resource index also returns the full list of engine names that the clients can use to substitute engine_name, and we only remove the full engine URLs.
  • File changes in the engines/ path are due to schema refresh (newly added and updated engines). This is not critical because engine schemas are rebuilt in the Dockerfile, so our server contains the latest schema at the time of the last GitHub Actions run. The static schema files are used when the server is run locally. Maybe we can omit these files entirely from the repo later and use dynamic schema generation.

Tests done:

  • Resources, tools, and the search_dashboard app are confirmed to be working on a local Docker run using MCP inspector

@adarshdigievo
adarshdigievo merged commit 8f0b656 into main Jul 28, 2026
2 checks passed
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.

1 participant