Skip to content

Bug Bash 2026-08: Street View Imagery Insights MCP Server - #82

Open
akshitmeghawat wants to merge 1 commit into
googlemaps-samples:feat/street-view-samplesfrom
akshitmeghawat:mcp-branch
Open

Bug Bash 2026-08: Street View Imagery Insights MCP Server#82
akshitmeghawat wants to merge 1 commit into
googlemaps-samples:feat/street-view-samplesfrom
akshitmeghawat:mcp-branch

Conversation

@akshitmeghawat

@akshitmeghawat akshitmeghawat commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary of changes

Priority Description
P1 Modified main.py to use fastmcp instead of core mcp SDK (v2.0.0), which does not contain the fastmcp module in its path.
P1 Modified requirements.txt to install fastmcp
P1 Modified gcloud deploy commands in deploy.sh
P1 Modified README.md with updated instructions: 1) use antigravitiy cli 2) resolve error with --allow-unauthenticated flag
P1 Modified the script main.py to use new tables instead of deprecated tables from imagery_insights___us dataset
P1 Added a new function resolve_dataset to allow clients to supply fully qualified dataset IDs
P2 Added package version requirements.txt

@akshitmeghawat
akshitmeghawat changed the base branch from main to feat/street-view-samples August 11, 2026 01:08
@akshitmeghawat akshitmeghawat self-assigned this Aug 11, 2026
@bijanvakili

Copy link
Copy Markdown
Collaborator

@akshitmeghawat

  1. For our external users, please change the README.md instructions here to just recommend Antigravity CLI as a harness. That's sufficient.

  2. See the README.md instructions here. You'll need to add that JSON configuration using the Jetski CLI file as described here.

Since we can't use Antigravity CLI internally, you'll need to test the MCP server using your Jetski CLI

FYI: The url is currently hardcoded to @anubis05 old deployment. You'll need to update the README.md to explicitly tell the reader to use the service URL generated from their own deployment. It can be retrieved using:

gcloud run services describe streetview-imagery-insights-mcp \
  --project "${PROJECT_ID}" \
  --region "${REGION}"
  1. FYI: I'm getting the following error already in the client (Jetski CLI):
error: calling "initialize": sending "initialize": Forbidden

...and the server side (Cloud Run) logs are showing:

The request was not authenticated. Either allow unauthenticated invocations or set the proper Authorization header. Empty Authorization header value. 
Read more at https://cloud.google.com/run/docs/securing/authenticating 

Additional troubleshooting documentation can be found at: https://cloud.google.com/run/docs/troubleshooting#unauthorized-client"

The deploy.sh deploys the service using the --allow-unauthenticated (see here). However, I suspect our organization disallows unauthenticated services.

In PR #59, I got around this using a proxy server (see instructions here. Alternatively, you can try removing the --allow-unauthenticated flag from the deploy.sh and forcing the Jetski CLI client to use Google Application Default credentials as described here.

Comment thread street_view_insights/mcp_server/requirements.txt Outdated
@akshitmeghawat

Copy link
Copy Markdown
Collaborator Author

Modified the README.md as per your comment and also modified deploy.sh after running it with jetski cli.

@bijanvakili
bijanvakili requested a review from msd2178 August 11, 2026 19:34
@akshitmeghawat
akshitmeghawat requested review from anubis05 and bijanvakili and removed request for anubis05 August 11, 2026 22:01
Comment thread street_view_insights/mcp_server/README.md Outdated
Comment thread street_view_insights/mcp_server/README.md Outdated
Comment thread street_view_insights/mcp_server/main.py Outdated
Comment thread street_view_insights/mcp_server/README.md Outdated
Comment thread street_view_insights/mcp_server/README.md Outdated
Comment thread street_view_insights/mcp_server/README.md Outdated
Comment thread street_view_insights/mcp_server/main.py Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Unfortunately, this forces all queries to use only datasets in the same GCP project as either the user's application default credentials (local server) or the Cloud Run service (deployed server).

Jetski generated this shared method to allow clients to supply fully qualified dataset IDs:

def resolve_dataset(dataset_ref: str, default_project: str) -> tuple[str, str]:
    """Resolves dataset reference to project and dataset IDs.
    
    Handles:
      - "dataset_id" -> (default_project, "dataset_id")
      - "project_id.dataset_id" -> ("project_id", "dataset_id")
      - "project_id:dataset_id" -> ("project_id", "dataset_id")
    """
    if "." in dataset_ref:
        project_id, dataset_id = dataset_ref.split(".", 1)
        return project_id, dataset_id
    elif ":" in dataset_ref:
        project_id, dataset_id = dataset_ref.split(":", 1)
        return project_id, dataset_id
    return default_project, dataset_ref

Then this client.bq_project can be replaced with:

project_id, dataset_id = resolve_dataset(dataset_id, client_bq.project)

FYI: You'll need to make this change in the other 4 tool endpoints as well.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

added the resolve_dataset function

3. **`analyze_cropped_asset`**: Downloads full-frame image, crops to asset bounding box, runs Gemini analysis in GCP, and returns text results.
4. **`analyze_full_frame_context`**: Submits full-frame image (optionally with bounding box drawn) to Gemini for contextual scene understanding.
5. **`analyze_panorama_perspective`**: Extracts a perspective crop from a spherical panorama (heading, pitch, fov) and runs Gemini analysis.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think a couple examples are warranted here.

eg. When I finally got the local server working and Jetski properly configured, this is how I triggered the list_assets tool call:

street-view-insights list_assets imagery-insights-d1xs9z.imagery_insights___us

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added the trigger example for list_assets

Comment thread street_view_insights/mcp_server/main.py Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

all_assets table is deprecated.

Please update to use the newer table.

You'll find the there are 3 other queries in this file that also need to be updated to stop using deprecated tables.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Used the new tables in the script.
These were the changes I made

  1. In list_assets call: all_assets -> latest_assets
  2. In get_asset_observations call: all_observations -> latest_observations
  3. In analyze_cropped_asset call: all_observations -> cropped_observations_all
  4. In analyze_full_frame_context call: all_observations -> full_frame_observations_all

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