Skip to main content

Strands Agents MCP Server

A model-driven approach to building AI agents in just a few lines of code.

GitHub commit activity GitHub open issues GitHub open pull requests License PyPI version Python versions Strands Discord

DocumentationSamplesPython SDKToolsMCP Server

This MCP server provides curated documentation access to your GenAI tools via llms.txt files, enabling AI coding assistants to find pages by title and retrieve their contents.

Features

  • Document Search: Weighted TF-IDF ranking over document titles, extended to page content once a page is hydrated (fetched), so body terms become searchable
  • Section-Based Browsing: Browse document structure via table of contents, then fetch only the section you need - more token-efficient than retrieving full pages
  • Curated Content: Indexes documentation from llms.txt files with clean, human-readable titles
  • On-Demand Fetching: Lazy-loads full document content only when needed for optimal performance
  • Snippet Generation: Hydrates the top-ranked pages to provide contextual previews
  • Real URL Support: Works with actual HTTPS URLs while maintaining backward compatibility

Tool behavior

  • search_docs(query, k) ranks by document title and by page content once a page has been hydrated. Both title-like keywords and body terms work; call fetch_doc to inspect a result's contents.
  • Search scores are unbounded weighted TF-IDF values. They are useful only for ordering results from the same query; they are not probabilities and should not be compared across queries.
  • search_docs returns an empty list when no document matches. If a matched page cannot be fetched for its snippet, the result still includes the URL and title.
  • fetch_doc returns {"error": "...", "url": "..."} for unsupported URLs and failed page fetches. For sectioned documents, unknown section IDs also return an error; section is ignored when the full document is returned automatically.

Configuration

  • STRANDS_MCP_PREFETCH_ALL: when set to a truthy value (1, true, yes), the server prefetches and indexes all pages in the background at startup, so body-term search works immediately instead of only after a page has been hydrated by a prior query. Defaults to off. Prefetch is best-effort and eventually consistent: results may be title-only until background hydration completes.

Prerequisites

The usage methods below require uv to be installed on your system. You can install it by following the official installation instructions.

Installation

You can use the Strands Agents MCP server with 40+ applications that support MCP servers, including Amazon Q Developer CLI, Anthropic Claude Code, Cline, and Cursor.

Get started quickly with one-click installation buttons for popular MCP clients. Click the buttons below to install servers directly in your IDE:

Install in Kiro Install in Cursor Install in VS Code

Kiro example

See the Kiro documentation for instructions on managing MCP configuration.

In ~/.kiro/settings/mcp.json:

{
  "mcpServers": {
    "strands-agents": {
      "command": "uvx",
      "args": ["strands-agents-mcp-server"],
      "env": {
        "FASTMCP_LOG_LEVEL": "INFO"
      },
      "disabled": false,
      "autoApprove": ["search_docs", "fetch_doc"]
    }
  }
}

Q Developer CLI example

See the Q Developer CLI documentation for instructions on managing MCP configuration.

In ~/.aws/amazonq/mcp.json:

{
  "mcpServers": {
    "strands-agents": {
      "command": "uvx",
      "args": ["strands-agents-mcp-server"],
      "env": {
        "FASTMCP_LOG_LEVEL": "INFO"
      },
      "disabled": false,
      "autoApprove": ["search_docs", "fetch_doc"]
    }
  }
}

Claude Code example

See the Claude Code documentation for instructions on managing MCP servers.

claude mcp add strands uvx strands-agents-mcp-server

Cline example

See the Cline documentation for instructions on managing MCP configuration.

Provide Cline with the following information:

I want to add the MCP server for Strands Agents.
Here's the GitHub link: @https://github.com/strands-agents/harness-sdk/tree/main/strands-mcp
Can you add it?"

Cursor example

See the Cursor documentation for instructions on managing MCP configuration.

In ~/.cursor/mcp.json:

