How to Make Your API Work with Claude

On this page

Claude Desktop supports MCP servers. An MCP server exposes your API as tools that Claude can call during a conversation. You describe what your API can do, and Claude decides when to use it.

Here’s how to connect any REST API to Claude.

What you need

  • Node.js 18+ or Python 3.10+
  • A REST API with a base URL and endpoints
  • An API token (if the API requires auth)

1. Install paso

npm install -g usepaso

Or Python:

pip install usepaso

2. Declare your API

Create a usepaso.yaml file that describes your API’s capabilities. Each capability maps to one endpoint.

This example uses the Slack API. Replace it with your own.

version: "1.0"

service:
  name: Slack
  description: Team messaging and channel management
  base_url: https://slack.com/api
  auth:
    type: bearer

capabilities:
  - name: list_channels
    description: List public channels in the workspace
    method: GET
    path: /conversations.list
    permission: read
    inputs:
      limit:
        type: integer
        default: 20
        description: Max channels to return
        in: query
      types:
        type: string
        default: public_channel
        description: Channel types to include
        in: query

  - name: post_message
    description: Send a message to a channel
    method: POST
    path: /chat.postMessage
    permission: write
    consent_required: true
    inputs:
      channel:
        type: string
        required: true
        description: Channel ID to post in
      text:
        type: string
        required: true
        description: Message text

  - name: get_channel_history
    description: Get recent messages from a channel
    method: GET
    path: /conversations.history
    permission: read
    inputs:
      channel:
        type: string
        required: true
        description: Channel ID
        in: query
      limit:
        type: integer
        default: 10
        description: Number of messages to return
        in: query

permissions:
  read:
    - list_channels
    - get_channel_history
  write:
    - post_message

That’s it. No TypeScript. No Python MCP SDK. No request handlers.

3. Validate

usepaso validate
valid (Slack, 3 capabilities, 0 regrets)

4. Test before going live

Preview the HTTP request without sending it:

usepaso test list_channels --dry-run
--- DRY RUN (no request will be made) ---

GET https://slack.com/api/conversations.list?limit=20&types=public_channel
Authorization: Bearer ...

Test all capabilities at once:

usepaso test --all --dry-run

5. Add to Claude Desktop

One command. paso writes the config for you.

usepaso connect claude-desktop
Added "Slack" in Claude Desktop config.
  Config: ~/Library/Application Support/Claude/claude_desktop_config.json

Restart Claude Desktop to connect.

Restart Claude Desktop. Your API’s capabilities appear as tools in the conversation.

6. Use it

Ask Claude: “Show me the public channels in my workspace.” Claude calls list_channels through your MCP server, sends the request to Slack’s API, and returns the results.

Ask Claude: “Post ‘Deploy finished’ to the engineering channel.” Claude shows a confirmation (because consent_required: true), then calls post_message.

If something doesn’t work

Run the doctor:

usepaso doctor
usepaso doctor

  ok   usepaso.yaml found
  ok   YAML parses correctly
  ok   Validation passes (3 capabilities)
  ok   USEPASO_AUTH_TOKEN set
  ok   Base URL reachable (https://slack.com/api, 92ms)

All checks passed.

Five checks. If any fail, the output tells you what to fix.

What paso handles for you

  • Protocol compliance. The generated MCP server follows the spec. You don’t need to know MCP internals.
  • Auth forwarding. USEPASO_AUTH_TOKEN is sent in the correct header format. Tokens never appear in logs.
  • Input validation. Required parameters, enum values, and types are enforced before the request is sent.
  • Permission boundaries. Read, write, and admin tiers. Consent gates for mutations. A forbidden list for endpoints agents should never touch.

Already have an OpenAPI spec?

Skip writing YAML by hand:

usepaso init --from-openapi ./openapi.json

paso reads your spec and generates the declaration. Edit it to curate which endpoints Claude can access, then serve.

Questions

Does this work with Claude Code? paso generates a standard MCP server. Any tool that supports MCP can connect to it. Check the MCP client’s documentation for how to register external servers.

Can I use multiple MCP servers at once? Yes. Add multiple entries to the mcpServers object in your Claude Desktop config. Each paso declaration runs as a separate server.

What about rate limits? paso supports max_per_hour constraints on individual capabilities. Add them to your YAML to prevent agents from exceeding your API’s rate limits.

Related:

Read more: