*** title: Create and use gRPC mock servers updated: 2025-10-03T00:00:00.000Z max-toc-depth: 2 ---------------- In an API-first design lifecycle, you may be designing a new feature that depends on new API endpoints, but another team is responsible for implementing those endpoints, and aren't finished yet. Instead of being blocked by this, you can use a mock server, which returns sample data for requests to the API's endpoints, simulating the behavior of a real API. You can then use the mock server to test your API, before it's even implemented by the other team. ## Use a gRPC mock server Before creating a gRPC mock server, you must have an API definition. This can either be an API in your workspace, a protobuf (protocol buffers) file you want to import, or you can create a new API using the Postman API Builder. To create the gRPC mock server, do the following: {/*vale off*/} 1. Create a new gRPC request. See [Creating a new request](/docs/sending-requests/grpc/grpc-request-interface/#create-a-new-request) for more information. 2. Click **Enter URL** in the request URL box, then click **Select a Protobuf API**. This opens the **Service Definition** tab in your request. 3. In the **Service Definition** tab, you can enter the protobuf API in one of the following ways: * Click **Select a Protobuf schema or paste a link to one** to open the API selection dropdown list. Browse through the available APIs and select the one you want to use. You can also paste a link here to a protobuf API in your workspace. * Click **Import a .proto file** to add a new protobuf API from a `.proto` file. To learn more about selecting and importing protobuf APIs with the **Service Definition** tab, see [Manage service definitions for gRPC requests in Postman](/docs/sending-requests/grpc/using-service-definition/). 4. After you have selected an API, click **Enter URL** again, and select **Use Mock URL for (your API name)**. {/*vale on*/} {/*Turned vale off to avoid Vale.Terms error for capital Protobuf in the procedure*/} The mock server is automatically generated, and ready for use. The request URL has a server name beginning with a random name and ending in `.srv.pstmn.io`. Select a method, then click **Invoke**, and your request will receive responses with random values. The mock server dynamically updates based on changes to your protobuf API. If changes are made to the protobuf API, requests to the mock server automatically implement the changes. ## Reuse mock server responses Each time you make a request to the mock server, different random data is returned. However, if you are writing tests, you might need to get the same response every time. This is possible using the seed metadata in each response. The seed is a random number in the response metadata. If you pass the seed in a request, the same response is returned each time. To pass seed data, do the following: 1. Make a gRPC request to a mock server. 2. In the **Metadata** pane of the response, find the value of the key-value pair named `seed`. gRPC response seed 3. In the **Metadata** pane of the request, set a key-value pair for `seed` with the value of the seed. gRPC request seed 4. Invoke the request again. The mock servers in gPRC are independent of the mock server feature in Postman. See [Set up a Postman mock server](/docs/design-apis/mock-apis/set-up-mock-servers/) for more information about using mock servers for your other APIs. ## Next steps Learn about [gRPC request-response examples](/docs/sending-requests/grpc/using-grpc-examples/).