{
  "mcpServers": {
    "strands-agents": {
      "command": "uvx",
      "args": ["strands-agents-mcp-server"],
      "env": {
        "FASTMCP_LOG_LEVEL": "INFO"
      },
      "disabled": false,
      "autoApprove": ["search_docs", "fetch_doc"]
    }
  }
}

VS Code example

See the VS Code documentation for instructions on managing MCP configuration.

In your mcp.json file:

{
  "servers": {
    "strands-agents": {
      "command": "uvx",
      "args": ["strands-agents-mcp-server"]
    }
  }
}

Quick Testing

You can quickly test the MCP server using the MCP Inspector:

# For published package
npx @modelcontextprotocol/inspector uvx strands-agents-mcp-server

# For local development
npx @modelcontextprotocol/inspector python -m strands_mcp_server

Note: This requires npx to be installed on your system. It comes bundled with Node.js.

The Inspector is also useful for troubleshooting MCP server issues as it provides detailed connection and protocol information. For an in-depth guide, have a look at the MCP Inspector documentation.

Getting Started

  1. Install prerequisites:

  2. Configure your MCP client:

    • Choose your preferred MCP client from the installation examples above
    • Add the Strands Agents MCP server configuration to your client
  3. Test the connection:

    # For published package
    npx @modelcontextprotocol/inspector uvx strands-agents-mcp-server
    
    # For local development
    npx @modelcontextprotocol/inspector python -m strands_mcp_server
    
  4. Start using the documentation tools:

    • search_docs - Find relevant documentation with intelligent ranking
    • fetch_doc - Browse a page's structure and preamble, then read individual sections
    • The server automatically indexes curated content from llms.txt files

Server Development

git clone https://github.com/strands-agents/harness-sdk.git
cd harness-sdk/strands-mcp
python3 -m venv venv
source venv/bin/activate
pip3 install -e ".[dev]"

npx @modelcontextprotocol/inspector python -m strands_mcp_server

Running Tests

# Unit tests (fast, no network access required)
pytest tests/

# Integration tests (requires network access to strandsagents.com)
pytest tests_integ/ -v

# All tests
pytest tests/ tests_integ/ -v

To skip integration tests (e.g., in CI environments without network access):

SKIP_INTEG_TESTS=1 pytest tests_integ/

Contributing ❤️

We welcome contributions! See our Contributing Guide for details on:

  • Reporting bugs & features
  • Development setup
  • Contributing via Pull Requests
  • Code of Conduct
  • Reporting of security issues

Stay in touch with the team

Come meet the Strands team and other users on Discord

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Security

See CONTRIBUTING for more information.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strands_agents_mcp_server-0.2.9.tar.gz (38.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strands_agents_mcp_server-0.2.9-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

Details for the file strands_agents_mcp_server-0.2.9.tar.gz.

File metadata

File hashes

Hashes for strands_agents_mcp_server-0.2.9.tar.gz
Algorithm Hash digest
SHA256 288a6f631e7850c149c5674b59466b5d1a9cf2438654ac8a63902a215a4baecf
MD5 edbf6169ec608593b20a3bb35bdf0cfc
BLAKE2b-256 19ca0be4da67bd4fb9963de201fffeb5a460bdae2a8c4ad1e9b8e84aed4441ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for strands_agents_mcp_server-0.2.9.tar.gz:

Publisher: release-mcp.yml on strands-agents/harness-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file strands_agents_mcp_server-0.2.9-py3-none-any.whl.

File metadata

File hashes

Hashes for strands_agents_mcp_server-0.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 0c1695276be2b1ffd0aafc865a84014700de97ddc231a90b507cebeba27101d6
MD5 c09c0894adac5f2169cb52e1915620cc
BLAKE2b-256 376a09fa712a1e57071db4dc1e646bdb68e247bf5108f492348873b6639eb421

See more details on using hashes here.

Provenance

The following attestation bundles were made for strands_agents_mcp_server-0.2.9-py3-none-any.whl:

Publisher: release-mcp.yml on strands-agents/harness-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.9 This release

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page